ipcm_pub/connection_monitor_server_api/inc/rconnmon.h
changeset 20 9c97ad6591ae
parent 0 5a93021fdf25
child 58 83ca720e2b9a
child 61 8b0c979bbe8c
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
    46 */
    46 */
    47 const TUint KSignalStrength = 6;
    47 const TUint KSignalStrength = 6;
    48 /** WLAN mode, defined in TConnMonNetworkMode.
    48 /** WLAN mode, defined in TConnMonNetworkMode.
    49 */
    49 */
    50 const TUint KNetworkMode = 7;
    50 const TUint KNetworkMode = 7;
    51 /** WLAN connection security mode, defined in TConnMonSecurityMode.
    51 /** Old WLAN connection security mode, defined in TConnMonSecurityMode.
       
    52 It is recommended to use the more detailed KSecurityMode_v2 instead.
    52 */
    53 */
    53 const TUint KSecurityMode = 8;
    54 const TUint KSecurityMode = 8;
    54 /** Bearer information, defined in TConnMonBearerInfo.
    55 /** Bearer information, defined in TConnMonBearerInfo.
    55 */
    56 */
    56 const TUint KBearerInfo = 9;
    57 const TUint KBearerInfo = 9;
    60 const TUint KWlanScanCacheLifetime = 10;
    61 const TUint KWlanScanCacheLifetime = 10;
    61 
    62 
    62 /** Network registration values defined in TConnMonNetworkRegistration_v2.
    63 /** Network registration values defined in TConnMonNetworkRegistration_v2.
    63 */
    64 */
    64 const TUint KNetworkRegistration_v2 = 11;
    65 const TUint KNetworkRegistration_v2 = 11;
       
    66 /** WLAN connection security mode, defined in TConnMonSecurityModeV2.
       
    67 Replaces the previously used KSecurityMode attribute.
       
    68 */
       
    69 const TUint KSecurityMode_v2 = 12;
    65 
    70 
    66 /** QoS - Not supported.
    71 /** QoS - Not supported.
    67 */
    72 */
    68 const TUint KTrafficClass = 30;
    73 const TUint KTrafficClass = 30;
    69 /** QoS - Not supported.
    74 /** QoS - Not supported.
   507     EConnMonSecurityWpa    = 3,
   512     EConnMonSecurityWpa    = 3,
   508     EConnMonSecurityWpaPsk = 4
   513     EConnMonSecurityWpaPsk = 4
   509     };
   514     };
   510 
   515 
   511 /**
   516 /**
       
   517 * WLAN connection security modes in more detail.
       
   518 * New values will be added to the end of the enumeration.
       
   519 */
       
   520 enum TConnMonSecurityModeV2
       
   521     {
       
   522     EConnMonSecurityV2Open      = 100,
       
   523     EConnMonSecurityV2WepOpen   = 101,
       
   524     EConnMonSecurityV2WepShared = 102,
       
   525     EConnMonSecurityV2802d1x    = 103,
       
   526     EConnMonSecurityV2Wpa       = 104,
       
   527     EConnMonSecurityV2WpaPsk    = 105,
       
   528     EConnMonSecurityV2Wpa2      = 106,
       
   529     EConnMonSecurityV2Wpa2Psk   = 107,
       
   530     EConnMonSecurityV2Wapi      = 108,
       
   531     EConnMonSecurityV2WapiPsk   = 109
       
   532     };
       
   533 
       
   534 /**
   512 * Network Modes.
   535 * Network Modes.
   513 */
   536 */
   514 enum TConnMonMobilePhoneNetworkMode
   537 enum TConnMonMobilePhoneNetworkMode
   515     {
   538     {
   516     EConnMonNetworkModeUnknown = 0,  ///< Network mode is unknown
   539     EConnMonNetworkModeUnknown = 0,  ///< Network mode is unknown
   848     /** WLAN BSSID length (mac address).
   871     /** WLAN BSSID length (mac address).
   849     */
   872     */
   850     static const TUint KWlanBssId = 6;
   873     static const TUint KWlanBssId = 6;
   851     /** Reserved for future use.
   874     /** Reserved for future use.
   852     */
   875     */
   853     static const TUint KExtraCount = 10;
   876     static const TUint KExtraCount = 8;
   854 
   877 
   855     /**
   878     /**
   856     * Constructor.
   879     * Constructor.
   857     *
   880     *
   858     * @param aName Name (SSID) of the network.
   881     * @param aName Name (SSID) of the network.
   872             const TDesC& aVendorData );
   895             const TDesC& aVendorData );
   873 
   896 
   874     /**
   897     /**
   875     * Constructor.
   898     * Constructor.
   876     *
   899     *
       
   900     * @param aName Name (SSID) of the network.
       
   901     * @param aConnectionMode Mode of the network.
       
   902     * @param aSignalStrength Signal strength of the network.
       
   903     * @param aSecurityMode Security mode of the network.
       
   904     * @param aSecurityModeV2 More detailed security mode of the network.
       
   905     * @param aProtectedSetupSupport Wi-Fi Protected Setup support.
       
   906     * @param aBssId Mac address (BSSID) of the base station.
       
   907     * @param aVendorData Not in use.
       
   908     * @return Pointer to the created CConnMonWlanNetwork object.
       
   909     */
       
   910     IMPORT_C static CConnMonWlanNetwork* NewL(
       
   911             const TBuf<KMaxNameLength>& aName,
       
   912             TUint aConnectionMode,
       
   913             TUint aSignalStrength,
       
   914             TUint aSecurityMode,
       
   915             TUint aSecurityModeV2,
       
   916             TUint aProtectedSetupSupport,
       
   917             const TBuf8<KWlanBssId>& aBssId,
       
   918             const TDesC& aVendorData );
       
   919 
       
   920     /**
       
   921     * Constructor.
       
   922     *
   877     * @return Pointer to the created empty CConnMonWlanNetwork object.
   923     * @return Pointer to the created empty CConnMonWlanNetwork object.
   878     */
   924     */
   879     IMPORT_C static CConnMonWlanNetwork* NewL();
   925     IMPORT_C static CConnMonWlanNetwork* NewL();
   880 
   926 
   881     /**
   927     /**
   942         return iSignalStrength;
   988         return iSignalStrength;
   943         }
   989         }
   944 
   990 
   945     /**
   991     /**
   946     * Obtains the security mode of the network.
   992     * Obtains the security mode of the network.
       
   993     * This method is offered for backward compatibility
       
   994     * reasons, SecurityModeV2() should be used instead.
   947     *
   995     *
   948     * @return Security mode (defined in TConnMonSecurityMode).
   996     * @return Security mode (defined in TConnMonSecurityMode).
   949     */
   997     */
   950     inline TUint SecurityMode()
   998     inline TUint SecurityMode()
   951         {
   999         {
   952         return iSecurityMode;
  1000         return iSecurityMode;
   953         }
  1001         }
       
  1002 
       
  1003     /**
       
  1004     * Obtains the more detailed security mode of the network.
       
  1005     *
       
  1006     * @return Security mode (defined in TConnMonSecurityModeV2).
       
  1007     */
       
  1008     IMPORT_C TUint SecurityModeV2();
       
  1009 
       
  1010     /**
       
  1011     * Finds whether Wi-Fi Protected Setup is supported.
       
  1012     *
       
  1013     * @return ETrue if AP supports Wi-Fi Protected Setup, EFalse if not.
       
  1014     */
       
  1015     IMPORT_C TBool IsProtectedSetupSupported();
   954 
  1016 
   955     /**
  1017     /**
   956     * Obtains the mac address (BSSID) of the base station.
  1018     * Obtains the mac address (BSSID) of the base station.
   957     *
  1019     *
   958     * @return Mac address (BSSID).
  1020     * @return Mac address (BSSID).
  1018             TUint aSecurityMode,
  1080             TUint aSecurityMode,
  1019             const TBuf8<KWlanBssId>& aBssId,
  1081             const TBuf8<KWlanBssId>& aBssId,
  1020             const TDesC& aVendorData );
  1082             const TDesC& aVendorData );
  1021 
  1083 
  1022     /**
  1084     /**
       
  1085     * Constructor.
       
  1086     *
       
  1087     * @param aName Name (SSID) of the network.
       
  1088     * @param aConnectionMode Mode of the network.
       
  1089     * @param aSignalStrength Signal strength of the network.
       
  1090     * @param aSecurityMode Security mode of the network.
       
  1091     * @param aSecurityModeV2 More detailed security mode of the network.
       
  1092     * @param aProtectedSetupSupport Wi-Fi Protected Setup support.
       
  1093     * @param aBssId Mac address (BSSID) of the base station.
       
  1094     * @param aVendorData Not in use.
       
  1095     */
       
  1096     CConnMonWlanNetwork(
       
  1097             const TBuf<KMaxNameLength>& aName,
       
  1098             TUint aConnectionMode,
       
  1099             TUint aSignalStrength,
       
  1100             TUint aSecurityMode,
       
  1101             TUint aSecurityModeV2,
       
  1102             TUint aProtectedSetupSupport,
       
  1103             const TBuf8<KWlanBssId>& aBssId,
       
  1104             const TDesC& aVendorData );
       
  1105 
       
  1106     /**
  1023     * Second-phase constructor.
  1107     * Second-phase constructor.
  1024     */
  1108     */
  1025     void ConstructL();
  1109     void ConstructL();
  1026 
  1110 
  1027 private:
  1111 private:
  1029     TUint iConnectionMode;        // WLAN mode, see TConnMonNetworkMode
  1113     TUint iConnectionMode;        // WLAN mode, see TConnMonNetworkMode
  1030     TUint iSignalStrength;        // Signal strength in absolute dBm
  1114     TUint iSignalStrength;        // Signal strength in absolute dBm
  1031     TUint iSecurityMode;          // See TConnMonSecurityMode
  1115     TUint iSecurityMode;          // See TConnMonSecurityMode
  1032     TBuf8<KWlanBssId> iWlanBssId; // BSSID
  1116     TBuf8<KWlanBssId> iWlanBssId; // BSSID
  1033     HBufC* iVendorData;           // For vendor specific data
  1117     HBufC* iVendorData;           // For vendor specific data
       
  1118     TUint iSecurityModeV2;        // See TConnMonSecurityModeV2
       
  1119     TUint iProtectedSetupSupport; // Wi-Fi Protected Setup support, 0 if not supported
  1034     TUint iExtraBuf[KExtraCount]; // Reserved for future
  1120     TUint iExtraBuf[KExtraCount]; // Reserved for future
  1035     };
  1121     };
  1036 
  1122 
  1037 /** Class definition for a pointer array of CConnMonWlanNetwork objects.
  1123 /** Class definition for a pointer array of CConnMonWlanNetwork objects.
  1038 */
  1124 */