wlansecuritysettings/wpasecuritysettingsui/src/WPASecuritySettings.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 CWPASecuritySettings.     
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 
       
    21 #include "WPASecuritySettingsImpl.h"
       
    22 #include "WPASecuritySettingsUiImpl.h"
       
    23 
       
    24 #include <WPASecuritySettingsUI.h>
       
    25 
       
    26 
       
    27 
       
    28 // ================= MEMBER FUNCTIONS =======================
       
    29 
       
    30 // ---------------------------------------------------------
       
    31 // CWPASecuritySettings::NewL
       
    32 // ---------------------------------------------------------
       
    33 //
       
    34 EXPORT_C CWPASecuritySettings* CWPASecuritySettings::NewL( 
       
    35                                                 TSecurityMode aSecurityMode )
       
    36     {
       
    37     CWPASecuritySettings* settings = new ( ELeave ) CWPASecuritySettings();
       
    38     CleanupStack::PushL( settings );
       
    39     settings->iImpl = CWPASecuritySettingsImpl::NewL( aSecurityMode );
       
    40     CleanupStack::Pop( settings ); 
       
    41     return settings;    
       
    42     }
       
    43 
       
    44 
       
    45 // ---------------------------------------------------------
       
    46 // CWPASecuritySettings::~CWPASecuritySettings
       
    47 // ---------------------------------------------------------
       
    48 //
       
    49 EXPORT_C CWPASecuritySettings::~CWPASecuritySettings()
       
    50     {
       
    51     delete iImpl;
       
    52     }
       
    53 
       
    54 
       
    55 // ---------------------------------------------------------
       
    56 // CWPASecuritySettings::LoadL
       
    57 // ---------------------------------------------------------
       
    58 //
       
    59 EXPORT_C void CWPASecuritySettings::LoadL( TUint32 aIapId, 
       
    60                                            CCommsDatabase& aCommsDb )
       
    61     {
       
    62     iImpl->LoadL( aIapId, aCommsDb );
       
    63     iImpl->SetIapId( aIapId );
       
    64     }
       
    65 
       
    66 
       
    67 // ---------------------------------------------------------
       
    68 // CWPASecuritySettings::SaveL
       
    69 // ---------------------------------------------------------
       
    70 //
       
    71 EXPORT_C void CWPASecuritySettings::SaveL( TUint32 aIapId, 
       
    72                                            CCommsDatabase& aCommsDb, 
       
    73                                            TTypeOfSaving aTypeOfSaving, 
       
    74                                            TUint32 aOldIapId ) const
       
    75     {
       
    76     iImpl->SaveL( aIapId, aCommsDb, aTypeOfSaving, aOldIapId );
       
    77     }
       
    78     
       
    79 
       
    80 // ---------------------------------------------------------
       
    81 // CWPASecuritySettings::EditL
       
    82 // ---------------------------------------------------------
       
    83 //
       
    84 EXPORT_C TInt CWPASecuritySettings::EditL( CWPASecuritySettingsUi& aUi,
       
    85                                            const TDesC& aTitle )
       
    86     {
       
    87     return aUi.iImpl->EditL( *iImpl, aTitle );
       
    88     }
       
    89 
       
    90 
       
    91 // ---------------------------------------------------------
       
    92 // CWPASecuritySettings::DeleteL
       
    93 // ---------------------------------------------------------
       
    94 //
       
    95 EXPORT_C void CWPASecuritySettings::DeleteL( TUint32 aIapId ) const
       
    96     {
       
    97     iImpl->DeleteL( aIapId );
       
    98     }
       
    99 
       
   100 
       
   101 // ---------------------------------------------------------
       
   102 // CWPASecuritySettings::IsValid
       
   103 // ---------------------------------------------------------
       
   104 //
       
   105 EXPORT_C TBool CWPASecuritySettings::IsValid() const
       
   106     {
       
   107     return iImpl->IsValid();
       
   108     }
       
   109 
       
   110 
       
   111 // ---------------------------------------------------------
       
   112 // CWPASecuritySettings::SetWPAPreSharedKey
       
   113 // ---------------------------------------------------------
       
   114 //
       
   115 EXPORT_C TInt CWPASecuritySettings::SetWPAPreSharedKey( 
       
   116                                                 const TDesC& aPreSharedKey )
       
   117     {
       
   118     return iImpl->SetWPAPreSharedKey( aPreSharedKey );
       
   119     }
       
   120 
       
   121 
       
   122 // ---------------------------------------------------------
       
   123 // CWPASecuritySettings::LoadL
       
   124 // ---------------------------------------------------------
       
   125 //
       
   126 EXPORT_C void CWPASecuritySettings::LoadL( TUint32 aIapId, 
       
   127                                            CMDBSession& aSession )
       
   128     {
       
   129     iImpl->LoadL( aIapId, aSession );
       
   130     iImpl->SetIapId( aIapId );
       
   131     }
       
   132     
       
   133     
       
   134 // ---------------------------------------------------------
       
   135 // CWPASecuritySettings::SaveL
       
   136 // ---------------------------------------------------------
       
   137 //
       
   138 EXPORT_C void CWPASecuritySettings::SaveL( TUint32 aIapId,
       
   139                                            CMDBSession& aSession,
       
   140                                            TTypeOfSaving aTypeOfSaving,
       
   141                                            TUint32 aOldIapId ) const
       
   142     {
       
   143     iImpl->SaveL( aIapId, aSession, aTypeOfSaving, aOldIapId );
       
   144     }
       
   145 
       
   146 
       
   147 // ---------------------------------------------------------
       
   148 // CWPASecuritySettings::SaveL
       
   149 // ---------------------------------------------------------
       
   150 //
       
   151 EXPORT_C TInt CWPASecuritySettings::SetWPAEnabledEAPPlugin( 
       
   152                                             const TDesC8& aEnabledPluginList )
       
   153     {
       
   154     return iImpl->SetWPAEnabledEAPPlugin( aEnabledPluginList );
       
   155     }
       
   156 
       
   157 // ---------------------------------------------------------
       
   158 // CWPASecuritySettings::SaveL
       
   159 // ---------------------------------------------------------
       
   160 //
       
   161 EXPORT_C TInt CWPASecuritySettings::SetWPADisabledEAPPlugin( 
       
   162                                             const TDesC8& aDisabledPluginList )
       
   163     {
       
   164     return iImpl->SetWPADisabledEAPPlugin( aDisabledPluginList );
       
   165     }
       
   166         
       
   167 
       
   168 // End of File