[PC-BSD Commits] r19717 - in pcbsd/current/src-qt4: libpcbsd pc-netmanager/src/wificonfig

svn at pcbsd.org svn at pcbsd.org
Wed Oct 17 09:13:19 PDT 2012


Author: kris
Date: 2012-10-17 16:13:19 +0000 (Wed, 17 Oct 2012)
New Revision: 19717

Modified:
   pcbsd/current/src-qt4/libpcbsd/netif.cpp
   pcbsd/current/src-qt4/libpcbsd/pcbsd-netif.h
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
Log:

Move another function into libpcbsd that we can use in other networking apps



Modified: pcbsd/current/src-qt4/libpcbsd/netif.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/netif.cpp	2012-10-17 15:52:35 UTC (rev 19716)
+++ pcbsd/current/src-qt4/libpcbsd/netif.cpp	2012-10-17 16:13:19 UTC (rev 19717)
@@ -421,6 +421,13 @@
   return tmp;
 }
 
+QString NetworkInterface::getWifiParent(QString dev)
+{
+   dev.remove(0, dev.size() -1 );
+   QString DevNum = dev;
+   return Utils::sysctl("net.wlan." + DevNum + ".%parent");
+}
+
 void NetworkInterface::wifiQuickConnect(QString SSID, QString netKey, QString DeviceName){
   /* 
      This function uses a set of defaults to connect to a wifi access point with a minimum

Modified: pcbsd/current/src-qt4/libpcbsd/pcbsd-netif.h
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/pcbsd-netif.h	2012-10-17 15:52:35 UTC (rev 19716)
+++ pcbsd/current/src-qt4/libpcbsd/pcbsd-netif.h	2012-10-17 16:13:19 UTC (rev 19717)
@@ -56,6 +56,7 @@
    static QString parseWifiSecurity( QString caps, QString etc );
    static void wifiQuickConnect(QString SSID, QString netKey, QString DeviceName);
    static QString getFirstWiredDevice();
+   static QString getWifiParent(QString dev);
 
 private:
    QString name;

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2012-10-17 15:52:35 UTC (rev 19716)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2012-10-17 16:13:19 UTC (rev 19717)
@@ -995,15 +995,6 @@
    return ifr.desc();
 }
 
-
-// Function which locates the parent device of a wlan child device
-QString wificonfigwidgetbase::getWifiParent(QString dev)
-{
-   dev.remove(0, dev.size() -1 );
-   QString DevNum = dev;
-   return Utils::sysctl("net.wlan." + DevNum + ".%parent");
-}
-
 void wificonfigwidgetbase::loadInfo()
 {
   QString tmp;
@@ -1012,8 +1003,8 @@
   if ( textInfoName->text().isEmpty() ) {
     if ( DeviceName.indexOf("wlan") != -1 )
     {
-      tmp = getWifiParent(DeviceName);
-      DeviceNameParent = getWifiParent(DeviceName);
+      tmp = NetworkInterface::getWifiParent(DeviceName);
+      DeviceNameParent = NetworkInterface::getWifiParent(DeviceName);
 
       // Get HW Identify line
       tmp = getNameForIdent(tmp);



More information about the Commits mailing list