* Adapted headers after Stippi's suggestions - I won't add the const until I
know how I implement that function :-) * Cleaned up libbnetapi.so Jamfile, removed non-Haiku target code. * Added empty files to the build to see that the headers are compiling. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37942 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1f9c8c4576
commit
bf58f252de
@ -65,14 +65,14 @@ public:
|
|||||||
status_t SetFlags(uint32 flags);
|
status_t SetFlags(uint32 flags);
|
||||||
status_t SetMTU(uint32 mtu);
|
status_t SetMTU(uint32 mtu);
|
||||||
|
|
||||||
uint32 CountAddresses() const;
|
int32 CountAddresses() const;
|
||||||
BNetworkInterfaceAddress* AddressAt(uint32 index);
|
BNetworkInterfaceAddress* AddressAt(int32 index);
|
||||||
|
|
||||||
status_t AddAddress(
|
status_t AddAddress(
|
||||||
const BNetworkInterfaceAddress& address);
|
const BNetworkInterfaceAddress& address);
|
||||||
status_t RemoveAddress(
|
status_t RemoveAddress(
|
||||||
const BNetworkInterfaceAddress& address);
|
const BNetworkInterfaceAddress& address);
|
||||||
status_t RemoveAddressAt(uint32 index);
|
status_t RemoveAddressAt(int32 index);
|
||||||
|
|
||||||
status_t GetHardwareAddress(BNetworkAddress& address);
|
status_t GetHardwareAddress(BNetworkAddress& address);
|
||||||
|
|
||||||
|
@ -15,16 +15,16 @@ class BNetworkInterface;
|
|||||||
|
|
||||||
class BNetworkRoster {
|
class BNetworkRoster {
|
||||||
public:
|
public:
|
||||||
BNetworkRoster& Default();
|
static BNetworkRoster& Default();
|
||||||
|
|
||||||
|
int32 CountInterfaces();
|
||||||
|
BNetworkInterface* InterfaceAt(int32 index);
|
||||||
|
|
||||||
uint32 CountInterfaces();
|
|
||||||
BNetworkInterface* InterfaceAt(uint32 index);
|
|
||||||
|
|
||||||
status_t AddInterface(
|
status_t AddInterface(
|
||||||
const BNetworkInterface& interface);
|
const BNetworkInterface& interface);
|
||||||
status_t RemoveInterface(
|
status_t RemoveInterface(
|
||||||
const BNetworkInterface& interface);
|
const BNetworkInterface& interface);
|
||||||
status_t RemoveInterfaceAt(uint32 index);
|
status_t RemoveInterfaceAt(int32 index);
|
||||||
|
|
||||||
status_t StartWatching(const BMessenger& target,
|
status_t StartWatching(const BMessenger& target,
|
||||||
uint32 eventMask);
|
uint32 eventMask);
|
||||||
|
@ -1,52 +1,18 @@
|
|||||||
SubDir HAIKU_TOP src kits network libnetapi ;
|
SubDir HAIKU_TOP src kits network libnetapi ;
|
||||||
|
|
||||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
|
||||||
|
|
||||||
UsePrivateHeaders net ;
|
UsePrivateHeaders net ;
|
||||||
|
|
||||||
local netapi_sources =
|
SharedLibrary libbnetapi.so :
|
||||||
init.cpp
|
init.cpp
|
||||||
DynamicBuffer.cpp
|
DynamicBuffer.cpp
|
||||||
NetEndpoint.cpp
|
NetEndpoint.cpp
|
||||||
NetAddress.cpp
|
NetAddress.cpp
|
||||||
NetBuffer.cpp
|
NetBuffer.cpp
|
||||||
NetDebug.cpp
|
NetDebug.cpp
|
||||||
|
|
||||||
|
NetworkAddress.cpp
|
||||||
|
NetworkInterface.cpp
|
||||||
|
NetworkRoster.cpp
|
||||||
|
|
||||||
|
: be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++)
|
||||||
;
|
;
|
||||||
|
|
||||||
if $(TARGET_PLATFORM) != haiku {
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers posix ] : true ;
|
|
||||||
# We need the public network headers also when not compiling for Haiku.
|
|
||||||
# Unfortunately we get more than we want, namely all POSIX headers.
|
|
||||||
UseHeaders [ FStandardOSHeaders ] : true ;
|
|
||||||
# Needed for <net/*.h> and maybe other stuff.
|
|
||||||
|
|
||||||
local defines = [ FDefines BUILDING_R5_LIBNET ] ;
|
|
||||||
SubDirCcFlags $(defines) ;
|
|
||||||
SubDirC++Flags $(defines) ;
|
|
||||||
|
|
||||||
SharedLibrary libnetapi.so :
|
|
||||||
$(netapi_sources)
|
|
||||||
: be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++)
|
|
||||||
;
|
|
||||||
|
|
||||||
# Installation -- in the test directory for the time being
|
|
||||||
HaikuInstallRelSymLink install-networking
|
|
||||||
: [ FDirName $(HAIKU_TEST_DIR) kits net lib ]
|
|
||||||
: libnetapi.so
|
|
||||||
: installed-networking-test ;
|
|
||||||
|
|
||||||
HaikuInstallRelSymLink install-userland-networking
|
|
||||||
: [ FDirName $(HAIKU_TEST_DIR) kits net userland lib ]
|
|
||||||
: libnetapi.so
|
|
||||||
: installed-userland-networking ;
|
|
||||||
|
|
||||||
Package haiku-networkingkit-cvs :
|
|
||||||
libnetapi.so :
|
|
||||||
# boot home config lib ;
|
|
||||||
boot home Desktop haiku-networkingkit lib ;
|
|
||||||
} else {
|
|
||||||
SharedLibrary libbnetapi.so :
|
|
||||||
$(netapi_sources)
|
|
||||||
: be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++)
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
8
src/kits/network/libnetapi/NetworkAddress.cpp
Normal file
8
src/kits/network/libnetapi/NetworkAddress.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010, Axel Dörfler, axeld@pinc-software.de.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <NetworkAddress.h>
|
||||||
|
|
8
src/kits/network/libnetapi/NetworkInterface.cpp
Normal file
8
src/kits/network/libnetapi/NetworkInterface.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010, Axel Dörfler, axeld@pinc-software.de.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <NetworkInterface.h>
|
||||||
|
|
8
src/kits/network/libnetapi/NetworkRoster.cpp
Normal file
8
src/kits/network/libnetapi/NetworkRoster.cpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010, Axel Dörfler, axeld@pinc-software.de.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <NetworkRoster.h>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user