2 * Copyright 2010, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _NETWORK_ROSTER_H
6 #define _NETWORK_ROSTER_H
10 #include <NetworkNotifications.h>
11 #include <ObjectList.h>
14 class BNetworkInterface
;
15 struct wireless_network
;
18 class BNetworkRoster
{
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
,
42 void StopWatching(const BMessenger
& target
);
49 static BNetworkRoster sDefault
;
53 #endif // _NETWORK_ROSTER_H