eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbUtils.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 
       
    20 #ifndef EAPGTCDBUTILS_H
       
    21 #define EAPGTCDBUTILS_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <d32dbms.h>
       
    25 #include <EapType.h>
       
    26 #include "eap_header.h"
       
    27 
       
    28 // LOCAL CONSTANTS
       
    29 
       
    30 #ifdef SYMBIAN_SECURE_DBMS
       
    31 // For EAP GTC secure database.
       
    32 // Full path is not needed. The database eapgtc.dat will be saved in the 
       
    33 // data cage path for DBMS. So it will be in "\private\100012a5\eapgtc.dat" in C: drive.
       
    34 // The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
       
    35 
       
    36 _LIT(KGtcDatabaseName, "c:eapgtc.dat");
       
    37 
       
    38 _LIT(KGtcSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
       
    39 
       
    40 #else
       
    41 
       
    42 _LIT(KGtcDatabaseName, "c:\\system\\data\\eapgtc.dat");
       
    43 
       
    44 #endif // #ifdef SYMBIAN_SECURE_DBMS
       
    45 
       
    46 _LIT(KGtcTableName, "eapgtc");
       
    47 
       
    48 // CLASS DECLARATION
       
    49 class EapGtcDbUtils 
       
    50 {
       
    51 public:
       
    52 	
       
    53 	/**
       
    54 	* Opens database
       
    55 	* @param aDatabase Handle to database
       
    56 	* @param aSession Handle to session
       
    57 	* @param aIndexType Bearer type
       
    58 	* @param aIndex Index
       
    59 	*/
       
    60 	static void OpenDatabaseL(
       
    61 		RDbNamedDatabase& aDatabase, 
       
    62 		RDbs& aSession, 
       
    63 		const TIndexType aIndexType,
       
    64 		const TInt aIndex,
       
    65 		const eap_type_value_e aTunnelingType);
       
    66 	
       
    67 	/**
       
    68 	* Changes the settings' index
       
    69 	*/	
       
    70 	static void SetIndexL(
       
    71 		RDbNamedDatabase& aDatabase, 		
       
    72 		const TIndexType aIndexType,
       
    73 		const TInt aIndex,
       
    74 		const eap_type_value_e aTunnelingType,
       
    75 		const TIndexType aNewIndexType,
       
    76 		const TInt aNewIndex,
       
    77 		const eap_type_value_e aNewTunnelingType);
       
    78 		
       
    79 	static void SetConfigurationL(
       
    80 		RDbNamedDatabase& aDatabase,
       
    81 		const EAPSettings& aSettings, 
       
    82 		const TIndexType aIndexType,
       
    83 		const TInt aIndex,
       
    84 		const eap_type_value_e aTunnelingType);
       
    85 
       
    86 	static void GetConfigurationL(
       
    87 		RDbNamedDatabase& aDatabase,
       
    88 		EAPSettings& aSettings, 
       
    89 		const TIndexType aIndexType,
       
    90 		const TInt aIndex,
       
    91 		const eap_type_value_e aTunnelingType);
       
    92 		
       
    93 	static void CopySettingsL(
       
    94 		RDbNamedDatabase& aDatabase, 		
       
    95 		const TIndexType aSrcIndexType,
       
    96 		const TInt aSrcIndex,
       
    97 		const eap_type_value_e aSrcTunnelingType,
       
    98 		const TIndexType aDestIndexType,
       
    99 		const TInt aDestIndex,
       
   100 		const eap_type_value_e aDestTunnelingType);
       
   101 		
       
   102 	static void DeleteConfigurationL(		
       
   103 		const TIndexType aIndexType,
       
   104 		const TInt aIndex,
       
   105 		const eap_type_value_e aTunnelingType);
       
   106 
       
   107 };
       
   108 
       
   109 #endif // EAPGTCBUTILS_H
       
   110 
       
   111 // End of File