summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/netdev/none.cpp
blob: 284ff51a9625987a295360decda9f2ffd9952b96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// license:BSD-3-Clause
// copyright-holders:Couriersud
/*
 * none.c
 *
 */
#include "netdev_module.h"

#include "modules/osdmodule.h"

#include <memory>
#include <vector>


namespace osd {

namespace {

class netdev_none : public osd_module, public netdev_module
{
public:
	netdev_none() : osd_module(OSD_NETDEV_PROVIDER, "none"), netdev_module()
	{
	}

	virtual ~netdev_none() { }

	virtual int init(osd_interface &osd, const osd_options &options) override
	{
		return 0;
	}

	virtual std::unique_ptr<network_device> open_device(int id, network_handler &handler) override
	{
		return std::unique_ptr<network_device>();
	}

	virtual std::vector<network_device_info> list_devices() override
	{
		return std::vector<network_device_info>();
	}
};

} // anonymous namespace

} // namespace osd

MODULE_DEFINITION(NETDEV_NONE, osd::netdev_none)