|
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 _EAPTLSPEAPUICONNECTION_H_ |
|
20 #define _EAPTLSPEAPUICONNECTION_H_ |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include <d32dbms.h> |
|
25 #include <EapType.h> |
|
26 |
|
27 class CEapTlsPeapUiDataConnection; |
|
28 class CEapTlsPeapUiCipherSuites; |
|
29 class CEapTlsPeapUiCertificates; |
|
30 class CEapTlsPeapUiEapTypes; |
|
31 class MEapTlsPeapUiCertificates; |
|
32 class CPacStoreDatabase; |
|
33 |
|
34 class CEapTlsPeapUiConnection : public CBase |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 // This creates a connection between EAP plugin and the EAP UI. |
|
40 // aTunnelingType - the Vendor-Type of Tunneling EAP type. |
|
41 // aEapType - the Vendor-Type of the EAP type |
|
42 // Supported Vendor-ID here is 0x 0 (3 bytes) for both. |
|
43 |
|
44 CEapTlsPeapUiConnection( |
|
45 const TIndexType aIndexType, |
|
46 const TInt aIndex, |
|
47 const TInt aTunnelingType, |
|
48 const TInt aEapType); |
|
49 |
|
50 ~CEapTlsPeapUiConnection(); |
|
51 |
|
52 TInt Connect(); |
|
53 |
|
54 TInt Close(); |
|
55 |
|
56 CEapTlsPeapUiDataConnection * GetDataConnection(); |
|
57 |
|
58 CEapTlsPeapUiCipherSuites * GetCipherSuiteConnection(); |
|
59 |
|
60 CEapTlsPeapUiCertificates * GetCertificateConnection(MEapTlsPeapUiCertificates * const aParent); |
|
61 |
|
62 CEapTlsPeapUiEapTypes * GetEapTypeConnection(); |
|
63 |
|
64 TIndexType GetIndexType(); |
|
65 |
|
66 TInt GetIndex(); |
|
67 |
|
68 // Returns the Vendor-Type of Tunneling EAP type, in this EAP type. |
|
69 // Supported Vendor-ID here is 0x 0 (3 bytes). |
|
70 TInt GetTunnelingType(); |
|
71 |
|
72 // Returns the Vendor-Type of this EAP type. |
|
73 // Supported Vendor-ID here is 0x 0 (3 bytes). |
|
74 TInt GetEapType(); |
|
75 |
|
76 TInt GetDatabase(RDbNamedDatabase & aDatabase); |
|
77 |
|
78 // Check if there's the PAC store master key. |
|
79 // Call Connect() before doing this and Close() after. |
|
80 // Returns ETrue if there is master key. EFalse if there is not. |
|
81 TBool IsPacStoreMasterKeyPresentL(); |
|
82 |
|
83 // This destroys the PAC store if it is created already. |
|
84 // Call Connect() before doing this and Close() after. |
|
85 // Returns KErrNone if successful. Symbian error code otherwise. |
|
86 TInt DestroyPacStore(); |
|
87 |
|
88 // This check if the PAC store (or PAC store master key) can be decrypted |
|
89 // with the password provided. |
|
90 // Call Connect() before doing this and Close() after. |
|
91 // Returns ETrue if successful. |
|
92 TBool VerifyPacStorePasswordL(const TDesC& aPacStorePw); |
|
93 |
|
94 // This creates the PAC store master key with the password provided. |
|
95 // Call Connect() before doing this and Close() after. |
|
96 // Returns KErrNone if successful. Symbian error code otherwise. |
|
97 TInt CreatePacStoreMasterKey(const TDesC& aPacStorePw); |
|
98 |
|
99 CPacStoreDatabase * GetPacStoreDb(); |
|
100 |
|
101 protected: |
|
102 |
|
103 // Bearer type |
|
104 TIndexType iIndexType; |
|
105 |
|
106 // Unique index |
|
107 TInt iIndex; |
|
108 |
|
109 // This stores the Vendor-Type of Tunneling EAP type. Supported Vendor-ID here is 0x 0 (3 bytes). |
|
110 TInt iTunnelingType; |
|
111 |
|
112 // This stores the Vendor-Type of the EAP type. Supported Vendor-ID here is 0x 0 (3 bytes). |
|
113 TInt iEapType; |
|
114 |
|
115 TBool iIsConnected; |
|
116 |
|
117 // database names, handlers etc... |
|
118 |
|
119 CEapTlsPeapUiDataConnection * iDataConn; |
|
120 |
|
121 CEapTlsPeapUiCipherSuites * iCipherSuites; |
|
122 |
|
123 CEapTlsPeapUiEapTypes * iEapTypes; |
|
124 |
|
125 CEapTlsPeapUiCertificates * iCertificates; |
|
126 |
|
127 RDbNamedDatabase iDbNamedDatabase; |
|
128 |
|
129 RDbs iDbs; |
|
130 |
|
131 private: |
|
132 |
|
133 void ConnectL(); |
|
134 |
|
135 private: |
|
136 |
|
137 CPacStoreDatabase * iPacStoreDb; |
|
138 |
|
139 }; |
|
140 |
|
141 #endif |
|
142 |
|
143 // End of file |