Fix FreeBSD build.
[haiku.git] / headers / os / net / NetworkRoster.h
blob536b31a53dec021d73bbd67cc73e06682270ab6b
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
9 #include <Locker.h>
10 #include <NetworkNotifications.h>
11 #include <ObjectList.h>
13 class BMessenger;
14 class BNetworkInterface;
15 struct wireless_network;
18 class BNetworkRoster {
19 public:
20 static BNetworkRoster& Default();
22 size_t CountInterfaces() const;
23 status_t GetNextInterface(uint32* cookie,
24 BNetworkInterface& interface) const;
26 status_t AddInterface(const char* name);
27 status_t AddInterface(
28 const BNetworkInterface& interface);
29 status_t RemoveInterface(const char* name);
30 status_t RemoveInterface(
31 const BNetworkInterface& interface);
33 int32 CountPersistentNetworks() const;
34 status_t GetNextPersistentNetwork(uint32* cookie,
35 wireless_network& network) const;
36 status_t AddPersistentNetwork(
37 const wireless_network& network);
38 status_t RemovePersistentNetwork(const char* name);
40 status_t StartWatching(const BMessenger& target,
41 uint32 eventMask);
42 void StopWatching(const BMessenger& target);
44 private:
45 BNetworkRoster();
46 ~BNetworkRoster();
48 private:
49 static BNetworkRoster sDefault;
53 #endif // _NETWORK_ROSTER_H