26
|
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: Class creates and reads the messages used in EAP-general settings interface on the client side.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
/*
|
|
19 |
* %version: 8 %
|
|
20 |
*/
|
|
21 |
|
|
22 |
#if !defined(_EAP_GENERAL_SETTINGS_CLIENT_MESSAGE_IF_H_)
|
|
23 |
#define _EAP_GENERAL_SETTINGS_CLIENT_MESSAGE_IF_H_
|
|
24 |
|
|
25 |
#include "eap_tools.h"
|
|
26 |
#include "eap_am_export.h"
|
|
27 |
#include "eap_plugin_message_base.h"
|
|
28 |
#include "abs_eap_am_message_if.h"
|
|
29 |
#include "eap_array.h"
|
|
30 |
#include "eap_process_tlv_message_data.h"
|
|
31 |
#include "eap_general_settings_message.h"
|
|
32 |
|
|
33 |
class eap_method_settings_c;
|
|
34 |
class eap_am_message_if_c;
|
|
35 |
class abs_eap_general_settings_message_c;
|
|
36 |
class eap_tlv_header_c;
|
|
37 |
|
|
38 |
/// Class creates and reads the messages used in EAP-general settings interface on the client side.
|
|
39 |
class EAP_EXPORT eap_general_settings_client_message_if_c
|
|
40 |
: public abs_eap_am_message_if_c
|
|
41 |
, public eap_general_settings_message_c
|
|
42 |
{
|
|
43 |
private:
|
|
44 |
//--------------------------------------------------
|
|
45 |
|
|
46 |
/// This is pointer to the tools class.
|
|
47 |
abs_eap_am_tools_c * const m_am_tools;
|
|
48 |
|
|
49 |
/// eap_general_settings_client_message_if_c deletes m_client_if in destructor.
|
|
50 |
eap_am_message_if_c * m_client_if;
|
|
51 |
|
|
52 |
/// This is back pointer to object which created this object.
|
|
53 |
/// Packets are sent to the partner.
|
|
54 |
abs_eap_general_settings_message_c * const m_partner;
|
|
55 |
|
|
56 |
/// This indicates whether this object was generated successfully.
|
|
57 |
bool m_is_valid;
|
|
58 |
|
|
59 |
eap_status_e m_error_code;
|
|
60 |
|
|
61 |
eap_tlv_message_type_function_e m_error_function;
|
|
62 |
|
|
63 |
|
|
64 |
eap_status_e complete_set_eap_methods(
|
|
65 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
66 |
|
|
67 |
eap_status_e complete_get_eap_methods(
|
|
68 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
69 |
|
|
70 |
eap_status_e complete_get_certificate_lists(
|
|
71 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
72 |
|
|
73 |
eap_status_e complete_delete_all_eap_settings(
|
|
74 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
75 |
|
|
76 |
eap_status_e complete_copy_all_eap_settings(
|
|
77 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
78 |
|
|
79 |
|
|
80 |
eap_status_e process_message_type_error(
|
|
81 |
EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
|
|
82 |
|
|
83 |
eap_status_e process_message(eap_process_tlv_message_data_c * const message);
|
|
84 |
|
|
85 |
//--------------------------------------------------
|
|
86 |
protected:
|
|
87 |
//--------------------------------------------------
|
|
88 |
|
|
89 |
//--------------------------------------------------
|
|
90 |
public:
|
|
91 |
//--------------------------------------------------
|
|
92 |
|
|
93 |
/**
|
|
94 |
* The destructor of the eap_core class does nothing special.
|
|
95 |
*/
|
|
96 |
EAP_FUNC_IMPORT virtual ~eap_general_settings_client_message_if_c();
|
|
97 |
|
|
98 |
/**
|
|
99 |
* The constructor initializes member attributes using parameters passed to it.
|
|
100 |
* @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
|
|
101 |
* @param client_if is pointer to object which forwards message to the server.
|
|
102 |
* @param partner is back pointer to the user of EAP-general settings.
|
|
103 |
*/
|
|
104 |
EAP_FUNC_IMPORT eap_general_settings_client_message_if_c(
|
|
105 |
abs_eap_am_tools_c * const tools,
|
|
106 |
eap_am_message_if_c * const client_if,
|
|
107 |
abs_eap_general_settings_message_c * const partner);
|
|
108 |
|
|
109 |
/**
|
|
110 |
* This function must reset the state of object to same as
|
|
111 |
* state was after the configure() function call.
|
|
112 |
* If object reset succeeds this function must return eap_status_ok.
|
|
113 |
* If object reset fails this function must return corresponding error status.
|
|
114 |
* @return This function returns the status of reset operation.
|
|
115 |
*/
|
|
116 |
EAP_FUNC_IMPORT eap_status_e reset();
|
|
117 |
|
|
118 |
// This is documented in abs_eap_stack_interface_c::configure().
|
|
119 |
EAP_FUNC_IMPORT eap_status_e configure();
|
|
120 |
|
|
121 |
// This is documented in abs_eap_stack_interface_c::shutdown().
|
|
122 |
EAP_FUNC_IMPORT eap_status_e shutdown();
|
|
123 |
|
|
124 |
// This is documented in abs_eap_stack_interface_c::get_is_valid().
|
|
125 |
EAP_FUNC_IMPORT bool get_is_valid();
|
|
126 |
|
|
127 |
EAP_FUNC_IMPORT eap_status_e get_eap_methods(const eap_method_settings_c * const internal_settings);
|
|
128 |
|
|
129 |
EAP_FUNC_IMPORT eap_status_e set_eap_methods(const eap_method_settings_c * const internal_settings);
|
|
130 |
|
|
131 |
EAP_FUNC_IMPORT eap_status_e get_certificate_lists(const eap_method_settings_c * const internal_settings);
|
|
132 |
|
|
133 |
EAP_FUNC_IMPORT eap_status_e delete_all_eap_settings(const eap_method_settings_c * const internal_settings);
|
|
134 |
|
|
135 |
EAP_FUNC_IMPORT eap_status_e copy_all_eap_settings(const eap_method_settings_c * const internal_settings);
|
|
136 |
|
|
137 |
EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length);
|
|
138 |
|
|
139 |
//--------------------------------------------------
|
|
140 |
}; // class eap_general_settings_client_message_if_c
|
|
141 |
|
|
142 |
//--------------------------------------------------
|
|
143 |
|
|
144 |
#endif //#if !defined(_EAP_GENERAL_SETTINGS_CLIENT_MESSAGE_IF_H_)
|
|
145 |
|
|
146 |
//--------------------------------------------------
|
|
147 |
|
|
148 |
|
|
149 |
|
|
150 |
// End.
|