wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h
changeset 39 7b3e49e4608a
parent 31 e8f4211554fb
child 53 bdc64aa9b954
--- a/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h	Thu Jun 10 15:44:54 2010 +0300
+++ b/wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h	Thu Jun 24 10:49:51 2010 +0300
@@ -56,50 +56,46 @@
         Remember to update traces/trace.properties file when modifying
         this enum (tracing is also the cause for fixing the enum values).
 
-        Scan Results:
+        ConfID's available for scan results:
         - ConfIdSsid
+        - ConfIdBssid
         - ConfIdSignalStrength
         - ConfIdConnectionMode
         - ConfIdSecurityMode
         - ConfIdWpaPskUse
         - ConfIdWpsSupported
 
-        IAP creation and updates:
-        Mandatory for all security modes:
+        ConfID's for IAP creation and updates, these are
+        mandatory for all security modes: 
         - ConfIdSsid
         - ConfIdConnectionMode
         - ConfIdSecurityMode
+        - ConfIdWepKey1     (Empty if not used) 
+        - ConfIdWepKey2     (Empty if not used)
+        - ConfIdWepKey3     (Empty if not used)
+        - ConfIdWepKey4     (Empty if not used)
+        - ConfIdWepDefaultIndex
+        - ConfIdWpaPskUse
+        - ConfIdWpaPsk      (Empty if not used)
         - ConfIdHidden
-
-        Open: No extra configurations. 
-        802.1x: No extra configurations.
-
-        WEP:
-        - ConfIdWepKey1
-        - ConfIdWepKey2
-        - ConfIdWepKey3
-        - ConfIdWepKey4
-        - ConfIdWepDefaultIndex
-
-        WPA/WPA2:
-        - ConfIdWpaPskUse
-        - ConfIdWpaPsk
     */
     enum ConfId {
         //! QString: WLAN Network Name (SSID)
         ConfIdSsid = 0,
+        //! QByteArray: Basic Service Set Identifier
+        ConfIdBssid = 1,
         //! int: signal strength in RSSI (dBm)
-        ConfIdSignalStrength = 1,
+        ConfIdSignalStrength = 2,
         //! int: (CMManagerShim::WlanNetMode)
-        ConfIdConnectionMode = 2,
+        ConfIdConnectionMode = 3,
         //! int: (CMManagerShim::WlanSecMode)
-        ConfIdSecurityMode = 3,
+        ConfIdSecurityMode = 4,
         //! bool: true - WPA PSK, false - WPA EAP
-        ConfIdWpaPskUse = 4,
+        ConfIdWpaPskUse = 5,
         //! QString: Pre-Shared Key for WPA
         //! Length: 8-63 - Ascii key
         //! Length: 64 - Hex key
-        ConfIdWpaPsk = 5,
+        ConfIdWpaPsk = 6,
         //! QString: WEP Key for index 1:
         //! HEX: 
         //! - 64 bit: allowed key length = 10
@@ -108,20 +104,35 @@
         //! ASCII:
         //! - 64 bit: allowed key length = 5   
         //! - 128 bit: allowed key length = 13
-        ConfIdWepKey1 = 6,
+        ConfIdWepKey1 = 7,
         //! QString: WEP Key for index 2
-        ConfIdWepKey2 = 7,
+        ConfIdWepKey2 = 8,
         //! QString: WEP Key for index 3
-        ConfIdWepKey3 = 8,
+        ConfIdWepKey3 = 9,
         //! QString: WEP Key for index 4
-        ConfIdWepKey4 = 9,
+        ConfIdWepKey4 = 10,
         //! int: (CMManagerShim::WlanWepKeyIndex): Default WEP Key index
-        ConfIdWepDefaultIndex = 10,
-        //! bool: Is WLAN Hidden: true - hidden, false - not hidden.
-        ConfIdHidden = 11,
+        ConfIdWepDefaultIndex = 11,
+        //! bool: Is WLAN hidden (CMManager::ECmHidden).
+        ConfIdHidden = 12,
         //! bool: true - Wifi Protected setup is supported, false - not
-        ConfIdWpsSupported = 12
+        ConfIdWpsSupported = 13
     };
+
+    /*!
+        Function pointer type for string comparison operation customization.
+        Used for AP comparison in \a compare.
+        
+        @param [in] string1 String #1 to compare.
+        @param [in] string2 String #2 to compare.
+
+        @return Zero (0), if strings are considered to be same,
+                Positive (>0) if string1 is considered to be "greater than" string2. 
+                Negative (<0) if string1 is considered to be "less than" string2. 
+    */
+    typedef int (*StringComparator)( 
+        const QString &string1,
+        const QString &string2);
     
     WlanQtUtilsAp();
 
@@ -133,9 +144,10 @@
     
     void setValue(int identifier, QVariant value);
     
-    static bool compare(
+    static int compare(
         const WlanQtUtilsAp *ap1,
-        const WlanQtUtilsAp *ap2);
+        const WlanQtUtilsAp *ap2,
+        StringComparator comparator = 0);
     
 signals: