26
|
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: EAP-plugin message interface in the server.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/*
|
|
19 |
* %version: 7 %
|
|
20 |
*/
|
|
21 |
|
|
22 |
#if !defined(_EAP_PLUGIN_SERVER_MESSAGE_IF_H_)
|
|
23 |
#define _EAP_PLUGIN_SERVER_MESSAGE_IF_H_
|
|
24 |
|
|
25 |
#include "eap_tools.h"
|
|
26 |
#include "eap_am_export.h"
|
49
|
27 |
// Start: added by script change_export_macros.sh.
|
|
28 |
#if defined(EAP_NO_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H)
|
|
29 |
#define EAP_CLASS_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_NONSHARABLE
|
|
30 |
#define EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H
|
|
31 |
#define EAP_C_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H
|
|
32 |
#define EAP_FUNC_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H
|
|
33 |
#define EAP_C_FUNC_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H
|
|
34 |
#elif defined(EAP_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H)
|
|
35 |
#define EAP_CLASS_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_EXPORT
|
|
36 |
#define EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_FUNC_EXPORT
|
|
37 |
#define EAP_C_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_C_FUNC_EXPORT
|
|
38 |
#define EAP_FUNC_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_FUNC_EXPORT
|
|
39 |
#define EAP_C_FUNC_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_C_FUNC_EXPORT
|
|
40 |
#else
|
|
41 |
#define EAP_CLASS_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_IMPORT
|
|
42 |
#define EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_FUNC_IMPORT
|
|
43 |
#define EAP_C_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H EAP_C_FUNC_IMPORT
|
|
44 |
#define EAP_FUNC_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H
|
|
45 |
#define EAP_C_FUNC_EXPORT_EAP_PLUGIN_SERVER_MESSAGE_IF_H
|
|
46 |
#endif
|
|
47 |
// End: added by script change_export_macros.sh.
|
26
|
48 |
#include "abs_eap_session_core.h"
|
|
49 |
#include "eap_variable_data.h"
|
|
50 |
#include "abs_eap_am_mutex.h"
|
|
51 |
#include "eap_session_core_base.h"
|
|
52 |
#include "abs_eap_am_message_if.h"
|
|
53 |
#include "eap_am_message_if.h"
|
|
54 |
#include "eap_process_tlv_message_data.h"
|
|
55 |
#include "abs_eap_am_plugin.h"
|
|
56 |
#include "eap_am_plugin.h"
|
|
57 |
|
|
58 |
|
|
59 |
/** @file */
|
|
60 |
|
|
61 |
|
49
|
62 |
class EAP_CLASS_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_plugin_server_message_if_c
|
26
|
63 |
: public abs_eap_am_plugin_c
|
|
64 |
, public eap_am_message_if_c
|
|
65 |
, public abs_eap_base_timer_c
|
|
66 |
{
|
|
67 |
|
|
68 |
private:
|
|
69 |
//--------------------------------------------------
|
|
70 |
|
|
71 |
/// This is back pointer to object which created this object.
|
|
72 |
abs_eap_am_message_if_c * m_partner;
|
|
73 |
|
|
74 |
eap_am_plugin_c * const m_am_plugin;
|
|
75 |
|
|
76 |
/// This is pointer to the tools class.
|
|
77 |
abs_eap_am_tools_c * const m_am_tools;
|
|
78 |
|
|
79 |
eap_status_e m_error_code;
|
|
80 |
|
|
81 |
eap_tlv_message_type_function_e m_error_function;
|
|
82 |
|
|
83 |
/// This indicates whether this object is client (true) or server (false).
|
|
84 |
/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
|
|
85 |
bool m_is_client;
|
|
86 |
|
|
87 |
/// This indicates whether this object was generated successfully.
|
|
88 |
bool m_is_valid;
|
|
89 |
|
|
90 |
bool m_shutdown_was_called;
|
|
91 |
|
|
92 |
eap_status_e send_error_message(
|
|
93 |
const eap_status_e error_code,
|
|
94 |
const eap_tlv_message_type_function_e function);
|
|
95 |
|
|
96 |
eap_status_e send_message(eap_process_tlv_message_data_c * const message);
|
|
97 |
|
|
98 |
eap_status_e process_message_type_error(
|
|
99 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
100 |
|
|
101 |
eap_status_e process_message(eap_process_tlv_message_data_c * const message);
|
|
102 |
|
|
103 |
|
|
104 |
eap_status_e get_configuration(
|
|
105 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
106 |
|
|
107 |
eap_status_e set_configuration(
|
|
108 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
109 |
|
|
110 |
eap_status_e copy_configuration(
|
|
111 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
112 |
|
|
113 |
eap_status_e delete_configuration(
|
|
114 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
115 |
|
|
116 |
eap_status_e set_index(
|
|
117 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
118 |
|
|
119 |
eap_status_e get_type_info(
|
|
120 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
121 |
|
|
122 |
eap_status_e invoke_ui(
|
|
123 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
124 |
|
|
125 |
|
|
126 |
//--------------------------------------------------
|
|
127 |
protected:
|
|
128 |
//--------------------------------------------------
|
|
129 |
|
|
130 |
//--------------------------------------------------
|
|
131 |
public:
|
|
132 |
//--------------------------------------------------
|
|
133 |
|
|
134 |
/**
|
|
135 |
* The destructor deletes the m_eap_core object.
|
|
136 |
*/
|
49
|
137 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H virtual ~eap_plugin_server_message_if_c();
|
26
|
138 |
|
|
139 |
/**
|
|
140 |
* The constructor creates the eap_core object and initializes the m_eap_core
|
|
141 |
* to point the eap_core object.
|
|
142 |
* @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
|
|
143 |
*/
|
49
|
144 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_plugin_server_message_if_c(
|
26
|
145 |
abs_eap_am_tools_c * const tools);
|
|
146 |
|
49
|
147 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H void set_partner(abs_eap_am_message_if_c * const partner);
|
26
|
148 |
|
49
|
149 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e process_data(const void * const data, const u32_t length);
|
26
|
150 |
|
|
151 |
// This is documented in abs_eap_stack_interface_c::configure().
|
49
|
152 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e configure(
|
26
|
153 |
const eap_variable_data_c * const client_configuration);
|
|
154 |
|
|
155 |
// This is documented in abs_eap_stack_interface_c::shutdown().
|
49
|
156 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e shutdown();
|
26
|
157 |
|
|
158 |
// This is documented in abs_eap_stack_interface_c::set_is_valid().
|
49
|
159 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H void set_is_valid();
|
26
|
160 |
|
|
161 |
// This is documented in abs_eap_stack_interface_c::get_is_valid().
|
49
|
162 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H bool get_is_valid();
|
26
|
163 |
|
|
164 |
// See abs_eap_base_timer_c::timer_expired().
|
49
|
165 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e timer_expired(
|
26
|
166 |
const u32_t id, void *data);
|
|
167 |
|
|
168 |
// See abs_eap_base_timer_c::timer_delete_data().
|
49
|
169 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e timer_delete_data(
|
26
|
170 |
const u32_t id, void *data);
|
|
171 |
|
49
|
172 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e complete_get_configuration(const eap_method_settings_c * const internal_settings);
|
26
|
173 |
|
49
|
174 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e complete_set_configuration(const eap_method_settings_c * const internal_settings);
|
26
|
175 |
|
49
|
176 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e complete_delete_configuration(const eap_method_settings_c * const internal_settings);
|
26
|
177 |
|
49
|
178 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e complete_copy_configuration(const eap_method_settings_c * const internal_settings);
|
26
|
179 |
|
49
|
180 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e complete_set_index(const eap_method_settings_c * const internal_settings);
|
26
|
181 |
|
49
|
182 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e complete_get_type_info(const eap_method_settings_c * const internal_settings);
|
26
|
183 |
|
49
|
184 |
EAP_FUNC_VISIBILITY_EAP_PLUGIN_SERVER_MESSAGE_IF_H eap_status_e complete_invoke_ui(const eap_method_settings_c * const internal_settings);
|
26
|
185 |
|
|
186 |
//--------------------------------------------------
|
|
187 |
}; // class eap_plugin_server_message_if_c
|
|
188 |
|
|
189 |
#endif //#if !defined(_EAP_PLUGIN_SERVER_MESSAGE_IF_H_)
|
|
190 |
|
|
191 |
//--------------------------------------------------
|
|
192 |
|
|
193 |
|
|
194 |
|
|
195 |
// End.
|