vpnengine/ikev1lib/src/ikev1dialog.cpp
branchRCL_3
changeset 23 d1a0d37b52a1
parent 0 33413c0669b9
child 38 9f4e37332ce5
equal deleted inserted replaced
22:f1aca2058253 23:d1a0d37b52a1
     1 /*
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   234     if ( status == KErrNone ) {
   234     if ( status == KErrNone ) {
   235        TIPSecDialogOutput& resp = ResponseBuf();
   235        TIPSecDialogOutput& resp = ResponseBuf();
   236        aUserName = resp.iOutBuf;
   236        aUserName = resp.iOutBuf;
   237        aPassword = resp.iOutBuf2;      
   237        aPassword = resp.iOutBuf2;      
   238     }   
   238     }   
   239 
       
   240     return status;
       
   241 }
       
   242 
       
   243 /*--------------------------------------------------------------------
       
   244  *
       
   245  *  Get user name and password data for Legacy authentication
       
   246  *  This is a synchronous dialog which does NOT convert user name and
       
   247  *  password data into the 8-bit ASCII text
       
   248  *  Uses username cache
       
   249  *
       
   250  *---------------------------------------------------------------------*/
       
   251 TInt CIkev1Dialog::GetSyncUNPWCacheDialog(TDes& aUserName, TDes& aPassword)
       
   252 {
       
   253     TInt status = KErrGeneral;
       
   254     TIPSecDialogOutput output;
       
   255 
       
   256     TIPSecDialogInfo dialog_input(TKMDDialog::EUserPwd, 0);
       
   257     
       
   258     iInputData = CreateDialogInput(dialog_input, ETrue);// TRUE = Use user name cache       
       
   259     
       
   260     TPckgBuf<TIPSecDialogOutput> ResponseBuf(output);//create the buf to receive the response
       
   261 
       
   262     if ( iInputData )
       
   263         status = LauchSyncDialog((TPckgBuf<TIPSecDialogInfo>&)*iInputData, ResponseBuf);
       
   264     
       
   265     if ( status == KErrNone ) {
       
   266         TIPSecDialogOutput& resp = ResponseBuf();
       
   267         aUserName = resp.iOutBuf;
       
   268         aPassword = resp.iOutBuf2;      
       
   269     }
       
   270 
   239 
   271     return status;
   240     return status;
   272 }
   241 }
   273 
   242 
   274 void CIkev1Dialog::ShowErrorDialogL(TInt aDialogText, TAny *aUserInfo, MIkeDialogComplete*  aCallback )
   243 void CIkev1Dialog::ShowErrorDialogL(TInt aDialogText, TAny *aUserInfo, MIkeDialogComplete*  aCallback )