1 /* |
|
2 * Copyright (c) 2001-2010 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 creates and reads the messages used in EAP-general settings interface on the server side. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 10 % |
|
20 */ |
|
21 |
|
22 #if !defined(_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H_) |
|
23 #define _EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H_ |
|
24 |
|
25 #include "eap_tools.h" |
|
26 #include "eap_am_export.h" |
|
27 #include "abs_eap_session_core.h" |
|
28 #include "eap_variable_data.h" |
|
29 #include "abs_eap_am_mutex.h" |
|
30 #include "eap_session_core_base.h" |
|
31 #include "abs_eap_am_message_if.h" |
|
32 #include "eap_am_message_if.h" |
|
33 #include "eap_process_tlv_message_data.h" |
|
34 #include "abs_eap_am_general_settings.h" |
|
35 #include "eap_am_general_settings.h" |
|
36 |
|
37 |
|
38 /** @file */ |
|
39 |
|
40 |
|
41 /// Class creates and reads the messages used in EAP-general settings interface on the server side. |
|
42 class EAP_EXPORT eap_general_settings_server_message_if_c |
|
43 : public abs_eap_am_general_settings_c |
|
44 , public eap_am_message_if_c |
|
45 , public abs_eap_base_timer_c |
|
46 { |
|
47 |
|
48 private: |
|
49 //-------------------------------------------------- |
|
50 |
|
51 /// This is back pointer to object which created this object. |
|
52 abs_eap_am_message_if_c * m_partner; |
|
53 |
|
54 eap_am_general_settings_c * const m_am_settings; |
|
55 |
|
56 /// This is pointer to the tools class. |
|
57 abs_eap_am_tools_c * const m_am_tools; |
|
58 |
|
59 eap_status_e m_error_code; |
|
60 |
|
61 eap_tlv_message_type_function_e m_error_function; |
|
62 |
|
63 /// This indicates whether this object is client (true) or server (false). |
|
64 /// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
|
65 bool m_is_client; |
|
66 |
|
67 /// This indicates whether this object was generated successfully. |
|
68 bool m_is_valid; |
|
69 |
|
70 bool m_shutdown_was_called; |
|
71 |
|
72 eap_status_e send_error_message( |
|
73 const eap_status_e error_code, |
|
74 const eap_tlv_message_type_function_e function); |
|
75 |
|
76 eap_status_e send_message(eap_process_tlv_message_data_c * const message); |
|
77 |
|
78 eap_status_e process_message_type_error( |
|
79 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
80 |
|
81 eap_status_e process_message(eap_process_tlv_message_data_c * const message); |
|
82 |
|
83 eap_status_e set_eap_methods( |
|
84 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
85 |
|
86 eap_status_e get_eap_methods( |
|
87 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
88 |
|
89 eap_status_e get_certificate_lists( |
|
90 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
91 |
|
92 eap_status_e delete_all_eap_settings( |
|
93 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
94 |
|
95 eap_status_e copy_all_eap_settings( |
|
96 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
97 |
|
98 //-------------------------------------------------- |
|
99 protected: |
|
100 //-------------------------------------------------- |
|
101 |
|
102 //-------------------------------------------------- |
|
103 public: |
|
104 //-------------------------------------------------- |
|
105 |
|
106 /** |
|
107 * The destructor deletes the m_eap_core object. |
|
108 */ |
|
109 EAP_FUNC_IMPORT virtual ~eap_general_settings_server_message_if_c(); |
|
110 |
|
111 /** |
|
112 * The constructor creates the eap_core object and initializes the m_eap_core |
|
113 * to point the eap_core object. |
|
114 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c. |
|
115 */ |
|
116 EAP_FUNC_IMPORT eap_general_settings_server_message_if_c( |
|
117 abs_eap_am_tools_c * const tools); |
|
118 |
|
119 EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const partner); |
|
120 |
|
121 EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length); |
|
122 |
|
123 // This is documented in abs_eap_stack_interface_c::configure(). |
|
124 EAP_FUNC_IMPORT eap_status_e configure( |
|
125 const eap_variable_data_c * const client_configuration); |
|
126 |
|
127 // This is documented in abs_eap_stack_interface_c::shutdown(). |
|
128 EAP_FUNC_IMPORT eap_status_e shutdown(); |
|
129 |
|
130 // This is documented in abs_eap_stack_interface_c::set_is_valid(). |
|
131 EAP_FUNC_IMPORT void set_is_valid(); |
|
132 |
|
133 // This is documented in abs_eap_stack_interface_c::get_is_valid(). |
|
134 EAP_FUNC_IMPORT bool get_is_valid(); |
|
135 |
|
136 // See abs_eap_base_timer_c::timer_expired(). |
|
137 EAP_FUNC_IMPORT eap_status_e timer_expired( |
|
138 const u32_t id, void *data); |
|
139 |
|
140 // See abs_eap_base_timer_c::timer_delete_data(). |
|
141 EAP_FUNC_IMPORT eap_status_e timer_delete_data( |
|
142 const u32_t id, void *data); |
|
143 |
|
144 |
|
145 EAP_FUNC_IMPORT eap_status_e complete_set_eap_methods(const eap_method_settings_c * const internal_settings); |
|
146 |
|
147 EAP_FUNC_IMPORT eap_status_e complete_get_eap_methods(const eap_method_settings_c * const internal_settings); |
|
148 |
|
149 EAP_FUNC_IMPORT eap_status_e complete_get_certificate_lists(const eap_method_settings_c * const internal_settings); |
|
150 |
|
151 EAP_FUNC_IMPORT eap_status_e complete_delete_all_eap_settings(const eap_method_settings_c * const internal_settings); |
|
152 |
|
153 EAP_FUNC_IMPORT eap_status_e complete_copy_all_eap_settings(const eap_method_settings_c * const internal_settings); |
|
154 |
|
155 //-------------------------------------------------- |
|
156 }; // class eap_general_settings_server_message_if_c |
|
157 |
|
158 #endif //#if !defined(_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H_) |
|
159 |
|
160 //-------------------------------------------------- |
|
161 |
|
162 |
|
163 |
|
164 // End. |
|