eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_notifier.cpp
changeset 33 938269283a16
child 39 fe6b6762fccd
equal deleted inserted replaced
22:093cf0757204 33:938269283a16
       
     1 /*
       
     2 * Copyright (c) 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: EAP Auth notitier implementation
       
    15 *
       
    16 */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include <hb/hbcore/hbsymbianvariant.h>
       
    20 #include <e32debug.h> 
       
    21 #include <EapExpandedType.h> 
       
    22 #include "eap_auth_notifier.h"
       
    23 #include "eap_auth_observer.h"
       
    24 #include "eap_auth_ui_strings.h"
       
    25 
       
    26 // CONSTANTS
       
    27 const TInt KVariableLength = 30; 
       
    28 const TInt KDlgTypeStrLength = 100; 
       
    29 const TInt KMaxAuthMethodLength = 50;
       
    30 
       
    31 _LIT( KUsername, "username");
       
    32 _LIT( KAuthmethod, "authmethod");
       
    33 _LIT( KPacservername, "pacservername");
       
    34 _LIT( KPacfilename, "pacfilename");
       
    35 _LIT( KEaptype, "eaptype");
       
    36 _LIT( KMessage, "messagetxt");
       
    37 _LIT( KFastprovwaitnote, "notificationtxt");
       
    38 
       
    39 _LIT(KTypeunamepwddlg, "com.nokia.eap.usernamepassworddialog/1.0");
       
    40 _LIT(KTypepwdquerydlg, "com.nokia.eap.passwordquerydialog/1.0");
       
    41 _LIT(KTypequerydlg, "com.nokia.eap.querydialog/1.0"); 
       
    42 _LIT(KTypeinstallpacquerydlg, "com.nokia.eap.fastinstallpacquerydialog/1.0");
       
    43 _LIT(KTypepacstorepwquerydlg, "com.nokia.eap.fastpacstorepwquerydialog/1.0"); 
       
    44 _LIT(KTypemasterkeyquerydlg, "com.nokia.eap.fastcreatemasterkeyquerydialog/1.0"); 
       
    45 _LIT(KTypepacfilepwquerydlg, "com.nokia.eap.fastpacfilepwquerydialog/1.0"); 
       
    46 _LIT(KTypeprovwaitnotedlg, "com.nokia.eap.fastprovwaitnotedialog/1.0"); 
       
    47 _LIT(KTypepwdexpnotedlg,"com.nokia.eap.mschapv2passwordexpirednotedialog/1.0"); 
       
    48 _LIT(KTypeoldpwddlg,"com.nokia.eap.mschapv2oldpassworddialog/1.0"); 
       
    49 _LIT(KTypenewpwddlg,"com.nokia.eap.mschapv2newpassworddialog/1.0"); 
       
    50 _LIT(KTypeshowprovnotsuccdlg,"com.nokia.eap.fastshowprovnotsuccessnotedialog/1.0"); 
       
    51 
       
    52 // ---------------------------------------------------------
       
    53 // CEapAuthNotifier::CEapAuthNotifier()
       
    54 // ---------------------------------------------------------
       
    55 //
       
    56 CEapAuthNotifier::CEapAuthNotifier( MNotificationCallback& aClient )
       
    57     :iClient(aClient)
       
    58     {
       
    59     RDebug::Print(_L("CEapAuthNotifier::CEapAuthNotifier DLL++") );
       
    60     
       
    61     iCompleted = EFalse; 
       
    62     iCancelled = EFalse;
       
    63     iObserver = NULL;
       
    64     iDialog = NULL;
       
    65     }
       
    66 
       
    67 // ---------------------------------------------------------
       
    68 // CEapAuthNotifier::~CEapAuthNotifier()
       
    69 // ---------------------------------------------------------
       
    70 //
       
    71 CEapAuthNotifier::~CEapAuthNotifier()
       
    72     {
       
    73     RDebug::Print(_L("CEapAuthNotifier::~CEapAuthNotifier") );
       
    74     
       
    75     if ( iCancelled == EFalse )
       
    76         {
       
    77         iCompleted = ETrue;
       
    78         if ( iDialog )
       
    79             { 
       
    80             iDialog->Cancel();
       
    81             }
       
    82         }
       
    83     if ( iDialog )
       
    84         { 
       
    85         delete iDialog;
       
    86         }
       
    87     if ( iObserver )
       
    88         {
       
    89         delete iObserver;
       
    90         }
       
    91     }
       
    92 
       
    93 // ---------------------------------------------------------
       
    94 // CEapAuthNotifier* CEapAuthNotifier::NewL
       
    95 // ---------------------------------------------------------
       
    96 //
       
    97 EXPORT_C CEapAuthNotifier* CEapAuthNotifier::NewL( MNotificationCallback& aClient )
       
    98     {
       
    99     RDebug::Print(_L("CEapAuthNotifier::NewL"));
       
   100     
       
   101     CEapAuthNotifier* self = new ( ELeave ) CEapAuthNotifier( aClient );
       
   102     return self;
       
   103     }
       
   104 
       
   105 // ---------------------------------------------------------
       
   106 // void CEapAuthNotifier::StartL
       
   107 // ---------------------------------------------------------
       
   108 //
       
   109 EXPORT_C void CEapAuthNotifier::StartL( 
       
   110     EEapNotifierType aType,
       
   111     TEapDialogInfo* aEapInfo, 
       
   112     TEapExpandedType& aEapType )
       
   113     {
       
   114     TInt error;
       
   115     TBuf<KDlgTypeStrLength> EapNtfType;
       
   116     TBuf16<KMaxAuthMethodLength> authMethod;
       
   117                
       
   118     RDebug::Print(_L("CEapAuthNotifier::StartL: ENTERING"));
       
   119     
       
   120     iCancelled = EFalse;
       
   121     iCompleted = EFalse;
       
   122     iEapInfo = aEapInfo;
       
   123         
       
   124     // Observer is needed in order to get the user inputs
       
   125     iObserver = CEapAuthObserver::NewL( this, aType ); 
       
   126     iDialog = CHbDeviceDialogSymbian::NewL();
       
   127         
       
   128     //The variant map is needed to construct the dialog correctly,
       
   129     CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
       
   130     CleanupStack::PushL( map );
       
   131     
       
   132     if ( aType == EEapNotifierTypeLEapUsernamePasswordDialog )
       
   133         {
       
   134         authMethod.Copy(EapAuthUiStrings::Leap);
       
   135         SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );  
       
   136         EapNtfType.Copy(KTypeunamepwddlg);
       
   137         }   
       
   138     else if ( aType == EEapNotifierTypeGTCUsernamePasswordDialog )
       
   139         {
       
   140         authMethod.Copy(EapAuthUiStrings::EapGtc);
       
   141         SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );  
       
   142         EapNtfType.Copy(KTypeunamepwddlg);
       
   143         }   
       
   144     else if ( aType == EEapNotifierTypePapUsernamePasswordDialog )
       
   145         {
       
   146         authMethod.Copy(EapAuthUiStrings::Pap);
       
   147         SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );    
       
   148         EapNtfType.Copy(KTypeunamepwddlg);
       
   149         }   
       
   150     else if ( aType == EEapNotifierTypeEapMsChapV2UsernamePasswordDialog )
       
   151         {
       
   152         authMethod.Copy(EapAuthUiStrings::EapMschapv2);
       
   153         SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );   
       
   154         EapNtfType.Copy(KTypeunamepwddlg);
       
   155         }   
       
   156     else if ( aType == EEapNotifierTypeMsChapV2UsernamePasswordDialog )
       
   157         {
       
   158         authMethod.Copy(EapAuthUiStrings::Mschapv2);
       
   159         SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );  
       
   160         EapNtfType.Copy(KTypeunamepwddlg);
       
   161         }   
       
   162     else if ( aType == EEapNotifierTypeGTCSecurIDPasscodeQueryUidDialog )
       
   163         {
       
   164         authMethod.Copy(EapAuthUiStrings::EapGtc);
       
   165         SetPasswordQueryDataL( aEapType, map, authMethod );
       
   166         EapNtfType.Copy(KTypepwdquerydlg);
       
   167         }
       
   168     else if ( aType == EEapNotifierTypePapChallengeReplyQueryDialog )
       
   169         {
       
   170         authMethod.Copy(EapAuthUiStrings::Pap);
       
   171         SetPasswordQueryDataL( aEapType, map, authMethod );
       
   172         EapNtfType.Copy(KTypepwdquerydlg);
       
   173         }
       
   174     else if ( aType == EEapNotifierTypeGTCQueryDialog )
       
   175         {
       
   176         authMethod.Copy(EapAuthUiStrings::EapGtc);
       
   177         SetQueryDialogDataL( aEapInfo, map, authMethod );
       
   178         EapNtfType.Copy(KTypequerydlg);
       
   179         }
       
   180     else if ( aType == EEapNotifierTypePapAuthQueryDialog )
       
   181         {
       
   182         authMethod.Copy(EapAuthUiStrings::Pap);
       
   183         SetQueryDialogDataL( aEapInfo, map, authMethod );
       
   184         EapNtfType.Copy(KTypequerydlg);    
       
   185         }
       
   186     else if ( aType == EEapNotifierTypeFastInstallPacQueryDialog ) 
       
   187         {
       
   188         SetFastInstallPacQueryDialogDataL( aEapInfo, map );
       
   189         EapNtfType.Copy(KTypeinstallpacquerydlg);
       
   190         }
       
   191     else if ( aType == EEapNotifierTypeFastPacStorePwQueryDialog ) 
       
   192         {
       
   193         EapNtfType.Copy(KTypepacstorepwquerydlg);
       
   194         }
       
   195     else if ( aType == EEapNotifierTypeFastCreateMasterkeyQueryDialog ) 
       
   196         {
       
   197         EapNtfType.Copy(KTypemasterkeyquerydlg);
       
   198         }
       
   199     else if ( aType == EEapNotifierTypeFastPacFilePwQueryDialog ) 
       
   200         {
       
   201         setFastPacFileQueryPwDialogDataL( aEapInfo, map );
       
   202         EapNtfType.Copy(KTypepacfilepwquerydlg);
       
   203         }
       
   204     else if ( aType == EEapNotifierTypeFastStartAuthProvWaitNote )
       
   205         {
       
   206         setFastProvWaitNoteDialogDataL( map, ETrue );
       
   207         EapNtfType.Copy(KTypeprovwaitnotedlg);
       
   208         }
       
   209     else if ( aType == EEapNotifierTypeFastStartUnauthProvWaitNote )
       
   210         {
       
   211         setFastProvWaitNoteDialogDataL( map, EFalse );
       
   212         EapNtfType.Copy(KTypeprovwaitnotedlg);
       
   213         }   
       
   214     else if ( aType == EEapNotifierTypeMsChapV2PasswordExpiredNote )
       
   215         {
       
   216         EapNtfType.Copy(KTypepwdexpnotedlg);
       
   217         }
       
   218     else if ( aType == EEapNotifierTypeMsChapV2OldPasswordDialog )
       
   219         {
       
   220         EapNtfType.Copy(KTypeoldpwddlg);
       
   221         }
       
   222     else if ( aType == EEapNotifierTypeMsChapV2NewPasswordDialog )
       
   223         {
       
   224         EapNtfType.Copy(KTypenewpwddlg);
       
   225         }
       
   226     else if ( aType == EEapNotifierTypeFastShowProvNotSuccessNote )
       
   227         {
       
   228         EapNtfType.Copy(KTypeshowprovnotsuccdlg);
       
   229         }
       
   230 
       
   231     RDebug::Print(_L("CEapAuthNotifier::StartL: Load the Dialog NOW!"));
       
   232     // Show the dialog.
       
   233     error = iDialog->Show( EapNtfType, *map, iObserver );
       
   234     
       
   235     User::LeaveIfError( error );
       
   236     CleanupStack::PopAndDestroy( map ); 
       
   237 
       
   238     RDebug::Print(_L("CEapAuthNotifier::StartL: LEAVING") );
       
   239     }
       
   240 
       
   241 // ---------------------------------------------------------
       
   242 // void CEapAuthNotifier::setFastProvWaitNoteDialogDataL
       
   243 // ---------------------------------------------------------
       
   244 //
       
   245 void CEapAuthNotifier::setFastProvWaitNoteDialogDataL(    
       
   246     CHbSymbianVariantMap* aMap,
       
   247     TBool aAuthProvWaitNote )
       
   248     {
       
   249     TInt error;  
       
   250     TBuf<KVariableLength> key(KFastprovwaitnote);
       
   251             
       
   252     CHbSymbianVariant *variant = NULL;
       
   253     
       
   254     RDebug::Print(_L("CEapAuthNotifier::setFastProvWaitNoteDialogData: ENTERING"));    
       
   255 
       
   256     //Create the variant data information for the plugin
       
   257     variant =  CHbSymbianVariant::NewL ( &aAuthProvWaitNote, CHbSymbianVariant::EBool );
       
   258     CleanupStack::PushL( variant );
       
   259     error = aMap->Add( key, variant);
       
   260     User::LeaveIfError( error );
       
   261     CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   262     
       
   263     RDebug::Print(_L("CEapAuthNotifier::setFastProvWaitNoteDialogData: LEAVING") );
       
   264     }
       
   265 
       
   266 // ---------------------------------------------------------
       
   267 // void CEapAuthNotifier::setFastPacFileQueryPwDialogDataL
       
   268 // ---------------------------------------------------------
       
   269 //
       
   270 void CEapAuthNotifier::setFastPacFileQueryPwDialogDataL( 
       
   271     TEapDialogInfo* aEapInfo,
       
   272     CHbSymbianVariantMap* aMap )
       
   273     {
       
   274     TInt error;  
       
   275     TBuf<KVariableLength> key(KPacfilename);
       
   276                 
       
   277     CHbSymbianVariant *variant = NULL;
       
   278         
       
   279     RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: ENTERING"));
       
   280         
       
   281     if( 0 < aEapInfo->iUidata.Length() )
       
   282        {
       
   283        RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: Set PAC filename"));
       
   284        RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: aEapInfo->iUidata = %S\n"), &aEapInfo->iUidata );
       
   285         
       
   286        // Create the variant data information for the plugin
       
   287        variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUidata, CHbSymbianVariant::EDes );
       
   288        CleanupStack::PushL( variant );
       
   289        error = aMap->Add( key, variant);
       
   290        User::LeaveIfError( error );
       
   291        CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   292        }     
       
   293     RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: LEAVING") );
       
   294     }
       
   295 
       
   296 // --------------------------------------------------------------
       
   297 // void CEapAuthNotifier::SetFastInstallPacQueryDialogDataL
       
   298 // --------------------------------------------------------------
       
   299 //
       
   300 void CEapAuthNotifier::SetFastInstallPacQueryDialogDataL( 
       
   301     TEapDialogInfo* aEapInfo,
       
   302     CHbSymbianVariantMap* aMap )
       
   303     {
       
   304     TInt error;  
       
   305     TBuf<KVariableLength> key(KPacservername);
       
   306             
       
   307     CHbSymbianVariant *variant = NULL;
       
   308     
       
   309     RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: ENTERING"));
       
   310     
       
   311     if( 0 < aEapInfo->iUidata.Length() )
       
   312         {
       
   313         RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: Set PAC Install server name"));
       
   314         RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: aEapInfo->iUidata = %S\n"), &aEapInfo->iUidata );
       
   315     
       
   316         // Create the variant data information for the plugin
       
   317         variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUidata, CHbSymbianVariant::EDes );
       
   318         CleanupStack::PushL( variant );
       
   319         error = aMap->Add( key, variant);
       
   320         User::LeaveIfError( error );
       
   321         CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   322         }     
       
   323     RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: LEAVING") );
       
   324     }
       
   325 
       
   326 // ---------------------------------------------------------
       
   327 // void CEapAuthNotifier::SetQueryDialogDataL
       
   328 // ---------------------------------------------------------
       
   329 //
       
   330 void CEapAuthNotifier::SetQueryDialogDataL( 
       
   331     TEapDialogInfo* aEapInfo,
       
   332     CHbSymbianVariantMap* aMap,
       
   333     TDesC& aAuthMethod )
       
   334     {
       
   335     TInt error;  
       
   336     TBuf<KVariableLength> key1(KAuthmethod);
       
   337     TBuf<KVariableLength> key2(KMessage);
       
   338         
       
   339     CHbSymbianVariant *variant = NULL;
       
   340     
       
   341     RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: ENTERING"));
       
   342     
       
   343     RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: Set Heading"));
       
   344     RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: aAuthMethod = %S\n"), &aAuthMethod );
       
   345     
       
   346     // Create the variant data information for the plugin
       
   347     variant =  CHbSymbianVariant::NewL ( &aAuthMethod, CHbSymbianVariant::EDes );
       
   348     CleanupStack::PushL( variant );
       
   349     error = aMap->Add( key1, variant);
       
   350     User::LeaveIfError( error );
       
   351     CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   352             
       
   353     if( 0 < aEapInfo->iUidata.Length() )
       
   354         {
       
   355         RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: Set user input message"));
       
   356         RDebug::Print(_L("CEapAuthObserver::SetQueryDialogData: aEapInfo->iUidata = %S\n"), &aEapInfo->iUidata );
       
   357     
       
   358         // Create the variant data information for the plugin
       
   359         variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUidata, CHbSymbianVariant::EDes );
       
   360         CleanupStack::PushL( variant );
       
   361         error = aMap->Add( key2, variant);
       
   362         User::LeaveIfError( error );
       
   363         CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   364         }     
       
   365     RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: LEAVING") );
       
   366     }
       
   367 
       
   368 // ---------------------------------------------------------
       
   369 // void CEapAuthNotifier::SetPasswordQueryDataL
       
   370 // ---------------------------------------------------------
       
   371 //
       
   372 void CEapAuthNotifier::SetPasswordQueryDataL( 
       
   373     TEapExpandedType& aEapType,
       
   374     CHbSymbianVariantMap* aMap,
       
   375     TDesC& aAuthMethod )
       
   376     {
       
   377     TInt error;  
       
   378     TBuf<KVariableLength> key2(KAuthmethod);
       
   379     TBuf<KVariableLength> key3(KEaptype);
       
   380     CHbSymbianVariant *variant = NULL;
       
   381     
       
   382     RDebug::Print(_L("CEapAuthNotifier::SetPasswordQueryData: ENTERING"));
       
   383     RDebug::Print(_L("CEapAuthNotifier::SetPasswordQueryData: aAuthMethod = %S\n"), &aAuthMethod );
       
   384     
       
   385     //Create the variant data information for the plugin
       
   386     //Set authentication method 
       
   387     variant =  CHbSymbianVariant::NewL ( &aAuthMethod, CHbSymbianVariant::EDes );
       
   388     CleanupStack::PushL( variant );
       
   389     error = aMap->Add( key2, variant);
       
   390     User::LeaveIfError( error );
       
   391     CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   392     
       
   393     //Set EAP type
       
   394     variant =  CHbSymbianVariant::NewL( &aEapType.GetValue(), CHbSymbianVariant::EBinary );
       
   395     CleanupStack::PushL( variant );
       
   396     error = aMap->Add( key3, variant);
       
   397     User::LeaveIfError( error );
       
   398     CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.    
       
   399     RDebug::Print(_L("CEapAuthNotifier::SetPasswordQueryData: LEAVING") );
       
   400     }
       
   401 
       
   402 // ---------------------------------------------------------
       
   403 // void CEapAuthNotifier::SetUsernamePasswordDataL
       
   404 // ---------------------------------------------------------
       
   405 //
       
   406 void CEapAuthNotifier::SetUsernamePasswordDataL( 
       
   407     TEapDialogInfo* aEapInfo,
       
   408     TEapExpandedType& aEapType,
       
   409     CHbSymbianVariantMap* aMap,
       
   410     TDesC& aAuthMethod )
       
   411     {
       
   412     TInt error;  
       
   413     TBuf<KVariableLength> key1(KUsername);
       
   414     TBuf<KVariableLength> key2(KAuthmethod);
       
   415     TBuf<KVariableLength> key3(KEaptype);
       
   416     CHbSymbianVariant *variant = NULL;
       
   417     
       
   418     RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: ENTERING"));
       
   419     RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: aAuthMethod = %S\n"), &aAuthMethod );
       
   420     
       
   421     //Create the variant data information for the plugin
       
   422     //Set authentication method 
       
   423     variant =  CHbSymbianVariant::NewL ( &aAuthMethod, CHbSymbianVariant::EDes );
       
   424     CleanupStack::PushL( variant );
       
   425     error = aMap->Add( key2, variant);
       
   426     User::LeaveIfError( error );
       
   427     CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   428     
       
   429     //Set username
       
   430     if( 0 < aEapInfo->iUsername.Length() )
       
   431         {
       
   432         RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: Set default UNAME"));
       
   433         RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: iEapInfo->iUsername = %S\n"), &iEapInfo->iUsername );
       
   434     
       
   435         // Create the variant data information for the plugin
       
   436         variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUsername, CHbSymbianVariant::EDes );
       
   437         CleanupStack::PushL( variant );
       
   438         error = aMap->Add( key1, variant);
       
   439         User::LeaveIfError( error );
       
   440         CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
       
   441         }
       
   442 
       
   443     //Set EAP type
       
   444     variant =  CHbSymbianVariant::NewL( &aEapType.GetValue(), CHbSymbianVariant::EBinary );
       
   445     CleanupStack::PushL( variant );
       
   446     error = aMap->Add( key3, variant);
       
   447     User::LeaveIfError( error );
       
   448     CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.    
       
   449     RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: LEAVING") );
       
   450     }
       
   451 
       
   452 // --------------------------------------------------------------------------
       
   453 // void CEapAuthNotifier::SetSelectedUnameAndPwd( TEapDialogInfo& aEapInfo )
       
   454 // --------------------------------------------------------------------------
       
   455 //
       
   456 void CEapAuthNotifier::SetSelectedUnameAndPwd ( TEapDialogInfo& aEapInfo )
       
   457     {
       
   458     RDebug::Print(_L("CEapAuthNotifier::SetSelectedUnameAndPwd"));
       
   459     
       
   460     iEapInfo->iIsIdentityQuery = aEapInfo.iIsIdentityQuery;
       
   461     if ( aEapInfo.iIsIdentityQuery ) 
       
   462         {
       
   463         iEapInfo->iUsername = aEapInfo.iUsername;
       
   464         RDebug::Print(_L("CEapAuthNotifier::SetSelectedUnameAndPwd: iEapInfo->iUsername = %S\n"), &iEapInfo->iUsername );
       
   465         }
       
   466     
       
   467     iEapInfo->iPasswordPromptEnabled = aEapInfo.iPasswordPromptEnabled;
       
   468     if ( aEapInfo.iPasswordPromptEnabled )
       
   469         {
       
   470         iEapInfo->iPassword = aEapInfo.iPassword;
       
   471         RDebug::Print(_L("CEapAuthNotifier::SetSelectedUnameAndPwd: iEapInfo->iPassword = %S\n"), &iEapInfo->iPassword );
       
   472         }    
       
   473     }
       
   474 
       
   475 // ------------------------------------------------------------------------------
       
   476 // void CEapAuthNotifier::SetSelectedPassword( TEapDialogInfo& aPasswordInfo )
       
   477 // ------------------------------------------------------------------------------
       
   478 //
       
   479 void CEapAuthNotifier::SetSelectedPassword ( TEapDialogInfo& aPasswordInfo )
       
   480     {
       
   481     RDebug::Print(_L("CEapAuthNotifier::SetSelectedPassword"));
       
   482 
       
   483     iEapInfo->iPassword = aPasswordInfo.iPassword;
       
   484     RDebug::Print(_L("CEapAuthNotifier::SetSelectedPassword: iEapInfo->iPassword = %S\n"), &iEapInfo->iPassword );    
       
   485     }
       
   486 
       
   487 // ---------------------------------------------------------------------------------
       
   488 // void CEapAuthNotifier::SetSelectedOldPassword( TEapDialogInfo& aPasswordInfo )
       
   489 // ---------------------------------------------------------------------------------
       
   490 //
       
   491 void CEapAuthNotifier::SetSelectedOldPassword ( TEapDialogInfo& aPasswordInfo )
       
   492     {
       
   493     RDebug::Print(_L("CEapAuthNotifier::SetSelectedOldPassword"));
       
   494 
       
   495     iEapInfo->iOldPassword = aPasswordInfo.iOldPassword;
       
   496     RDebug::Print(_L("CEapAuthNotifier::SetSelectedOldPassword: iEapInfo->iOldPassword = %S\n"), &iEapInfo->iOldPassword );    
       
   497     }
       
   498 
       
   499 // ---------------------------------------------------------
       
   500 // void CEapAuthNotifier::CompleteL( TInt aStatus )
       
   501 // ---------------------------------------------------------
       
   502 //
       
   503 void CEapAuthNotifier::CompleteL( TInt aStatus )
       
   504     {
       
   505     RDebug::Print(_L("CEapAuthNotifier::CompleteL"));
       
   506     
       
   507     if ( !iCompleted )
       
   508         {
       
   509         iClient.DlgComplete(aStatus);
       
   510         iCompleted = ETrue;
       
   511         }
       
   512     }
       
   513 
       
   514 // ------------------------------------------------------------
       
   515 // void CEapAuthNotifier::Cancel()
       
   516 // ------------------------------------------------------------
       
   517 //
       
   518 EXPORT_C void CEapAuthNotifier::Cancel()
       
   519     {
       
   520     RDebug::Print(_L("CEapAuthNotifier::Cancel"));
       
   521     if ( !iCompleted )
       
   522         {
       
   523         iCancelled = ETrue;
       
   524         iDialog->Cancel();
       
   525         }
       
   526     }