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