26
|
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: Class implements the generic EAP type interface.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/*
|
49
|
19 |
* %version: 36 %
|
26
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef _EAP_GENERIC_H_
|
|
23 |
#define _EAP_GENERIC_H_
|
|
24 |
|
|
25 |
// INCLUDES
|
|
26 |
#include <EapType.h>
|
49
|
27 |
#include "eap_am_export.h"
|
|
28 |
// Start: added by script change_export_macros.sh.
|
|
29 |
#if defined(EAP_NO_EXPORT_EAPGENERIC_H)
|
|
30 |
#define EAP_CLASS_VISIBILITY_EAPGENERIC_H EAP_NONSHARABLE
|
|
31 |
#define EAP_FUNC_VISIBILITY_EAPGENERIC_H
|
|
32 |
#define EAP_C_FUNC_VISIBILITY_EAPGENERIC_H
|
|
33 |
#define EAP_FUNC_EXPORT_EAPGENERIC_H
|
|
34 |
#define EAP_C_FUNC_EXPORT_EAPGENERIC_H
|
|
35 |
#elif defined(EAP_EXPORT_EAPGENERIC_H)
|
|
36 |
#define EAP_CLASS_VISIBILITY_EAPGENERIC_H EAP_EXPORT
|
|
37 |
#define EAP_FUNC_VISIBILITY_EAPGENERIC_H EAP_FUNC_EXPORT
|
|
38 |
#define EAP_C_FUNC_VISIBILITY_EAPGENERIC_H EAP_C_FUNC_EXPORT
|
|
39 |
#define EAP_FUNC_EXPORT_EAPGENERIC_H EAP_FUNC_EXPORT
|
|
40 |
#define EAP_C_FUNC_EXPORT_EAPGENERIC_H EAP_C_FUNC_EXPORT
|
|
41 |
#else
|
|
42 |
#define EAP_CLASS_VISIBILITY_EAPGENERIC_H EAP_IMPORT
|
|
43 |
#define EAP_FUNC_VISIBILITY_EAPGENERIC_H EAP_FUNC_IMPORT
|
|
44 |
#define EAP_C_FUNC_VISIBILITY_EAPGENERIC_H EAP_C_FUNC_IMPORT
|
|
45 |
#define EAP_FUNC_EXPORT_EAPGENERIC_H
|
|
46 |
#define EAP_C_FUNC_EXPORT_EAPGENERIC_H
|
|
47 |
#endif
|
|
48 |
// End: added by script change_export_macros.sh.
|
26
|
49 |
#include "eap_header.h"
|
|
50 |
#include "eap_array.h"
|
|
51 |
#include "abs_eap_plugin_message.h"
|
|
52 |
#include "EapClientIf.h"
|
|
53 |
|
|
54 |
// FORWARD DECLARATIONS
|
|
55 |
class eap_am_network_id_c;
|
|
56 |
class eap_method_settings_c;
|
|
57 |
class abs_eap_am_tools_c;
|
|
58 |
class eap_certificate_entry_c;
|
|
59 |
class eap_plugin_message_base_c;
|
|
60 |
|
|
61 |
|
|
62 |
enum eap_generic_wait_state_e
|
|
63 |
{
|
|
64 |
eap_generic_wait_state_none,
|
|
65 |
eap_generic_wait_state_complete_get_configuration,
|
|
66 |
eap_generic_wait_state_complete_set_configuration,
|
|
67 |
eap_generic_wait_state_complete_delete_configuration,
|
|
68 |
eap_generic_wait_state_complete_copy_configuration,
|
|
69 |
eap_generic_wait_state_complete_get_type_info,
|
|
70 |
eap_generic_wait_state_complete_invoke_ui,
|
|
71 |
eap_generic_wait_state_complete_set_index,
|
|
72 |
};
|
|
73 |
|
|
74 |
const TUint KMaxStringLength = 64;
|
|
75 |
|
|
76 |
// CLASS DECLARATION
|
|
77 |
/**
|
|
78 |
* Class implements the generic EAP type interface.
|
|
79 |
*/
|
49
|
80 |
class EAP_CLASS_VISIBILITY_EAPGENERIC_H CEapGeneric
|
26
|
81 |
: public CEapType
|
|
82 |
, public abs_eap_plugin_message_c
|
|
83 |
, public EapClientIf
|
|
84 |
{
|
|
85 |
public:
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Construction function. Called by ECom after the EAP generic plugin has been loaded.
|
|
89 |
* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
|
|
90 |
* @return Pointer to the instance.
|
|
91 |
*/
|
|
92 |
static CEapGeneric* NewL(SIapInfo* aIapInfo);
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Destructor does nothing.
|
|
96 |
*/
|
|
97 |
virtual ~CEapGeneric();
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Creates EAP protocol interface implementation. Instances an object that
|
|
101 |
* has been derived from eap_base_type_c that handles the communication
|
|
102 |
* with EAP stack.
|
|
103 |
* @param aTools Pointer to tools class.
|
|
104 |
* @param aPartner Used for callbacks to the stack.
|
|
105 |
* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
|
|
106 |
* @param receive_network_id Network addresses
|
|
107 |
* @param eap_config_if Pointer used for call back to creater of stack (eapol_am_wlan_authentication_symbian_c class).
|
|
108 |
* @return Pointer to the implementation.
|
|
109 |
*/
|
|
110 |
virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools,
|
|
111 |
abs_eap_base_type_c* const aPartner,
|
|
112 |
const bool is_client_when_true,
|
|
113 |
const eap_am_network_id_c * const receive_network_id,
|
|
114 |
abs_eap_configuration_if_c * const configuration_if);
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
/**
|
|
119 |
* Gets information about EAP type.
|
|
120 |
* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
|
|
121 |
*/
|
|
122 |
CEapTypeInfo* GetInfoL();
|
|
123 |
|
|
124 |
/**
|
|
125 |
* Deletes EAP type configuration
|
|
126 |
*/
|
|
127 |
void DeleteConfigurationL();
|
|
128 |
|
|
129 |
/**
|
|
130 |
* Returns the version of the interface that the EAP type implements.
|
|
131 |
* The client-side of the interface must always check the version with this function
|
|
132 |
* and not call the functions that are not implemented. New functions must be
|
|
133 |
* added to the end of the interface so that the order of the old functions
|
|
134 |
* does not change.
|
|
135 |
* @return Integer indicating the version.
|
|
136 |
*/
|
|
137 |
TUint GetInterfaceVersion();
|
|
138 |
|
|
139 |
/**
|
|
140 |
* Sets the tunneling type. This is used to indicate that this type is run inside another
|
|
141 |
* EAP type.
|
|
142 |
* @param aTunnelingType Type number for the tunneling type
|
|
143 |
*/
|
|
144 |
void SetTunnelingType(const TEapExpandedType aTunnelingType);
|
|
145 |
|
|
146 |
/**
|
|
147 |
* Changes the index of the saved parameters.
|
|
148 |
* @param aIndexType Indicates the bearer used for this connection.
|
|
149 |
* @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection.
|
|
150 |
* @return Pointer to the implementation.
|
|
151 |
*/
|
|
152 |
void SetIndexL(
|
|
153 |
const TIndexType aIndexType,
|
|
154 |
const TInt aIndex );
|
|
155 |
|
|
156 |
/**
|
|
157 |
* Sets the EAP types configuration
|
|
158 |
* @param aSettings Structure containing the settings
|
|
159 |
*/
|
|
160 |
void SetConfigurationL(const EAPSettings& aSettings);
|
|
161 |
|
|
162 |
/**
|
|
163 |
* Gets the EAP types configuration
|
|
164 |
* @param aSettings Structure containing the settings
|
|
165 |
*/
|
|
166 |
void GetConfigurationL(EAPSettings& aSettings);
|
|
167 |
|
|
168 |
/**
|
|
169 |
* Copies the EAP types configuration
|
|
170 |
* @param aDestinationIndex ID to where copy the settings.
|
|
171 |
*/
|
|
172 |
void CopySettingsL(const TIndexType aDestinationIndexType, const TInt aDestinationIndex);
|
|
173 |
|
|
174 |
eap_status_e complete_get_configuration(
|
|
175 |
const eap_method_settings_c * const internal_settings);
|
|
176 |
|
|
177 |
eap_status_e complete_set_configuration(
|
|
178 |
const eap_status_e completion_status);
|
|
179 |
|
|
180 |
eap_status_e complete_delete_configuration(
|
|
181 |
const eap_status_e completion_status);
|
|
182 |
|
|
183 |
eap_status_e complete_copy_configuration(
|
|
184 |
const eap_status_e completion_status);
|
|
185 |
|
|
186 |
eap_status_e complete_set_index(
|
|
187 |
const eap_status_e completion_status);
|
|
188 |
|
|
189 |
eap_status_e complete_get_type_info(
|
|
190 |
const eap_method_settings_c * const internal_settings);
|
|
191 |
|
|
192 |
eap_status_e complete_invoke_ui(
|
|
193 |
const eap_method_settings_c * const internal_settings);
|
|
194 |
|
|
195 |
protected:
|
|
196 |
|
|
197 |
/**
|
|
198 |
* Constructor initialises member variables.
|
|
199 |
*/
|
|
200 |
CEapGeneric(
|
|
201 |
const TIndexType aIndexType,
|
|
202 |
const TInt aIndex,
|
|
203 |
const TEapExpandedType aEapType);
|
|
204 |
|
|
205 |
void ConstructL();
|
|
206 |
|
|
207 |
private:
|
|
208 |
|
|
209 |
void Activate();
|
|
210 |
|
|
211 |
void Complete();
|
|
212 |
|
|
213 |
void WaitCompletion();
|
|
214 |
|
|
215 |
void SetCompletionStatusIfStillOk(const eap_status_e status);
|
|
216 |
|
|
217 |
/// This is pointer to the tools class.
|
|
218 |
abs_eap_am_tools_c * const m_am_tools;
|
|
219 |
|
|
220 |
eap_plugin_message_base_c * const m_server;
|
|
221 |
|
|
222 |
CActiveSchedulerWait iWait;
|
|
223 |
|
|
224 |
// Bearer type
|
|
225 |
TIndexType iIndexType;
|
|
226 |
|
|
227 |
// Unique index
|
|
228 |
TInt iIndex;
|
|
229 |
|
|
230 |
TEapExpandedType iEapType;
|
|
231 |
|
|
232 |
// Tunneling type
|
|
233 |
eap_type_value_e iTunnelingType;
|
|
234 |
bool iTunnelingTypePresent;
|
|
235 |
|
|
236 |
eap_generic_wait_state_e iWaitState;
|
|
237 |
|
|
238 |
eap_status_e iCompletionStatus;
|
|
239 |
|
|
240 |
TRequestStatus iAsyncronousStatus;
|
|
241 |
|
|
242 |
|
|
243 |
|
|
244 |
TBuf<KMaxStringLength> iReleaseDate;
|
|
245 |
TBuf<KMaxStringLength> iEapTypeVersion;
|
|
246 |
TBuf<KMaxStringLength> iManufacturer;
|
|
247 |
|
|
248 |
EAPSettings * ipEAPSettings;
|
|
249 |
};
|
|
250 |
|
|
251 |
#endif // _EAP_GENERIC_H_
|
|
252 |
|
|
253 |
// End of file
|