eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbUtils.h
changeset 0 c8830336c852
child 2 1c7bc153c08e
equal deleted inserted replaced
-1:000000000000 0:c8830336c852
       
     1 /*
       
     2 * Copyright (c) 2001-2006 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:  EAP and WLAN authentication protocols.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _EAPAKADBUTILS_H_
       
    20 #define _EAPAKADBUTILS_H_
       
    21 
       
    22 // INCLUDES
       
    23 #include <d32dbms.h>
       
    24 #include <EapType.h>
       
    25 #include "eap_header.h"
       
    26 
       
    27 // LOCAL CONSTANTS
       
    28 
       
    29 #ifdef SYMBIAN_SECURE_DBMS
       
    30 // For EAP AKA secure database.
       
    31 // Full path is not needed. The database eapaka.dat will be saved in the 
       
    32 // data cage path for DBMS. So it will be in "\private\100012a5\eapaka.dat" in C: drive.
       
    33 // The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
       
    34 
       
    35 _LIT(KDatabaseName, "c:eapaka.dat");
       
    36 
       
    37 _LIT(KSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
       
    38 
       
    39 #else
       
    40 
       
    41 _LIT(KDatabaseName, "c:\\system\\data\\eapaka.dat");
       
    42 
       
    43 #endif // #ifdef SYMBIAN_SECURE_DBMS
       
    44 
       
    45 _LIT(KAkaTableName, "eapaka");
       
    46 
       
    47 // CLASS DECLARATION
       
    48 class EapAkaDbUtils 
       
    49 {
       
    50 public:
       
    51 	
       
    52 	static void OpenDatabaseL(
       
    53 		RDbNamedDatabase& aDatabase, 
       
    54 		RDbs& aSession, 
       
    55 		const TIndexType aIndexType,
       
    56 		const TInt aIndex,
       
    57 		const eap_type_value_e aTunnelingType);
       
    58 
       
    59 	/**
       
    60 	* Changes the settings' index
       
    61 	*/	
       
    62 	static void SetIndexL(
       
    63 		RDbNamedDatabase& aDatabase, 		
       
    64 		const TIndexType aIndexType,
       
    65 		const TInt aIndex,
       
    66 		const eap_type_value_e aTunnelingType,
       
    67 		const TIndexType aNewIndexType,
       
    68 		const TInt aNewIndex,
       
    69 		const eap_type_value_e aNewTunnelingType);
       
    70 		
       
    71 	static void SetConfigurationL(
       
    72 		RDbNamedDatabase& aDatabase,
       
    73 		const EAPSettings& aSettings, 
       
    74 		const TIndexType aIndexType,
       
    75 		const TInt aIndex,
       
    76 		const eap_type_value_e aTunnelingType);
       
    77 
       
    78 	static void GetConfigurationL(
       
    79 		RDbNamedDatabase& aDatabase,
       
    80 		EAPSettings& aSettings, 
       
    81 		const TIndexType aIndexType,
       
    82 		const TInt aIndex,
       
    83 		const eap_type_value_e aTunnelingType);
       
    84 	
       
    85 	static void CopySettingsL(
       
    86 		RDbNamedDatabase& aDatabase, 		
       
    87 		const TIndexType aSrcIndexType,
       
    88 		const TInt aSrcIndex,
       
    89 		const eap_type_value_e aSrcTunnelingType,
       
    90 		const TIndexType aDestIndexType,
       
    91 		const TInt aDestIndex,
       
    92 		const eap_type_value_e aDestTunnelingType);
       
    93 		
       
    94 	static void DeleteConfigurationL(		
       
    95 		const TIndexType aIndexType,
       
    96 		const TInt aIndex,
       
    97 		const eap_type_value_e aTunnelingType);
       
    98 
       
    99 };
       
   100 
       
   101 #endif // _EAPAKADBUTILS_H_
       
   102 
       
   103 // End of file