[haiku-commits] r37942 - in haiku/trunk: headers/os/net src/kits/network/libnetapi

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 6 Aug 2010 15:22:25 +0200 (CEST)

Author: axeld
Date: 2010-08-06 15:22:25 +0200 (Fri, 06 Aug 2010)
New Revision: 37942
Changeset: http://dev.haiku-os.org/changeset/37942

Added:
   haiku/trunk/src/kits/network/libnetapi/NetworkAddress.cpp
   haiku/trunk/src/kits/network/libnetapi/NetworkInterface.cpp
   haiku/trunk/src/kits/network/libnetapi/NetworkRoster.cpp
Modified:
   haiku/trunk/headers/os/net/NetworkInterface.h
   haiku/trunk/headers/os/net/NetworkRoster.h
   haiku/trunk/src/kits/network/libnetapi/Jamfile
Log:
* 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.


Modified: haiku/trunk/headers/os/net/NetworkInterface.h
===================================================================
--- haiku/trunk/headers/os/net/NetworkInterface.h       2010-08-06 12:58:02 UTC 
(rev 37941)
+++ haiku/trunk/headers/os/net/NetworkInterface.h       2010-08-06 13:22:25 UTC 
(rev 37942)
@@ -65,14 +65,14 @@
                        status_t                        SetFlags(uint32 flags);
                        status_t                        SetMTU(uint32 mtu);
 
-                       uint32                          CountAddresses() const;
-                       BNetworkInterfaceAddress* AddressAt(uint32 index);
+                       int32                           CountAddresses() const;
+                       BNetworkInterfaceAddress* AddressAt(int32 index);
 
                        status_t                        AddAddress(
                                                                        const 
BNetworkInterfaceAddress& address);
                        status_t                        RemoveAddress(
                                                                        const 
BNetworkInterfaceAddress& address);
-                       status_t                        RemoveAddressAt(uint32 
index);
+                       status_t                        RemoveAddressAt(int32 
index);
 
                        status_t                        
GetHardwareAddress(BNetworkAddress& address);
 

Modified: haiku/trunk/headers/os/net/NetworkRoster.h
===================================================================
--- haiku/trunk/headers/os/net/NetworkRoster.h  2010-08-06 12:58:02 UTC (rev 
37941)
+++ haiku/trunk/headers/os/net/NetworkRoster.h  2010-08-06 13:22:25 UTC (rev 
37942)
@@ -15,16 +15,16 @@
 
 class BNetworkRoster {
 public:
-                       BNetworkRoster&         Default();
+       static  BNetworkRoster&         Default();
 
-                       uint32                          CountInterfaces();
-                       BNetworkInterface*      InterfaceAt(uint32 index);
-                       
+                       int32                           CountInterfaces();
+                       BNetworkInterface*      InterfaceAt(int32 index);
+
                        status_t                        AddInterface(
                                                                        const 
BNetworkInterface& interface);
                        status_t                        RemoveInterface(
                                                                        const 
BNetworkInterface& interface);
-                       status_t                        
RemoveInterfaceAt(uint32 index);
+                       status_t                        RemoveInterfaceAt(int32 
index);
 
                        status_t                        StartWatching(const 
BMessenger& target,
                                                                        uint32 
eventMask);

Modified: haiku/trunk/src/kits/network/libnetapi/Jamfile
===================================================================
--- haiku/trunk/src/kits/network/libnetapi/Jamfile      2010-08-06 12:58:02 UTC 
(rev 37941)
+++ haiku/trunk/src/kits/network/libnetapi/Jamfile      2010-08-06 13:22:25 UTC 
(rev 37942)
@@ -1,52 +1,18 @@
 SubDir HAIKU_TOP src kits network libnetapi ;
 
-SetSubDirSupportedPlatformsBeOSCompatible ;
-
 UsePrivateHeaders net ;
 
-local netapi_sources =
+SharedLibrary libbnetapi.so :
        init.cpp
        DynamicBuffer.cpp
        NetEndpoint.cpp
        NetAddress.cpp 
        NetBuffer.cpp
        NetDebug.cpp
-;
 
-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.
+       NetworkAddress.cpp
+       NetworkInterface.cpp
+       NetworkRoster.cpp
 
-       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++)
-       ;
-}
+       : be $(TARGET_NETWORK_LIBS) $(TARGET_LIBSUPC++)
+;

Added: haiku/trunk/src/kits/network/libnetapi/NetworkAddress.cpp
===================================================================
--- haiku/trunk/src/kits/network/libnetapi/NetworkAddress.cpp                   
        (rev 0)
+++ haiku/trunk/src/kits/network/libnetapi/NetworkAddress.cpp   2010-08-06 
13:22:25 UTC (rev 37942)
@@ -0,0 +1,8 @@
+/*
+ * Copyright 2010, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
+ * Distributed under the terms of the MIT License.
+ */
+
+
+#include <NetworkAddress.h>
+

Added: haiku/trunk/src/kits/network/libnetapi/NetworkInterface.cpp
===================================================================
--- haiku/trunk/src/kits/network/libnetapi/NetworkInterface.cpp                 
        (rev 0)
+++ haiku/trunk/src/kits/network/libnetapi/NetworkInterface.cpp 2010-08-06 
13:22:25 UTC (rev 37942)
@@ -0,0 +1,8 @@
+/*
+ * Copyright 2010, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
+ * Distributed under the terms of the MIT License.
+ */
+
+
+#include <NetworkInterface.h>
+

Added: haiku/trunk/src/kits/network/libnetapi/NetworkRoster.cpp
===================================================================
--- haiku/trunk/src/kits/network/libnetapi/NetworkRoster.cpp                    
        (rev 0)
+++ haiku/trunk/src/kits/network/libnetapi/NetworkRoster.cpp    2010-08-06 
13:22:25 UTC (rev 37942)
@@ -0,0 +1,8 @@
+/*
+ * Copyright 2010, Axel Dörfler, axeld@xxxxxxxxxxxxxxxxx
+ * Distributed under the terms of the MIT License.
+ */
+
+
+#include <NetworkRoster.h>
+


Other related posts:

  • » [haiku-commits] r37942 - in haiku/trunk: headers/os/net src/kits/network/libnetapi - axeld