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: 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"
|
49
|
27 |
// Start: added by script change_export_macros.sh.
|
|
28 |
#if defined(EAP_NO_EXPORT_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H)
|
|
29 |
#define EAP_CLASS_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_NONSHARABLE
|
|
30 |
#define EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H
|
|
31 |
#define EAP_C_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H
|
|
32 |
#define EAP_FUNC_EXPORT_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H
|
|
33 |
#define EAP_C_FUNC_EXPORT_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H
|
|
34 |
#elif defined(EAP_EXPORT_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H)
|
|
35 |
#define EAP_CLASS_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_EXPORT
|
|
36 |
#define EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_FUNC_EXPORT
|
|
37 |
#define EAP_C_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_C_FUNC_EXPORT
|
|
38 |
#define EAP_FUNC_EXPORT_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_FUNC_EXPORT
|
|
39 |
#define EAP_C_FUNC_EXPORT_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_C_FUNC_EXPORT
|
|
40 |
#else
|
|
41 |
#define EAP_CLASS_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_IMPORT
|
|
42 |
#define EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_FUNC_IMPORT
|
|
43 |
#define EAP_C_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H EAP_C_FUNC_IMPORT
|
|
44 |
#define EAP_FUNC_EXPORT_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H
|
|
45 |
#define EAP_C_FUNC_EXPORT_EAP_GENERAL_SETTINGS_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_general_settings.h"
|
|
56 |
#include "eap_am_general_settings.h"
|
|
57 |
|
|
58 |
|
|
59 |
/** @file */
|
|
60 |
|
|
61 |
|
|
62 |
/// Class creates and reads the messages used in EAP-general settings interface on the server side.
|
49
|
63 |
class EAP_CLASS_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_general_settings_server_message_if_c
|
26
|
64 |
: public abs_eap_am_general_settings_c
|
|
65 |
, public eap_am_message_if_c
|
|
66 |
, public abs_eap_base_timer_c
|
|
67 |
{
|
|
68 |
|
|
69 |
private:
|
|
70 |
//--------------------------------------------------
|
|
71 |
|
|
72 |
/// This is back pointer to object which created this object.
|
|
73 |
abs_eap_am_message_if_c * m_partner;
|
|
74 |
|
|
75 |
eap_am_general_settings_c * const m_am_settings;
|
|
76 |
|
|
77 |
/// This is pointer to the tools class.
|
|
78 |
abs_eap_am_tools_c * const m_am_tools;
|
|
79 |
|
|
80 |
eap_status_e m_error_code;
|
|
81 |
|
|
82 |
eap_tlv_message_type_function_e m_error_function;
|
|
83 |
|
|
84 |
/// This indicates whether this object is client (true) or server (false).
|
|
85 |
/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
|
|
86 |
bool m_is_client;
|
|
87 |
|
|
88 |
/// This indicates whether this object was generated successfully.
|
|
89 |
bool m_is_valid;
|
|
90 |
|
|
91 |
bool m_shutdown_was_called;
|
|
92 |
|
|
93 |
eap_status_e send_error_message(
|
|
94 |
const eap_status_e error_code,
|
|
95 |
const eap_tlv_message_type_function_e function);
|
|
96 |
|
|
97 |
eap_status_e send_message(eap_process_tlv_message_data_c * const message);
|
|
98 |
|
|
99 |
eap_status_e process_message_type_error(
|
|
100 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
101 |
|
|
102 |
eap_status_e process_message(eap_process_tlv_message_data_c * const message);
|
|
103 |
|
|
104 |
eap_status_e set_eap_methods(
|
|
105 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
106 |
|
|
107 |
eap_status_e get_eap_methods(
|
|
108 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
109 |
|
|
110 |
eap_status_e get_certificate_lists(
|
|
111 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
112 |
|
|
113 |
eap_status_e delete_all_eap_settings(
|
|
114 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
115 |
|
|
116 |
eap_status_e copy_all_eap_settings(
|
|
117 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
118 |
|
|
119 |
//--------------------------------------------------
|
|
120 |
protected:
|
|
121 |
//--------------------------------------------------
|
|
122 |
|
|
123 |
//--------------------------------------------------
|
|
124 |
public:
|
|
125 |
//--------------------------------------------------
|
|
126 |
|
|
127 |
/**
|
|
128 |
* The destructor deletes the m_eap_core object.
|
|
129 |
*/
|
49
|
130 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H virtual ~eap_general_settings_server_message_if_c();
|
26
|
131 |
|
|
132 |
/**
|
|
133 |
* The constructor creates the eap_core object and initializes the m_eap_core
|
|
134 |
* to point the eap_core object.
|
|
135 |
* @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
|
|
136 |
*/
|
49
|
137 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_general_settings_server_message_if_c(
|
26
|
138 |
abs_eap_am_tools_c * const tools);
|
|
139 |
|
49
|
140 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H void set_partner(abs_eap_am_message_if_c * const partner);
|
26
|
141 |
|
49
|
142 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e process_data(const void * const data, const u32_t length);
|
26
|
143 |
|
|
144 |
// This is documented in abs_eap_stack_interface_c::configure().
|
49
|
145 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e configure(
|
26
|
146 |
const eap_variable_data_c * const client_configuration);
|
|
147 |
|
|
148 |
// This is documented in abs_eap_stack_interface_c::shutdown().
|
49
|
149 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e shutdown();
|
26
|
150 |
|
|
151 |
// This is documented in abs_eap_stack_interface_c::set_is_valid().
|
49
|
152 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H void set_is_valid();
|
26
|
153 |
|
|
154 |
// This is documented in abs_eap_stack_interface_c::get_is_valid().
|
49
|
155 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H bool get_is_valid();
|
26
|
156 |
|
|
157 |
// See abs_eap_base_timer_c::timer_expired().
|
49
|
158 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e timer_expired(
|
26
|
159 |
const u32_t id, void *data);
|
|
160 |
|
|
161 |
// See abs_eap_base_timer_c::timer_delete_data().
|
49
|
162 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e timer_delete_data(
|
26
|
163 |
const u32_t id, void *data);
|
|
164 |
|
|
165 |
|
49
|
166 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e complete_set_eap_methods(const eap_method_settings_c * const internal_settings);
|
26
|
167 |
|
49
|
168 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e complete_get_eap_methods(const eap_method_settings_c * const internal_settings);
|
26
|
169 |
|
49
|
170 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e complete_get_certificate_lists(const eap_method_settings_c * const internal_settings);
|
26
|
171 |
|
49
|
172 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e complete_delete_all_eap_settings(const eap_method_settings_c * const internal_settings);
|
26
|
173 |
|
49
|
174 |
EAP_FUNC_VISIBILITY_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H eap_status_e complete_copy_all_eap_settings(const eap_method_settings_c * const internal_settings);
|
26
|
175 |
|
|
176 |
//--------------------------------------------------
|
|
177 |
}; // class eap_general_settings_server_message_if_c
|
|
178 |
|
|
179 |
#endif //#if !defined(_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H_)
|
|
180 |
|
|
181 |
//--------------------------------------------------
|
|
182 |
|
|
183 |
|
|
184 |
|
|
185 |
// End.
|