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