wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h
changeset 39 7b3e49e4608a
parent 31 e8f4211554fb
child 53 bdc64aa9b954
equal deleted inserted replaced
36:682dd021f9be 39:7b3e49e4608a
    54     /*!
    54     /*!
    55         Configuration IDs that can be read and set in this class.
    55         Configuration IDs that can be read and set in this class.
    56         Remember to update traces/trace.properties file when modifying
    56         Remember to update traces/trace.properties file when modifying
    57         this enum (tracing is also the cause for fixing the enum values).
    57         this enum (tracing is also the cause for fixing the enum values).
    58 
    58 
    59         Scan Results:
    59         ConfID's available for scan results:
    60         - ConfIdSsid
    60         - ConfIdSsid
       
    61         - ConfIdBssid
    61         - ConfIdSignalStrength
    62         - ConfIdSignalStrength
    62         - ConfIdConnectionMode
    63         - ConfIdConnectionMode
    63         - ConfIdSecurityMode
    64         - ConfIdSecurityMode
    64         - ConfIdWpaPskUse
    65         - ConfIdWpaPskUse
    65         - ConfIdWpsSupported
    66         - ConfIdWpsSupported
    66 
    67 
    67         IAP creation and updates:
    68         ConfID's for IAP creation and updates, these are
    68         Mandatory for all security modes:
    69         mandatory for all security modes: 
    69         - ConfIdSsid
    70         - ConfIdSsid
    70         - ConfIdConnectionMode
    71         - ConfIdConnectionMode
    71         - ConfIdSecurityMode
    72         - ConfIdSecurityMode
       
    73         - ConfIdWepKey1     (Empty if not used) 
       
    74         - ConfIdWepKey2     (Empty if not used)
       
    75         - ConfIdWepKey3     (Empty if not used)
       
    76         - ConfIdWepKey4     (Empty if not used)
       
    77         - ConfIdWepDefaultIndex
       
    78         - ConfIdWpaPskUse
       
    79         - ConfIdWpaPsk      (Empty if not used)
    72         - ConfIdHidden
    80         - ConfIdHidden
    73 
       
    74         Open: No extra configurations. 
       
    75         802.1x: No extra configurations.
       
    76 
       
    77         WEP:
       
    78         - ConfIdWepKey1
       
    79         - ConfIdWepKey2
       
    80         - ConfIdWepKey3
       
    81         - ConfIdWepKey4
       
    82         - ConfIdWepDefaultIndex
       
    83 
       
    84         WPA/WPA2:
       
    85         - ConfIdWpaPskUse
       
    86         - ConfIdWpaPsk
       
    87     */
    81     */
    88     enum ConfId {
    82     enum ConfId {
    89         //! QString: WLAN Network Name (SSID)
    83         //! QString: WLAN Network Name (SSID)
    90         ConfIdSsid = 0,
    84         ConfIdSsid = 0,
       
    85         //! QByteArray: Basic Service Set Identifier
       
    86         ConfIdBssid = 1,
    91         //! int: signal strength in RSSI (dBm)
    87         //! int: signal strength in RSSI (dBm)
    92         ConfIdSignalStrength = 1,
    88         ConfIdSignalStrength = 2,
    93         //! int: (CMManagerShim::WlanNetMode)
    89         //! int: (CMManagerShim::WlanNetMode)
    94         ConfIdConnectionMode = 2,
    90         ConfIdConnectionMode = 3,
    95         //! int: (CMManagerShim::WlanSecMode)
    91         //! int: (CMManagerShim::WlanSecMode)
    96         ConfIdSecurityMode = 3,
    92         ConfIdSecurityMode = 4,
    97         //! bool: true - WPA PSK, false - WPA EAP
    93         //! bool: true - WPA PSK, false - WPA EAP
    98         ConfIdWpaPskUse = 4,
    94         ConfIdWpaPskUse = 5,
    99         //! QString: Pre-Shared Key for WPA
    95         //! QString: Pre-Shared Key for WPA
   100         //! Length: 8-63 - Ascii key
    96         //! Length: 8-63 - Ascii key
   101         //! Length: 64 - Hex key
    97         //! Length: 64 - Hex key
   102         ConfIdWpaPsk = 5,
    98         ConfIdWpaPsk = 6,
   103         //! QString: WEP Key for index 1:
    99         //! QString: WEP Key for index 1:
   104         //! HEX: 
   100         //! HEX: 
   105         //! - 64 bit: allowed key length = 10
   101         //! - 64 bit: allowed key length = 10
   106         //! - 128 bit: allowed key length = 26
   102         //! - 128 bit: allowed key length = 26
   107         //! 
   103         //! 
   108         //! ASCII:
   104         //! ASCII:
   109         //! - 64 bit: allowed key length = 5   
   105         //! - 64 bit: allowed key length = 5   
   110         //! - 128 bit: allowed key length = 13
   106         //! - 128 bit: allowed key length = 13
   111         ConfIdWepKey1 = 6,
   107         ConfIdWepKey1 = 7,
   112         //! QString: WEP Key for index 2
   108         //! QString: WEP Key for index 2
   113         ConfIdWepKey2 = 7,
   109         ConfIdWepKey2 = 8,
   114         //! QString: WEP Key for index 3
   110         //! QString: WEP Key for index 3
   115         ConfIdWepKey3 = 8,
   111         ConfIdWepKey3 = 9,
   116         //! QString: WEP Key for index 4
   112         //! QString: WEP Key for index 4
   117         ConfIdWepKey4 = 9,
   113         ConfIdWepKey4 = 10,
   118         //! int: (CMManagerShim::WlanWepKeyIndex): Default WEP Key index
   114         //! int: (CMManagerShim::WlanWepKeyIndex): Default WEP Key index
   119         ConfIdWepDefaultIndex = 10,
   115         ConfIdWepDefaultIndex = 11,
   120         //! bool: Is WLAN Hidden: true - hidden, false - not hidden.
   116         //! bool: Is WLAN hidden (CMManager::ECmHidden).
   121         ConfIdHidden = 11,
   117         ConfIdHidden = 12,
   122         //! bool: true - Wifi Protected setup is supported, false - not
   118         //! bool: true - Wifi Protected setup is supported, false - not
   123         ConfIdWpsSupported = 12
   119         ConfIdWpsSupported = 13
   124     };
   120     };
       
   121 
       
   122     /*!
       
   123         Function pointer type for string comparison operation customization.
       
   124         Used for AP comparison in \a compare.
       
   125         
       
   126         @param [in] string1 String #1 to compare.
       
   127         @param [in] string2 String #2 to compare.
       
   128 
       
   129         @return Zero (0), if strings are considered to be same,
       
   130                 Positive (>0) if string1 is considered to be "greater than" string2. 
       
   131                 Negative (<0) if string1 is considered to be "less than" string2. 
       
   132     */
       
   133     typedef int (*StringComparator)( 
       
   134         const QString &string1,
       
   135         const QString &string2);
   125     
   136     
   126     WlanQtUtilsAp();
   137     WlanQtUtilsAp();
   127 
   138 
   128     WlanQtUtilsAp(const WlanQtUtilsAp &ref);
   139     WlanQtUtilsAp(const WlanQtUtilsAp &ref);
   129     
   140     
   131     
   142     
   132     QVariant value(int identifier) const;
   143     QVariant value(int identifier) const;
   133     
   144     
   134     void setValue(int identifier, QVariant value);
   145     void setValue(int identifier, QVariant value);
   135     
   146     
   136     static bool compare(
   147     static int compare(
   137         const WlanQtUtilsAp *ap1,
   148         const WlanQtUtilsAp *ap1,
   138         const WlanQtUtilsAp *ap2);
   149         const WlanQtUtilsAp *ap2,
       
   150         StringComparator comparator = 0);
   139     
   151     
   140 signals:
   152 signals:
   141 
   153 
   142 public slots:
   154 public slots:
   143 
   155