--- a/connectionmonitoring/connmon/connectionmonitor/src/connmonwlannetwork_v2.cpp Thu Aug 19 10:18:49 2010 +0300
+++ b/connectionmonitoring/connmon/connectionmonitor/src/connmonwlannetwork_v2.cpp Tue Aug 31 15:35:44 2010 +0300
@@ -75,6 +75,40 @@
// Constructor
// ---------------------------------------------------------------------------
//
+CConnMonWlanNetwork::CConnMonWlanNetwork(
+ const TBuf<KMaxNameLength>& aName,
+ TUint aConnectionMode,
+ TUint aSignalStrength,
+ TUint aSecurityMode,
+ TUint aSecurityModeV2,
+ TUint aProtectedSetupSupport,
+ const TBuf8<KWlanBssId>& aBssId,
+ const TDesC& aVendorData )
+ :
+ iName( aName ),
+ iConnectionMode( aConnectionMode ),
+ iSignalStrength( aSignalStrength ),
+ iSecurityMode( aSecurityMode ),
+ iWlanBssId( aBssId ),
+ iVendorData( NULL ),
+ iSecurityModeV2( aSecurityModeV2 ),
+ iProtectedSetupSupport( aProtectedSetupSupport )
+ {
+ if ( aVendorData != KNullDesC() && aVendorData.Length() > 0 )
+ {
+ // Can't leave here, copy contents only if enough memory
+ iVendorData = HBufC::New( aVendorData.Length() );
+ if ( iVendorData )
+ {
+ iVendorData->Des().Copy( aVendorData );
+ }
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Constructor
+// ---------------------------------------------------------------------------
+//
EXPORT_C CConnMonWlanNetwork* CConnMonWlanNetwork::NewL(
const TBuf<KMaxNameLength>& aName,
TUint aConnectionMode,
@@ -95,6 +129,33 @@
}
// ---------------------------------------------------------------------------
+// Constructor
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CConnMonWlanNetwork* CConnMonWlanNetwork::NewL(
+ const TBuf<KMaxNameLength>& aName,
+ TUint aConnectionMode,
+ TUint aSignalStrength,
+ TUint aSecurityMode,
+ TUint aSecurityModeV2,
+ TUint aProtectedSetupSupport,
+ const TBuf8<KWlanBssId>& aBssId,
+ const TDesC& aVendorData )
+ {
+ CConnMonWlanNetwork* wlanNet = new( ELeave ) CConnMonWlanNetwork(
+ aName,
+ aConnectionMode,
+ aSignalStrength,
+ aSecurityMode,
+ aSecurityModeV2,
+ aProtectedSetupSupport,
+ aBssId,
+ aVendorData );
+
+ return wlanNet;
+ }
+
+// ---------------------------------------------------------------------------
// Second-phase constructor
// ---------------------------------------------------------------------------
//
@@ -117,6 +178,8 @@
aConnMonWlanNetwork.iConnectionMode,
aConnMonWlanNetwork.iSignalStrength,
aConnMonWlanNetwork.iSecurityMode,
+ aConnMonWlanNetwork.iSecurityModeV2,
+ aConnMonWlanNetwork.iProtectedSetupSupport,
aConnMonWlanNetwork.iWlanBssId,
aConnMonWlanNetwork.iVendorData->Des() );
}
@@ -127,6 +190,8 @@
aConnMonWlanNetwork.iConnectionMode,
aConnMonWlanNetwork.iSignalStrength,
aConnMonWlanNetwork.iSecurityMode,
+ aConnMonWlanNetwork.iSecurityModeV2,
+ aConnMonWlanNetwork.iProtectedSetupSupport,
aConnMonWlanNetwork.iWlanBssId,
KNullDesC() );
}
@@ -155,6 +220,8 @@
iConnectionMode = aConnMonWlanNetwork.ConnectionMode();
iSignalStrength = aConnMonWlanNetwork.SignalStrength();
iSecurityMode = aConnMonWlanNetwork.SecurityMode();
+ iSecurityModeV2 = aConnMonWlanNetwork.SecurityModeV2();
+ iProtectedSetupSupport = aConnMonWlanNetwork.IsProtectedSetupSupported();
iWlanBssId = aConnMonWlanNetwork.WlanBssid();
if ( aConnMonWlanNetwork.iVendorData )
@@ -199,6 +266,29 @@
}
// ---------------------------------------------------------------------------
+// Obtains the more detailed security mode of the network.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TUint CConnMonWlanNetwork::SecurityModeV2()
+ {
+ return iSecurityModeV2;
+ }
+
+// ---------------------------------------------------------------------------
+// Finds whether Wi-Fi Protected Setup is supported.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CConnMonWlanNetwork::IsProtectedSetupSupported()
+ {
+ TBool result( EFalse );
+ if ( iProtectedSetupSupport )
+ {
+ result = ETrue;
+ }
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
// Packages object to HBufC descriptor
// ---------------------------------------------------------------------------
//