1 /* |
|
2 * Copyright (c) 2009-2010 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: 26 % |
|
20 */ |
|
21 |
|
22 #if !defined(_EAP_AM_GENERAL_SETTINGS_SYMBIAN_H_) |
|
23 #define _EAP_AM_GENERAL_SETTINGS_SYMBIAN_H_ |
|
24 |
|
25 #include "eap_tools.h" |
|
26 #include "eap_status.h" |
|
27 #include "eap_am_export.h" |
|
28 #include "eap_expanded_type.h" |
|
29 #include "eap_array.h" |
|
30 #include "eap_database_reference_if.h" |
|
31 #include "eap_am_general_settings.h" |
|
32 #include "eap_process_tlv_message_data.h" |
|
33 #include <d32dbms.h> |
|
34 #include <AbsEapCertificateFetcher.h> |
|
35 #include <implementationinformation.h> |
|
36 |
|
37 class eap_method_settings_c; |
|
38 class CEapTlsPeapCertFetcher; |
|
39 |
|
40 /** @file */ |
|
41 |
|
42 /// This class is the common part of EAP message interface. |
|
43 /// This class is interface to the message creation and parsing function. |
|
44 class EAP_EXPORT eap_am_general_settings_symbian_c |
|
45 : public eap_am_general_settings_c |
|
46 , public CAbsEapCertificateFetcher |
|
47 { |
|
48 |
|
49 public: |
|
50 |
|
51 // ---------------------------------------------------------------------- |
|
52 |
|
53 eap_am_general_settings_symbian_c( |
|
54 abs_eap_am_tools_c * const tools, |
|
55 abs_eap_am_general_settings_c * const partner); |
|
56 |
|
57 eap_am_general_settings_symbian_c( |
|
58 abs_eap_am_tools_c * const tools); |
|
59 |
|
60 virtual ~eap_am_general_settings_symbian_c(); |
|
61 |
|
62 bool get_is_valid(); |
|
63 |
|
64 // This is documented in abs_eap_stack_interface_c::configure(). |
|
65 eap_status_e configure(); |
|
66 |
|
67 // This is documented in abs_eap_stack_interface_c::shutdown(). |
|
68 eap_status_e shutdown(); |
|
69 |
|
70 eap_status_e get_eap_methods(const eap_method_settings_c * const internal_settings); |
|
71 |
|
72 eap_status_e set_eap_methods(const eap_method_settings_c * const internal_settings); |
|
73 |
|
74 eap_status_e get_certificate_lists(const eap_method_settings_c * const internal_settings); |
|
75 |
|
76 eap_status_e delete_all_eap_settings(const eap_method_settings_c * const internal_settings); |
|
77 |
|
78 eap_status_e copy_all_eap_settings(const eap_method_settings_c * const internal_settings); |
|
79 |
|
80 |
|
81 void CompleteReadCertificatesL( |
|
82 const RPointerArray<EapCertificateEntry>& aUserCerts, |
|
83 const RPointerArray<EapCertificateEntry>& aCACerts); |
|
84 |
|
85 // This function reads synchronously enabled and disabled EAP-methods from database. |
|
86 // This function is used only by EAP-SERVER directly. |
|
87 // Use constructor without partner parameter. |
|
88 eap_status_e read_eap_methods_synchronously( |
|
89 const TUint indexType, |
|
90 const TUint index, |
|
91 eap_array_c<eap_type_value_e> * const aEnabledEapMethodsArray, |
|
92 eap_array_c<eap_type_value_e> * const aDisabledEapMethodsArray); |
|
93 |
|
94 // ---------------------------------------------------------------------- |
|
95 |
|
96 private: |
|
97 |
|
98 // ---------------------------------------------------------------------- |
|
99 |
|
100 abs_eap_am_tools_c * const m_am_tools; |
|
101 |
|
102 abs_eap_am_general_settings_c * m_partner; |
|
103 |
|
104 bool m_is_valid; |
|
105 |
|
106 /// Function shutdown() is called already. |
|
107 bool m_shutdown_was_called; |
|
108 |
|
109 RDbNamedDatabase iGeneralSettingsDb; |
|
110 RFs iGeneralSettingsFileServerSession; |
|
111 |
|
112 TBool iGeneralSettingsDbCreated; |
|
113 TBool iGeneralSettingsSessionOpened; |
|
114 |
|
115 CEapTlsPeapCertFetcher * iCertificateFetcher; |
|
116 |
|
117 /// Status of the operation. |
|
118 eap_status_e m_completion_status; |
|
119 |
|
120 /// Specifies the EAP-method these settings are for. |
|
121 eap_type_value_e m_EAPType; |
|
122 |
|
123 /// Specifies the index type (bearer protocol) these settings are for. |
|
124 /// Values are ELan or EVpn. |
|
125 u32_t m_IndexType; |
|
126 |
|
127 /// Specifies unique index in the settings of the bearer protocol. |
|
128 u32_t m_Index; |
|
129 |
|
130 // ---------------------------------------------------------------------- |
|
131 |
|
132 void CloseGeneralSettings(); |
|
133 |
|
134 void OpenGeneralSettingsL(); |
|
135 |
|
136 void CreateGeneralSettingsL(); |
|
137 |
|
138 void GetGeneralSettingsLongBinaryL( |
|
139 RDbView &aViev, |
|
140 const TDesC &aColName, |
|
141 HBufC8** const aMethods); |
|
142 |
|
143 void GetGeneralSettingsDataL( |
|
144 const TUint indexType, |
|
145 const TUint index, |
|
146 HBufC8** const aEnabledEapMethods, |
|
147 HBufC8** const aDisabledEapMethods); |
|
148 |
|
149 |
|
150 void SetGeneralSettingsLongBinaryL( |
|
151 RDbView &aViev, |
|
152 const TDesC &aColName, |
|
153 const TDesC8& aMethods); |
|
154 |
|
155 void SetGeneralSettingsDataL( |
|
156 const TUint indexType, |
|
157 const TUint index, |
|
158 const TDesC8& aEnabledEapMethods, |
|
159 const TDesC8& aDisabledEapMethods); |
|
160 |
|
161 void DeleteGeneralSettingsDataL( |
|
162 const TUint indexType, |
|
163 const TUint index); |
|
164 |
|
165 void CopyGeneralSettingsDataL( |
|
166 const TUint aSourceIndexType, |
|
167 const TUint aSourceIndex, |
|
168 const TUint aDestinationIndexType, |
|
169 const TUint aDestinationIndex); |
|
170 |
|
171 eap_status_e error_complete( |
|
172 const eap_status_e completion_status, |
|
173 const eap_method_settings_c * const internal_settings, |
|
174 const eap_tlv_message_type_function_e error_completion_function); |
|
175 |
|
176 eap_status_e filter_eap_methods( |
|
177 eap_array_c<eap_type_value_e> * const disabled_eap_methods, |
|
178 RPointerArray<TEapExpandedType> * const aPlugins); |
|
179 |
|
180 // ---------------------------------------------------------------------- |
|
181 }; |
|
182 |
|
183 #endif //#if !defined(_EAP_AM_GENERAL_SETTINGS_SYMBIAN_H_) |
|
184 |
|
185 |
|
186 //-------------------------------------------------- |
|
187 // End |
|