|
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 #ifndef _WLAN_EAPOL_INTERFACE_IMPLEMENTATION_H_ |
|
20 #define _WLAN_EAPOL_INTERFACE_IMPLEMENTATION_H_ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <wlaneapolclient.h> |
|
25 |
|
26 #include "abs_eapol_message_wlan_authentication.h" |
|
27 |
|
28 /** |
|
29 * Implementation for MWlanEapolInterface interface. |
|
30 * |
|
31 * @lib wlaneapolif.dll |
|
32 * @since S60 v3.2 |
|
33 */ |
|
34 class CWlanEapolInterfaceImplementation |
|
35 : public CWlanEapolClient |
|
36 , public abs_eapol_message_wlan_authentication_c |
|
37 { |
|
38 |
|
39 public: |
|
40 |
|
41 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
42 // Functions from CWlanEapolClient. |
|
43 |
|
44 /** |
|
45 * Static constructor. |
|
46 * @param aPartner Pointer to callback instance. |
|
47 * @return Pointer to the constructed instance. |
|
48 */ |
|
49 static CWlanEapolInterfaceImplementation* NewL( MWlanEapolCallbackInterface * aPartner ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CWlanEapolInterfaceImplementation(); |
|
55 |
|
56 /** |
|
57 * Configure plugin implementation. |
|
58 * |
|
59 * @since S60 v3.2 |
|
60 * @param aHeaderOffset Offset of EAP-header in packet_send. |
|
61 * @param aMTU Maximum transfer unit (MTU). |
|
62 * @param aTrailerLength Length of trailer needed by lower levels.. |
|
63 * @return Return value is specified in interface specification. |
|
64 */ |
|
65 virtual TInt Configure( |
|
66 const TInt aHeaderOffset, |
|
67 const TInt aMTU, |
|
68 const TInt aTrailerLength); |
|
69 |
|
70 /** |
|
71 * Shutdown plugin implementation. |
|
72 * |
|
73 * @since S60 v3.2 |
|
74 * @return Return value is specified in interface specification. |
|
75 */ |
|
76 virtual TInt Shutdown(); |
|
77 |
|
78 /** |
|
79 * Send data to EAPOL. |
|
80 * |
|
81 * @since S60 v3.2 |
|
82 * @param aData Pointer to the data to be sent. |
|
83 * @param aLength Length of the data to be sent. |
|
84 * @return Return value is specified in interface specification. |
|
85 */ |
|
86 virtual TInt ProcessData( |
|
87 const void * const aData, |
|
88 const TInt aLength ); |
|
89 |
|
90 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
91 // Functions from abs_eapol_message_wlan_authentication_c. |
|
92 |
|
93 /// Function sends the data message to lower layer. |
|
94 /// Data is formatted to Attribute-Value Pairs. |
|
95 /// Look at eap_tlv_header_c and eap_tlv_message_data_c. |
|
96 virtual wlan_eap_if_send_status_e send_data(const void * const data, const u32_t length); |
|
97 |
|
98 |
|
99 private: |
|
100 |
|
101 /** |
|
102 * C++ default constructor. |
|
103 */ |
|
104 CWlanEapolInterfaceImplementation(); |
|
105 |
|
106 /** |
|
107 * Symbian 2nd phase constructor. |
|
108 */ |
|
109 void ConstructL(MWlanEapolCallbackInterface * aPartner); |
|
110 |
|
111 /** |
|
112 * The get_is_valid() function returns the status of the CWlanEapolInterfaceImplementation object. |
|
113 * @return True indicates the object is initialized. |
|
114 */ |
|
115 bool get_is_valid(); |
|
116 |
|
117 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
118 |
|
119 abs_eap_am_tools_c * m_am_tools; |
|
120 |
|
121 MWlanEapolCallbackInterface * m_partner; |
|
122 |
|
123 eapol_message_wlan_authentication_c * m_wauth; |
|
124 |
|
125 bool m_is_valid; |
|
126 |
|
127 }; |
|
128 |
|
129 |
|
130 #endif // _WLAN_EAPOL_INTERFACE_IMPLEMENTATION_H_ |
|
131 |
|
132 // End of file. |