--- a/wlansecuritysettings/wpasecuritysettingsui/src/WPASecuritySettingsDlg.cpp Mon Jun 21 15:44:11 2010 +0300
+++ b/wlansecuritysettings/wpasecuritysettingsui/src/WPASecuritySettingsDlg.cpp Thu Aug 19 09:58:27 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: tr1cfwln#31 %
+* %version: tr1cfwln#33 %
*/
// INCLUDE FILES
@@ -115,20 +115,22 @@
{
CleanupStack::PushL( this );
- const TInt Titles_Wpa_Main[KNumOfFieldsMain+1] =
+ const TInt Titles_Wpa_Main[KNumOfFieldsMain+2] =
{
R_WPA_MODE,
R_WPA_EAP_CONFIG,
R_WPA_MODE_PRESHARED_KEY,
- R_WPA_TKIP_CIPHER
+ R_WPA_TKIP_CIPHER,
+ R_WPA_UNENCRYPTED_CONN
};
- const TInt Fields_Wpa_Main[KNumOfFieldsMain+1] =
+ const TInt Fields_Wpa_Main[KNumOfFieldsMain+2] =
{
EWpaMode,
EWpaEapConfig,
EWpaPreSharedKey,
- EWpaWpa2Only
+ EWpaWpa2Only,
+ EWpaUnencryptedConn
};
iSecuritySettings = aSecuritySettings;
@@ -383,7 +385,13 @@
default:
{
- __ASSERT_DEBUG( EFalse, Panic( EUnknownCase ) );
+ // New events like
+ // EEventPanningStarted
+ // EEventPanningStopped
+ // EEventFlickStarted
+ // EEventFlickStopped
+ // EEventEmptyListClicked
+ // EEventEmptyAreaClicked
break;
};
};
@@ -459,6 +467,14 @@
for( TInt i = 0; i < numOfFields; i++ )
{
+ // 802.1x has no WpaMode (PSK not supported) and no Wpa2Only selection
+ if ( iSecuritySettings->SecurityMode() == ESecurityMode8021x &&
+ (*wpaMember == EWpaMode ||*wpaMember == EWpaWpa2Only ) )
+ {
+ wpaMember++;
+ aRes++;
+ }
+ // If PSK in use, EAP plug-in configuration is not shown
if ( *wpaMember == EWpaEapConfig && iSecuritySettings->WPAMode() )
{
wpaMember++;
@@ -484,15 +500,20 @@
CleanupStack::PopAndDestroy( 2, title ); // itemText, title
+ // If Eap in use, PreSharedKey is not shown
wpaMember++;
aRes++;
}
- else // EWpaMode, EWpaPreSharedKey, EWpaWpa2Only:
+ else // EWpaMode, EWpaPreSharedKey, EWpaWpa2Only, EWpaUnencryptedConn:
{
- HBufC* itemText = CreateTextualListBoxItemL( *wpaMember, *aRes );
- CleanupStack::PushL( itemText );
- aItemArray.AppendL( itemText->Des() );
- CleanupStack::PopAndDestroy( itemText );
+ if (( *wpaMember != EWpaUnencryptedConn ) ||
+ (FeatureManager::FeatureSupported( KFeatureIdFfWlanAuthenticationOnlySupport ) ) )
+ {
+ HBufC* itemText = CreateTextualListBoxItemL( *wpaMember, *aRes );
+ CleanupStack::PushL( itemText );
+ aItemArray.AppendL( itemText->Des() );
+ CleanupStack::PopAndDestroy( itemText );
+ }
}
wpaMember++;
@@ -579,6 +600,13 @@
break;
}
+ case EWpaUnencryptedConn:
+ {
+ valueResourceID = iSecuritySettings->WPAUnencryptedConn() ?
+ R_WPA_UNENCRYPTED_CONN_ALLOW : R_WPA_UNENCRYPTED_CONN_NOT_ALLOW;
+ break;
+ }
+
case EWpaPreSharedKey:
{
valueResourceID =
@@ -645,9 +673,19 @@
{
TInt currvalue( 0 );
TBool retval( EFalse );
+ TInt attr_resid( 0 );
+
CDesCArrayFlat* items = FillPopupSettingPageLC( aData, currvalue );
- TInt attr_resid = aData == EWpaMode ? R_WPA_MODE : R_WPA_TKIP_CIPHER;
+
+ if ( aData == EWpaUnencryptedConn)
+ {
+ attr_resid = R_WPA_UNENCRYPTED_CONN;
+ }
+ else
+ {
+ attr_resid = aData == EWpaMode ? R_WPA_MODE : R_WPA_TKIP_CIPHER;
+ }
HBufC* titlebuf = iEikonEnv->AllocReadResourceLC( attr_resid );
CAknRadioButtonSettingPage* dlg = new ( ELeave )CAknRadioButtonSettingPage(
@@ -781,7 +819,7 @@
R_WPA_MODE_PRESHARED_KEY ) );
CleanupStack::PopAndDestroy();
}
- else // EWpaWpa2Only:
+ else if ( aData == EWpaWpa2Only )
{
items->AppendL( *iEikonEnv->AllocReadResourceLC(
R_WPA_CIPHER_ALLOWED ) );
@@ -792,7 +830,18 @@
aCurrvalue = iSecuritySettings->Wpa2Only();
}
+ else // EWpaUnencryptedConn
+ {
+ items->AppendL( *iEikonEnv->AllocReadResourceLC(
+ R_WPA_UNENCRYPTED_CONN_NOT_ALLOW ) );
+ CleanupStack::PopAndDestroy();
+ items->AppendL( *iEikonEnv->AllocReadResourceLC(
+ R_WPA_UNENCRYPTED_CONN_ALLOW ) );
+ CleanupStack::PopAndDestroy();
+ aCurrvalue = iSecuritySettings->WPAUnencryptedConn();
+ }
+
return items;
}
@@ -819,7 +868,7 @@
retVal = ETrue;
}
}
- else // EWpaWpa2Only:
+ else if ( aData == EWpaWpa2Only )
{
if ( iSecuritySettings->Wpa2Only() != aCurrvalue )
{
@@ -827,6 +876,14 @@
retVal = ETrue;
}
}
+ else // EWpaUnencryptedConn
+ {
+ if ( iSecuritySettings->WPAUnencryptedConn() != aCurrvalue )
+ {
+ iSecuritySettings->SetWPAUnencryptedConn( aCurrvalue );
+ retVal = ETrue;
+ }
+ }
return retVal;
}
@@ -858,10 +915,18 @@
itemIndex = ( Max( iList->CurrentItemIndex(), 0 ) );
- shift = ( itemIndex >= EWpaWpa2Only ||
- ( itemIndex == EWpaEapConfig &&
- iSecuritySettings->WPAMode() ) ) ? 1 : 0;
-
+ //In 802.1x the first item is EapConfig and second item is UncryptedConn
+ if (iSecuritySettings->SecurityMode() == ESecurityMode8021x)
+ {
+ shift = ( itemIndex == EWpaMode ) ? 1 : 3;
+ }
+ else
+ {
+ shift = ( itemIndex >= EWpaWpa2Only ||
+ ( itemIndex == EWpaEapConfig &&
+ iSecuritySettings->WPAMode() ) ) ? 1 : 0;
+ }
+
TWpaMember* ptr = iFieldsMain + itemIndex + shift;
TInt* titPtr = iTitlesMain + itemIndex + shift;
@@ -924,6 +989,27 @@
break;
}
+ case EWpaUnencryptedConn:
+ { // Setting item with two available values
+ TBool changed( ETrue );
+ if ( aQuick )
+ {
+ iSecuritySettings->SetWPAUnencryptedConn(
+ !iSecuritySettings->WPAUnencryptedConn() );
+ }
+ else
+ {
+ changed = ShowPopupSettingPageL( EWpaUnencryptedConn );
+ }
+
+ if ( changed )
+ {
+ UpdateTextualListBoxItemL( *ptr, *titPtr, itemIndex );
+ *iEventStore |= CWPASecuritySettings::EModified;
+ }
+ break;
+ }
+
case EWpaPreSharedKey:
{ // Text setting item
if ( ShowPopupTextSettingPageL() )