|
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 |
|
20 #ifndef EAPSECURID_H |
|
21 #define EAPSECURID_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <EapType.h> |
|
25 #include "eap_header.h" |
|
26 |
|
27 // LOCAL CONSTANTS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Class that implements the generic EAP type interface. Implements EAP SecurID protocol. |
|
32 */ |
|
33 class CEapSecurID : public CEapType |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Construction function. Called by ECom after the EAP SecurID plugin has been loaded. |
|
38 * @param aIapInfo Pointer to the class that contains information about bearer type and unique index. |
|
39 * @return Pointer to the instance. |
|
40 */ |
|
41 static CEapSecurID* NewSecurIdL(SIapInfo *aIapInfo); |
|
42 |
|
43 /** |
|
44 * Construction function. Called by ECom after the EAP SecurID plugin has been loaded. |
|
45 * @param aIapInfo Pointer to the class that contains information about bearer type and unique index. |
|
46 * @return Pointer to the instance. |
|
47 */ |
|
48 static CEapSecurID* NewGtcL(SIapInfo *aIapInfo); |
|
49 |
|
50 /** |
|
51 * Destructor does nothing. |
|
52 */ |
|
53 virtual ~CEapSecurID(); |
|
54 |
|
55 #ifdef USE_EAP_SIMPLE_CONFIG |
|
56 |
|
57 /** |
|
58 * Creates EAP protocol interface implementation. Instances an object that |
|
59 * has been derived from eap_base_type_c that handles the communication |
|
60 * with EAP stack. |
|
61 * @param aTools Pointer to tools class. |
|
62 * @param aPartner Used for callbacks to the stack. |
|
63 * @param is_client_when_true Specifies whether the EAP type acts as a client or server. |
|
64 * @param receive_network_id Network addresses |
|
65 * @param eap_config_if Pointer used for call back to creater of stack (eapol_am_wlan_authentication_symbian_c class). |
|
66 * @return Pointer to the implementation. |
|
67 */ |
|
68 virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, |
|
69 abs_eap_base_type_c* const aPartner, |
|
70 const bool is_client_when_true, |
|
71 const eap_am_network_id_c * const receive_network_id, |
|
72 abs_eap_configuration_if_c * const configuration_if); |
|
73 |
|
74 #else |
|
75 |
|
76 /** |
|
77 * Creates EAP protocol interface implementation. Instances an object that |
|
78 * has been derived from eap_base_type_c that handles the communication |
|
79 * with EAP stack. |
|
80 * @param aTools Pointer to tools class. |
|
81 * @param aPartner Used for callbacks to the stack. |
|
82 * @param is_client_when_true Specifies whether the EAP type acts as a client or server. |
|
83 * @param receive_network_id Network addresses |
|
84 * @return Pointer to the implementation. |
|
85 */ |
|
86 eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, |
|
87 abs_eap_base_type_c* const aPartner, |
|
88 const bool is_client_when_true, |
|
89 const eap_am_network_id_c * const receive_network_id); |
|
90 |
|
91 #endif // #ifdef USE_EAP_SIMPLE_CONFIG |
|
92 |
|
93 /** |
|
94 * Invokes the configuration UI. |
|
95 **/ |
|
96 TInt InvokeUiL(); |
|
97 |
|
98 /** |
|
99 * Gets information about EAP type. |
|
100 * @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack. |
|
101 */ |
|
102 CEapTypeInfo* GetInfoLC(); |
|
103 |
|
104 /** |
|
105 * Deletes EAP type configuration |
|
106 */ |
|
107 void DeleteConfigurationL(); |
|
108 |
|
109 /** |
|
110 * Returns the version of the interface that the EAP type implements. |
|
111 * The client-side of the interface must always check the version with this function |
|
112 * and not call the functions that are not implemented. New functions must be |
|
113 * added to the end of the interface so that the order of the old functions |
|
114 * does not change. |
|
115 * @return Integer indicating the version. |
|
116 */ |
|
117 TUint GetInterfaceVersion(); |
|
118 |
|
119 /** |
|
120 * Sets the tunneling type. This is used to indicate that this type is run inside another |
|
121 * EAP type. |
|
122 * @param aTunnelingType Type number for the tunneling type |
|
123 */ |
|
124 void SetTunnelingType(const TInt aTunnelingType); |
|
125 |
|
126 /** |
|
127 * Changes the index of the saved parameters. |
|
128 * @param aIndexType Indicates the bearer used for this connection. |
|
129 * @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection. |
|
130 * @return Pointer to the implementation. |
|
131 */ |
|
132 void SetIndexL( |
|
133 const TIndexType aIndexType, |
|
134 const TInt aIndex); |
|
135 |
|
136 /** |
|
137 * Sets the EAP types configuration |
|
138 * @param aSettings Structure containing the settings |
|
139 */ |
|
140 void SetConfigurationL(const EAPSettings& aSettings); |
|
141 |
|
142 /** |
|
143 * Gets the EAP types configuration |
|
144 * @param aSettings Structure containing the settings |
|
145 */ |
|
146 void GetConfigurationL(EAPSettings& aSettings); |
|
147 |
|
148 /** |
|
149 * Copies the EAP types configuration |
|
150 * @param aDestinationIndex ID to where copy the settings. |
|
151 */ |
|
152 void CopySettingsL(const TIndexType aDestinationIndexType, const TInt aDestinationIndex); |
|
153 |
|
154 |
|
155 protected: |
|
156 |
|
157 /** |
|
158 * Constructor initialises member variables. |
|
159 */ |
|
160 CEapSecurID(const TIndexType aIndexType, const TInt aIndex, const eap_type_value_e aEapType); |
|
161 |
|
162 private: |
|
163 |
|
164 // Bearer type |
|
165 TIndexType iIndexType; |
|
166 |
|
167 // Unique index |
|
168 TInt iIndex; |
|
169 |
|
170 // Eap type (GTC or SecurID) |
|
171 eap_type_value_e iEapType; |
|
172 |
|
173 // Tunneling type |
|
174 eap_type_value_e iTunnelingType; |
|
175 }; |
|
176 |
|
177 #endif // EAPSECURID_H |
|
178 |
|
179 // End of File |