|
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 |
|
20 |
|
21 #ifndef _ABS_MSCHAPV2_STATE_H_ |
|
22 #define _ABS_MSCHAPV2_STATE_H_ |
|
23 |
|
24 #include "eap_tools.h" |
|
25 #include "eap_variable_data.h" |
|
26 #include "eap_buffer.h" |
|
27 #include "eap_base_type.h" |
|
28 #include "eap_config.h" |
|
29 #include "eap_type_mschapv2_types.h" |
|
30 |
|
31 |
|
32 /// This class declares the functions eap_type_gsmsim_state_c |
|
33 /// requires from the partner class. |
|
34 class EAP_EXPORT abs_eap_type_mschapv2_state_c |
|
35 { |
|
36 private: |
|
37 //-------------------------------------------------- |
|
38 |
|
39 //-------------------------------------------------- |
|
40 protected: |
|
41 //-------------------------------------------------- |
|
42 |
|
43 //-------------------------------------------------- |
|
44 public: |
|
45 //-------------------------------------------------- |
|
46 |
|
47 /** |
|
48 * Constructor does nothing. |
|
49 */ |
|
50 virtual ~abs_eap_type_mschapv2_state_c() |
|
51 { |
|
52 } |
|
53 |
|
54 /** |
|
55 * Desstructor does nothing. |
|
56 */ |
|
57 abs_eap_type_mschapv2_state_c() |
|
58 { |
|
59 } |
|
60 |
|
61 /** |
|
62 * The get_header_offset() function obtains the header offset of EAP-packet. |
|
63 * @see abs_eap_base_type_c::get_header_offset(). |
|
64 */ |
|
65 virtual u32_t get_header_offset( |
|
66 u32_t * const MTU, |
|
67 u32_t * const trailer_length) = 0; |
|
68 |
|
69 /** |
|
70 * The read_configure() function reads the configuration data identified |
|
71 * by the field string of field_length bytes length. Adaptation module must direct |
|
72 * the query to some persistent store. |
|
73 * @see abs_eap_base_type_c::read_configure(). |
|
74 */ |
|
75 virtual eap_status_e read_configure( |
|
76 const eap_configuration_field_c * const field, |
|
77 eap_variable_data_c * const data) = 0; |
|
78 |
|
79 /** |
|
80 * The write_configure() function writes the configuration data identified |
|
81 * by the field string of field_length bytes length. Adaptation module must direct |
|
82 * the action to some persistent store. |
|
83 * @see abs_eap_base_type_c::write_configure(). |
|
84 */ |
|
85 virtual eap_status_e write_configure( |
|
86 const eap_configuration_field_c * const field, |
|
87 eap_variable_data_c * const data) = 0; |
|
88 |
|
89 /** |
|
90 * This is notification of internal state transition. |
|
91 * This is used for notifications, debugging and protocol testing. |
|
92 * The primal notifications are eap_state_variable_e::eap_state_authentication_finished_successfully |
|
93 * and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully. |
|
94 * These two notifications are sent from EAP-protocol layer (eap_protocol_layer_e::eap_protocol_layer_eap). |
|
95 */ |
|
96 virtual void state_notification( |
|
97 const abs_eap_state_notification_c * const state) = 0; |
|
98 |
|
99 /** |
|
100 * The set_timer() function initializes timer to be elapsed after p_time_ms milliseconds. |
|
101 * @param initializer is pointer to object which timer_expired() function will |
|
102 * be called after timer elapses. |
|
103 * @param id is identifier which will be returned in timer_expired() function. |
|
104 * The user selects and interprets the id for this timer. |
|
105 * @param data is pointer to any user selected data which will be returned in timer_expired() function. |
|
106 * |
|
107 * Adaptation module internally implements the timer. |
|
108 */ |
|
109 virtual eap_status_e set_timer( |
|
110 abs_eap_base_timer_c * const initializer, |
|
111 const u32_t id, |
|
112 void * const data, |
|
113 const u32_t p_time_ms) = 0; |
|
114 |
|
115 /** |
|
116 * The cancel_timer() function cancels the timer id initiated by initializer. |
|
117 * |
|
118 * Adaptation module internally implements the timer. |
|
119 */ |
|
120 virtual eap_status_e cancel_timer( |
|
121 abs_eap_base_timer_c * const initializer, |
|
122 const u32_t id) = 0; |
|
123 |
|
124 /** |
|
125 * The cancel_all_timers() function cancels all timers. |
|
126 * User should use this in termination of the stack before |
|
127 * the adaptation module of tools is deleted. |
|
128 * Preferred mode is to cancel each timer directly |
|
129 * using cancel_timer() function. |
|
130 * |
|
131 * Adaptation module internally implements the timer. |
|
132 */ |
|
133 virtual eap_status_e cancel_all_timers() = 0; |
|
134 |
|
135 //-------------------------------------------------- |
|
136 }; // class abs_eap_type_gsmsim_state_c |
|
137 |
|
138 |
|
139 |
|
140 #endif // _ABS_MSCHAPV2_STATE_H_ |