haiku/headers/os/net/NetworkRoster.h
Axel Dörfler c2808ea7b2 * Adapted API as needed, and implemented most of the C++ API - it's completely
untested at this point, though.
* Will port ifconfig, NetworkStatus, and the Network preferences application
  later in order to test the API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 16:31:40 +00:00

43 lines
856 B
C++

/*
* Copyright 2010, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _NETWORK_ROSTER_H
#define _NETWORK_ROSTER_H
#include <Locker.h>
class BMessenger;
class BNetworkInterface;
class BNetworkRoster {
public:
static BNetworkRoster& Default();
size_t CountInterfaces() const;
status_t GetNextInterface(uint32* cookie,
BNetworkInterface& interface) const;
status_t AddInterface(
const BNetworkInterface& interface);
status_t RemoveInterface(
const BNetworkInterface& interface);
status_t StartWatching(const BMessenger& target,
uint32 eventMask);
void StopWatching(const BMessenger& target);
private:
BNetworkRoster();
~BNetworkRoster();
private:
static BNetworkRoster sDefault;
};
#endif // _NETWORK_ROSTER_H