wlansecuritysettings/wpasecuritysettingsui/src/WPASecuritySettingsUiImpl.cpp
branchRCL_3
changeset 46 c74b3d9f6b9e
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
       
     1 /*
       
     2 * Copyright (c) 2001-2009 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 the License "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: Implementation of class CWPASecuritySettingsUiImpl. 
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: tr1cfwln#11 %
       
    20 */
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include "WPASecuritySettingsUiImpl.h"
       
    24 #include "WPASecuritySettingsDlg.h"
       
    25 #include "WPASecuritySettingsImpl.h"
       
    26 
       
    27 #include <bautils.h>
       
    28 #include <WPASecuritySettingsUI.h>
       
    29 
       
    30 #include <data_caging_path_literals.hrh>
       
    31 
       
    32 
       
    33 // CONSTANTS
       
    34 _LIT( KDriveZ, "z:" );                                    // ROM folder
       
    35 _LIT( KResourceFileName, "WPASecuritySettingsUI.rsc" );   // RSC file name.
       
    36 
       
    37 
       
    38 // ================= MEMBER FUNCTIONS =======================
       
    39 
       
    40 // ---------------------------------------------------------
       
    41 // CWPASecuritySettingsUiImpl::NewL
       
    42 // ---------------------------------------------------------
       
    43 //
       
    44 CWPASecuritySettingsUiImpl* CWPASecuritySettingsUiImpl::NewL( 
       
    45                                                         CEikonEnv& aEikEnv )
       
    46     {
       
    47     CWPASecuritySettingsUiImpl* uiImpl = 
       
    48                         new( ELeave ) CWPASecuritySettingsUiImpl( aEikEnv );
       
    49     CleanupStack::PushL( uiImpl );
       
    50     uiImpl->ConstructL();
       
    51     CleanupStack::Pop( uiImpl ); // uiImpl
       
    52     return uiImpl;
       
    53     }
       
    54 
       
    55 
       
    56 // ---------------------------------------------------------
       
    57 // CWPASecuritySettingsUiImpl::CWPASecuritySettingsUiImpl
       
    58 // ---------------------------------------------------------
       
    59 //
       
    60 CWPASecuritySettingsUiImpl::CWPASecuritySettingsUiImpl( CEikonEnv& aEikEnv )
       
    61 : iEventStore( ENone ), 
       
    62   iEikEnv( &aEikEnv )
       
    63     {
       
    64     }
       
    65 
       
    66 
       
    67 // ---------------------------------------------------------
       
    68 // CWPASecuritySettingsUiImpl::~CWPASecuritySettingsUiImpl
       
    69 // ---------------------------------------------------------
       
    70 //
       
    71 CWPASecuritySettingsUiImpl::~CWPASecuritySettingsUiImpl()
       
    72     {
       
    73     if ( iResOffset )
       
    74         {
       
    75         iEikEnv->DeleteResourceFile( iResOffset );
       
    76         }
       
    77     }
       
    78 
       
    79 
       
    80 
       
    81 // ---------------------------------------------------------
       
    82 // CWPASecuritySettingsUiImpl::ConstructL
       
    83 // ---------------------------------------------------------
       
    84 //
       
    85 void CWPASecuritySettingsUiImpl::ConstructL()
       
    86     {
       
    87     TFileName fileName;
       
    88 
       
    89     fileName.Append( KDriveZ );
       
    90     fileName.Append( KDC_RESOURCE_FILES_DIR );
       
    91     fileName.Append( KResourceFileName );
       
    92 
       
    93     BaflUtils::NearestLanguageFile( iEikEnv->FsSession(), fileName );
       
    94     iResOffset = iEikEnv->AddResourceFileL( fileName );
       
    95     }
       
    96 
       
    97 
       
    98 
       
    99 // ---------------------------------------------------------
       
   100 // CWPASecuritySettingsUiImpl::EditL
       
   101 // ---------------------------------------------------------
       
   102 //
       
   103 TInt CWPASecuritySettingsUiImpl::EditL( CWPASecuritySettingsImpl& aSettings,
       
   104                                         const TDesC& aTitle )
       
   105     {
       
   106     iEventStore = ENone;
       
   107 
       
   108     CWPASecuritySettingsDlg* secSettDlg = 
       
   109                         CWPASecuritySettingsDlg::NewL( iEventStore, 
       
   110                                                        aSettings.IapId(), 
       
   111                                                        aSettings.Plugin() );
       
   112     secSettDlg->ConstructAndRunLD( &aSettings, aTitle );
       
   113 
       
   114     return iEventStore;
       
   115     }
       
   116 
       
   117 
       
   118 // End of File