wlansecuritysettings/wlaneapsettingsui/EapPeap/ConfigUi/src/EapPeapUiView.cpp
branchRCL_3
changeset 9 aa67149e0134
parent 6 7b8801c4c2d9
equal deleted inserted replaced
8:66f897dce0dc 9:aa67149e0134
    14 * Description: Implementation of EAP PEAP UI settings dialog
    14 * Description: Implementation of EAP PEAP UI settings dialog
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: 37.1.8 %
    19 * %version: 37.1.8.1.1 %
    20 */
    20 */
    21 
    21 
    22 // INCLUDE FILES
    22 // INCLUDE FILES
    23 #include <eikdialg.h>
    23 #include <eikdialg.h>
    24 #include <AknDialog.h>
    24 #include <AknDialog.h>
   409              TryExitL( EAknCmdExit );
   409              TryExitL( EAknCmdExit );
   410              }   
   410              }   
   411      }
   411      }
   412 
   412 
   413 
   413 
       
   414 // -----------------------------------------------------------------------------
       
   415 // CleanupImplArray
       
   416 // -----------------------------------------------------------------------------
       
   417 //
       
   418 static void CleanupResetAndDestroy( TAny* aAny )
       
   419 {
       
   420 	RImplInfoPtrArray* implArray = 
       
   421 		reinterpret_cast<RImplInfoPtrArray*>( aAny );
       
   422 
       
   423 	implArray->ResetAndDestroy();
       
   424 	implArray->Close();
       
   425 }
       
   426 
   414 // ---------------------------------------------------------
   427 // ---------------------------------------------------------
   415 // CEapPeapUiDialog::ConfigureL
   428 // CEapPeapUiDialog::ConfigureL
   416 // ---------------------------------------------------------
   429 // ---------------------------------------------------------
   417 //
   430 //
   418 void CEapPeapUiDialog::ConfigureL( TBool aQuick )
   431 void CEapPeapUiDialog::ConfigureL( TBool aQuick )
   419     {
   432     {
   420     RImplInfoPtrArray eapArray;
   433     RImplInfoPtrArray eapArray;
   421     eapArray.Reset();
   434     eapArray.Reset();
   422 
   435 
       
   436 	CleanupStack::PushL( TCleanupItem( CleanupResetAndDestroy, &eapArray ) );
       
   437 
   423     REComSession::ListImplementationsL( KEapTypeInterfaceUid, 
   438     REComSession::ListImplementationsL( KEapTypeInterfaceUid, 
   424                                         eapArray );
   439                                         eapArray );
       
   440 
   425     TInt itemIndex = iEapTypesListBox->CurrentItemIndex();    
   441     TInt itemIndex = iEapTypesListBox->CurrentItemIndex();    
   426     TInt eapIndex( 0 );
   442     TInt eapIndex( 0 );
   427     for ( TInt i = 0; i < eapArray.Count(); i++ )
   443     for ( TInt i = 0; i < eapArray.Count(); i++ )
   428         {
   444         {
   429         CImplementationInformation* tempInfo = eapArray[i];
   445         CImplementationInformation* tempInfo = eapArray[i];
   436         }        
   452         }        
   437 
   453 
   438     CEapType* eapType;
   454     CEapType* eapType;
   439     eapType = CEapType::NewL( eapArray[eapIndex]->DataType(), 
   455     eapType = CEapType::NewL( eapArray[eapIndex]->DataType(), 
   440                               iIndexType, iIndex );
   456                               iIndexType, iIndex );
   441     eapArray.ResetAndDestroy();
   457 
       
   458 	CleanupStack::PopAndDestroy(); // eapArray
       
   459 
   442     eapType->SetTunnelingType( KEapPeapId );
   460     eapType->SetTunnelingType( KEapPeapId );
   443     CleanupStack::PushL( eapType );
   461     CleanupStack::PushL( eapType );
   444     TInt buttonId = eapType->InvokeUiL();
   462     TInt buttonId = eapType->InvokeUiL();
   445     CleanupStack::PopAndDestroy( eapType );
   463     CleanupStack::PopAndDestroy( eapType );
   446 
   464