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