|
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: 13 % |
|
20 */ |
|
21 |
|
22 #ifndef _EAP_TYPE_PLUGIN_H_ |
|
23 #define _EAP_TYPE_PLUGIN_H_ |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 #include <ecom/ecom.h> |
|
28 |
|
29 #include <EapSettings.h> |
|
30 #include <EapTypeDefinitions.h> |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class abs_eap_am_tools_c; |
|
34 class eap_base_type_c; |
|
35 class abs_eap_base_type_c; |
|
36 class CEapTypeInfo; |
|
37 class eap_am_network_id_c; |
|
38 |
|
39 #ifndef RD_WLAN_3_1_BACKPORTING |
|
40 class abs_eap_configuration_if_c; |
|
41 #endif |
|
42 |
|
43 class AbsPacStoreInitializer; |
|
44 |
|
45 struct SPluginInfo |
|
46 { |
|
47 TIndexType indexType; |
|
48 TInt index; |
|
49 TEapExpandedType aEapType; |
|
50 abs_eap_am_tools_c * aTools; |
|
51 }; |
|
52 |
|
53 // CLASS DECLARATION |
|
54 |
|
55 /** |
|
56 * The interface class for direct EAP plug-in access. |
|
57 * Includes methods to create either the configuration interface or the EAP protocol interface. |
|
58 */ |
|
59 class CEapTypePlugin |
|
60 : public CBase |
|
61 { |
|
62 public: |
|
63 |
|
64 /** |
|
65 * Factory function that loads the EAP type implementation DLL (plug-in). |
|
66 * Uses ECom architecture to load the correct EAP type DLL. Calls the initialization |
|
67 * function of the EAP type |
|
68 * @param aCue EAP type id that specifies which plugin is loaded. |
|
69 * @param aIndexType Indicates the bearer used for this connection. |
|
70 * @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection. |
|
71 * @return Pointer to the implementation. |
|
72 */ |
|
73 inline static CEapTypePlugin* NewL(const TDesC8& aCue, TIndexType aIndexType, TInt aIndex, abs_eap_am_tools_c * const aTools); |
|
74 |
|
75 /** |
|
76 * Unloads the implementation DLL. |
|
77 */ |
|
78 inline virtual ~CEapTypePlugin(); |
|
79 |
|
80 /** |
|
81 * Creates EAP protocol interface implementation. Instances an object that |
|
82 * has been derived from eap_base_type_c that handles the communication |
|
83 * with EAP stack. |
|
84 * @param aTools Pointer to tools class. |
|
85 * @param aPartner Used for callbacks to the stack. |
|
86 * @param is_client_when_true Specifies whether the EAP type acts as a client or server. |
|
87 * @param receive_network_id Network addresses |
|
88 * @param eap_config_if Pointer used for call back to creater of stack (eapol_am_wlan_authentication_symbian_c class). |
|
89 * @return Pointer to the implementation. |
|
90 */ |
|
91 virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c * const aTools, |
|
92 abs_eap_base_type_c * const aPartner, |
|
93 const bool is_client_when_true, |
|
94 const eap_am_network_id_c * const receive_network_id, |
|
95 abs_eap_configuration_if_c * const configuration_if) = 0; |
|
96 |
|
97 #if 0 |
|
98 #ifndef RD_WLAN_3_1_BACKPORTING |
|
99 |
|
100 #else |
|
101 |
|
102 /** |
|
103 * Creates EAP protocol interface implementation. Instances an object that |
|
104 * has been derived from eap_base_type_c that handles the communication |
|
105 * with EAP stack. |
|
106 * @param aTools Pointer to tools class. |
|
107 * @param aPartner Used for callbacks to the stack. |
|
108 * @param is_client_when_true Specifies whether the EAP type acts as a client or server. |
|
109 * @param receive_network_id Network addresses |
|
110 * @return Pointer to the implementation. |
|
111 */ |
|
112 |
|
113 virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, |
|
114 abs_eap_base_type_c* const aPartner, |
|
115 const bool is_client_when_true, |
|
116 const eap_am_network_id_c * const receive_network_id) = 0; |
|
117 |
|
118 #endif // #ifndef RD_WLAN_3_1_BACKPORTING |
|
119 #endif |
|
120 |
|
121 |
|
122 |
|
123 /** |
|
124 * Gets information about EAP type. |
|
125 * @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack. |
|
126 */ |
|
127 virtual CEapTypeInfo* GetInfoL() = 0; |
|
128 |
|
129 /** |
|
130 * Deletes EAP type configuration |
|
131 */ |
|
132 virtual void DeleteConfigurationL() = 0; |
|
133 |
|
134 /** |
|
135 * Returns the version of the interface that the EAP type implements. |
|
136 * The client-side of the interface must always check the version with this function |
|
137 * and not call the functions that are not implemented. New functions must be |
|
138 * added to the end of the interface so that the order of the old functions |
|
139 * does not change. |
|
140 * @return Integer indicating the version. |
|
141 */ |
|
142 virtual TUint GetInterfaceVersion() = 0; |
|
143 |
|
144 /** |
|
145 * Parses the opaque_data field in CImplementationInformation and returns true if |
|
146 * string NOT_OUTSIDE_PEAP is found. |
|
147 * @param aImplInfo Implementation info returned by ListImplementations call |
|
148 * @return Boolean |
|
149 */ |
|
150 inline static TBool IsDisallowedOutsidePEAP(const CImplementationInformation& aImplInfo); |
|
151 |
|
152 /** |
|
153 * Parses the opaque_data field in CImplementationInformation and returns true if |
|
154 * string NOT_INSIDE_PEAP is found. |
|
155 * @param aImplInfo Implementation info returned by ListImplementations call |
|
156 * @return Boolean |
|
157 */ |
|
158 inline static TBool IsDisallowedInsidePEAP(const CImplementationInformation& aImplInfo); |
|
159 |
|
160 /** |
|
161 * Parses the opaque_data field in CImplementationInformation and returns true if |
|
162 * string NOT_INSIDE_TTLS is found. |
|
163 * @param aImplInfo Implementation info returned by ListImplementations call |
|
164 * @return Boolean |
|
165 */ |
|
166 inline static TBool IsDisallowedInsideTTLS(const CImplementationInformation& aImplInfo); |
|
167 |
|
168 /** |
|
169 * Sets the tunneling type. This is used to indicate that this type is run inside another |
|
170 * EAP type. |
|
171 * @param aTunnelingType Type number for the tunneling type |
|
172 */ |
|
173 virtual void SetTunnelingType(const TEapExpandedType aTunnelingType) = 0; |
|
174 |
|
175 /** |
|
176 * Changes the index of the saved parameters. |
|
177 * @param aIndexType Indicates the bearer used for this connection. |
|
178 * @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection. |
|
179 */ |
|
180 virtual void SetIndexL( |
|
181 const TIndexType aIndexType, |
|
182 const TInt aIndex) = 0; |
|
183 |
|
184 /** |
|
185 * Sets the EAP types configuration |
|
186 * @param aSettings Structure containing the settings |
|
187 */ |
|
188 virtual void SetConfigurationL(const EAPSettings& aSettings) = 0; |
|
189 |
|
190 /** |
|
191 * Gets the EAP types configuration |
|
192 * @param aSettings Structure containing the settings |
|
193 */ |
|
194 virtual void GetConfigurationL(EAPSettings& aSettings) = 0; |
|
195 |
|
196 /** |
|
197 * Copies the EAP types configuration |
|
198 * @param aDestinationIndexType index type of the destination, ELan for WLAN. |
|
199 * @param aDestinationIndex ID to where copy the settings. |
|
200 */ |
|
201 virtual void CopySettingsL( |
|
202 const TIndexType aDestinationIndexType, |
|
203 const TInt aDestinationIndex) = 0; |
|
204 |
|
205 virtual TInt InitialisePacStore(AbsPacStoreInitializer * const initializer) = 0; |
|
206 |
|
207 private: |
|
208 |
|
209 /// ECom uses this key to keep track of DLL usage. |
|
210 TUid iDtor_ID_Key; |
|
211 }; |
|
212 |
|
213 #include "EapTypePlugin.inl" |
|
214 |
|
215 #endif // _EAP_TYPE_PLUGIN_H_ |
|
216 |
|
217 // End of file |