-
-
Notifications
You must be signed in to change notification settings - Fork 338
/
TargetHostInterfaceRoster.h
55 lines (39 loc) · 1.27 KB
/
TargetHostInterfaceRoster.h
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
49
50
51
52
53
54
55
/*
* Copyright 2016, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
#ifndef TARGET_HOST_INTERFACE_ROSTER_H
#define TARGET_HOST_INTERFACE_ROSTER_H
#include <OS.h>
#include <Locker.h>
#include <ObjectList.h>
class Settings;
class TargetHostInterface;
class TargetHostInterfaceInfo;
class TargetHostInterfaceRoster {
public:
TargetHostInterfaceRoster();
virtual ~TargetHostInterfaceRoster();
static TargetHostInterfaceRoster* Default();
static status_t CreateDefault();
static void DeleteDefault();
status_t Init();
status_t RegisterInterfaceInfos();
int32 CountInterfaceInfos();
TargetHostInterfaceInfo*
InterfaceInfoAt(int32 index) const;
status_t CreateInterface(TargetHostInterfaceInfo* info,
Settings* settings,
TargetHostInterface*& _interface) const;
int32 CountActiveInterfaces();
TargetHostInterface* ActiveInterfaceAt(int32 index) const;
private:
typedef BObjectList<TargetHostInterfaceInfo> InfoList;
typedef BObjectList<TargetHostInterface> InterfaceList;
private:
BLocker fLock;
static TargetHostInterfaceRoster* sDefaultInstance;
InfoList fInterfaceInfos;
InterfaceList fActiveInterfaces;
};
#endif // TARGET_HOST_INTERFACE_ROSTER_H