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