11387Ssos/* 2230132Suqs * Copyright 2010, Haiku, Inc. All Rights Reserved. 31387Ssos * Distributed under the terms of the MIT License. 41387Ssos */ 51387Ssos#ifndef _NETWORK_ROSTER_H 61387Ssos#define _NETWORK_ROSTER_H 71387Ssos 81387Ssos 93187Ssos#include <Locker.h> 103187Ssos#include <NetworkNotifications.h> 111387Ssos#include <ObjectList.h> 121387Ssos 131387Ssosclass BMessenger; 141387Ssosclass BNetworkInterface; 1513765Smppstruct wireless_network; 161387Ssos 171387Ssos 181387Ssosclass BNetworkRoster { 191387Ssospublic: 201387Ssos static BNetworkRoster& Default(); 211387Ssos 221387Ssos size_t CountInterfaces() const; 231387Ssos status_t GetNextInterface(uint32* cookie, 241387Ssos BNetworkInterface& interface) const; 251387Ssos 261387Ssos status_t AddInterface(const char* name); 271387Ssos status_t AddInterface( 2850477Speter const BNetworkInterface& interface); 291387Ssos status_t RemoveInterface(const char* name); 301387Ssos status_t RemoveInterface( 3118444Sbde const BNetworkInterface& interface); 3218444Sbde 331387Ssos int32 CountPersistentNetworks() const; 3418444Sbde status_t GetNextPersistentNetwork(uint32* cookie, 3518444Sbde wireless_network& network) const; 361387Ssos status_t AddPersistentNetwork( 371387Ssos const wireless_network& network); 381387Ssos status_t RemovePersistentNetwork(const char* name); 391387Ssos 401387Ssos status_t StartWatching(const BMessenger& target, 411387Ssos uint32 eventMask); 421387Ssos void StopWatching(const BMessenger& target); 431387Ssos 441387Ssosprivate: 451387Ssos BNetworkRoster(); 461387Ssos ~BNetworkRoster(); 471387Ssos 481387Ssosprivate: 491387Ssos static BNetworkRoster sDefault; 501387Ssos}; 511387Ssos 521387Ssos 531387Ssos#endif // _NETWORK_ROSTER_H 541387Ssos