xref: /haiku/headers/os/net/NetworkRoster.h (revision e7d5c75dce28921de0dc981ed840205a67a0c0e5)
1 /*
2  * Copyright 2010, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _NETWORK_ROSTER_H
6 #define _NETWORK_ROSTER_H
7 
8 
9 #include <Locker.h>
10 
11 
12 class BMessenger;
13 class BNetworkInterface;
14 
15 
16 class BNetworkRoster {
17 public:
18 	static	BNetworkRoster&		Default();
19 
20 			size_t				CountInterfaces() const;
21 			status_t			GetNextInterface(uint32* cookie,
22 									BNetworkInterface& interface) const;
23 
24 			status_t			AddInterface(
25 									const BNetworkInterface& interface);
26 			status_t			RemoveInterface(
27 									const BNetworkInterface& interface);
28 
29 			status_t			StartWatching(const BMessenger& target,
30 									uint32 eventMask);
31 			void				StopWatching(const BMessenger& target);
32 
33 private:
34 								BNetworkRoster();
35 								~BNetworkRoster();
36 
37 private:
38 	static	BNetworkRoster		sDefault;
39 };
40 
41 
42 #endif	// _NETWORK_ROSTER_H
43