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