wlanutilities/wlanqtutilities/base/inc/wlanqtutilsap.h
changeset 38 2dc6da6fb431
child 39 7b3e49e4608a
equal deleted inserted replaced
29:dbe86d96ce5b 38:2dc6da6fb431
       
     1 /*
       
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * WLAN AP (Access Point, unknown network) class.
       
    16 */
       
    17 
       
    18 #ifndef WLANQTUTILSAP_H
       
    19 #define WLANQTUTILSAP_H
       
    20 
       
    21 // System includes
       
    22 
       
    23 #include <QObject>
       
    24 #include <QMetaType>
       
    25 #include <QVariant>
       
    26 #include <QScopedPointer>
       
    27 
       
    28 // User includes
       
    29 
       
    30 // Forward declarations
       
    31 
       
    32 class WlanQtUtilsApPrivate;
       
    33 
       
    34 // External data types
       
    35 
       
    36 // Constants
       
    37 
       
    38 //! Library interface export macro
       
    39 #ifdef BUILD_WLANQTUTILITIES_DLL
       
    40 #define WLANQTUTILSAP_EXPORT Q_DECL_EXPORT
       
    41 #else
       
    42 #define WLANQTUTILSAP_EXPORT Q_DECL_IMPORT
       
    43 #endif
       
    44 
       
    45 // Class declaration
       
    46 
       
    47 class WLANQTUTILSAP_EXPORT WlanQtUtilsAp
       
    48 {
       
    49     
       
    50 public:
       
    51     
       
    52     // Data types
       
    53     
       
    54     /*!
       
    55         Configuration IDs that can be read and set in this class.
       
    56         Remember to update traces/trace.properties file when modifying
       
    57         this enum (tracing is also the cause for fixing the enum values).
       
    58 
       
    59         Scan Results:
       
    60         - ConfIdSsid
       
    61         - ConfIdSignalStrength
       
    62         - ConfIdConnectionMode
       
    63         - ConfIdSecurityMode
       
    64         - ConfIdWpaPskUse
       
    65         - ConfIdWpsSupported
       
    66 
       
    67         IAP creation and updates:
       
    68         Mandatory for all security modes:
       
    69         - ConfIdSsid
       
    70         - ConfIdConnectionMode
       
    71         - ConfIdSecurityMode
       
    72         - 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     */
       
    88     enum ConfId {
       
    89         //! QString: WLAN Network Name (SSID)
       
    90         ConfIdSsid = 0,
       
    91         //! int: signal strength in RSSI (dBm)
       
    92         ConfIdSignalStrength = 1,
       
    93         //! int: (CMManagerShim::WlanNetMode)
       
    94         ConfIdConnectionMode = 2,
       
    95         //! int: (CMManagerShim::WlanSecMode)
       
    96         ConfIdSecurityMode = 3,
       
    97         //! bool: true - WPA PSK, false - WPA EAP
       
    98         ConfIdWpaPskUse = 4,
       
    99         //! QString: Pre-Shared Key for WPA
       
   100         //! Length: 8-63 - Ascii key
       
   101         //! Length: 64 - Hex key
       
   102         ConfIdWpaPsk = 5,
       
   103         //! QString: WEP Key for index 1:
       
   104         //! HEX: 
       
   105         //! - 64 bit: allowed key length = 10
       
   106         //! - 128 bit: allowed key length = 26
       
   107         //! 
       
   108         //! ASCII:
       
   109         //! - 64 bit: allowed key length = 5   
       
   110         //! - 128 bit: allowed key length = 13
       
   111         ConfIdWepKey1 = 6,
       
   112         //! QString: WEP Key for index 2
       
   113         ConfIdWepKey2 = 7,
       
   114         //! QString: WEP Key for index 3
       
   115         ConfIdWepKey3 = 8,
       
   116         //! QString: WEP Key for index 4
       
   117         ConfIdWepKey4 = 9,
       
   118         //! int: (CMManagerShim::WlanWepKeyIndex): Default WEP Key index
       
   119         ConfIdWepDefaultIndex = 10,
       
   120         //! bool: Is WLAN Hidden: true - hidden, false - not hidden.
       
   121         ConfIdHidden = 11,
       
   122         //! bool: true - Wifi Protected setup is supported, false - not
       
   123         ConfIdWpsSupported = 12
       
   124     };
       
   125     
       
   126     WlanQtUtilsAp();
       
   127 
       
   128     WlanQtUtilsAp(const WlanQtUtilsAp &ref);
       
   129     
       
   130     virtual ~WlanQtUtilsAp();
       
   131     
       
   132     QVariant value(int identifier) const;
       
   133     
       
   134     void setValue(int identifier, QVariant value);
       
   135     
       
   136     static bool compare(
       
   137         const WlanQtUtilsAp *ap1,
       
   138         const WlanQtUtilsAp *ap2);
       
   139     
       
   140 signals:
       
   141 
       
   142 public slots:
       
   143 
       
   144 protected:
       
   145 
       
   146 protected slots:
       
   147 
       
   148 private:
       
   149 
       
   150     // Disabling implicit assignment operator
       
   151     WlanQtUtilsAp &operator=(const WlanQtUtilsAp &);
       
   152     
       
   153 private slots:
       
   154 
       
   155 private: // data
       
   156 
       
   157     QScopedPointer<WlanQtUtilsApPrivate> d_ptr; //!< Private implementation
       
   158 
       
   159     // Friend classes
       
   160 };
       
   161 
       
   162 // Metatype support is needed since we use this class with QVariant
       
   163 Q_DECLARE_METATYPE(WlanQtUtilsAp)
       
   164 
       
   165 #endif // WLANQTUTILSAP_H