|
1 /* |
|
2 * Copyright (c) 2001-2007 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 #if !defined(_EAP_AM_FAST_PAC_STORE_SERVICES_H_) |
|
22 #define _EAP_AM_FAST_PAC_STORE_SERVICES_H_ |
|
23 |
|
24 #if defined(USE_FAST_EAP_TYPE) |
|
25 |
|
26 #include "eap_am_export.h" |
|
27 #include "eap_tools.h" |
|
28 #include "eap_fast_pac_store_types.h" |
|
29 #include "eap_fast_tlv_header.h" |
|
30 |
|
31 class eap_variable_data_c; |
|
32 class eap_fast_variable_data_c; |
|
33 class abs_eap_state_notification_c; |
|
34 |
|
35 /** @file */ |
|
36 |
|
37 //---------------------------------------------------------------------------- |
|
38 |
|
39 /// This class defines PAC TLV. |
|
40 /** |
|
41 * PAC TLV is constructed with Attribute-Value Pairs. |
|
42 */ |
|
43 class EAP_EXPORT eap_am_fast_pac_store_services_c |
|
44 { |
|
45 private: |
|
46 //-------------------------------------------------- |
|
47 |
|
48 //-------------------------------------------------- |
|
49 public: |
|
50 //-------------------------------------------------- |
|
51 |
|
52 virtual ~eap_am_fast_pac_store_services_c() {} |
|
53 |
|
54 /** |
|
55 * Function queries user the permission for A-ID. |
|
56 * This function is completed by complete_query_user_permission_for_A_ID() function call. |
|
57 */ |
|
58 virtual eap_status_e query_user_permission_for_A_ID( |
|
59 const eap_fast_pac_store_pending_operation_e in_pending_operation, |
|
60 const eap_fast_variable_data_c * const in_pac_attribute_A_ID_info, |
|
61 const eap_fast_variable_data_c * const in_pac_attribute_A_ID) = 0; |
|
62 |
|
63 /** |
|
64 * Function reads the PAC store data referenced by parameter in_references. |
|
65 * This function is completed by complete_read_PAC_store_data() function call. |
|
66 */ |
|
67 virtual eap_status_e read_PAC_store_data( |
|
68 const eap_fast_pac_store_pending_operation_e in_pending_operation, |
|
69 EAP_TEMPLATE_CONST eap_array_c<eap_fast_pac_store_data_c> * const in_references) = 0; |
|
70 |
|
71 /** |
|
72 * Function writes the PAC store data referenced by parameter in_references_and_data_blocks. |
|
73 * This function is completed by complete_write_PAC_store_data() function call. |
|
74 */ |
|
75 virtual eap_status_e write_PAC_store_data( |
|
76 const bool when_true_must_be_synchronous_operation, |
|
77 const eap_fast_pac_store_pending_operation_e in_pending_operation, |
|
78 EAP_TEMPLATE_CONST eap_array_c<eap_fast_pac_store_data_c> * const in_references_and_data_blocks) = 0; |
|
79 |
|
80 /** |
|
81 * Function completes the add_PAC_TLV() function call. |
|
82 */ |
|
83 virtual eap_status_e complete_add_PAC_TLV( |
|
84 const eap_status_e in_completion_status, |
|
85 const eap_fast_completion_operation_e in_completion_operation, |
|
86 EAP_TEMPLATE_CONST eap_array_c<eap_fast_pac_type_e> * const in_saved_pac_types) = 0; |
|
87 |
|
88 /** |
|
89 * This function call removes cached PAC store data. |
|
90 */ |
|
91 virtual eap_status_e remove_cached_pac_store_data() = 0; |
|
92 |
|
93 /** |
|
94 * Function completes the add_imported_PAC_file() function call. |
|
95 */ |
|
96 virtual eap_status_e complete_add_imported_PAC_file( |
|
97 const eap_status_e in_completion_status, |
|
98 const eap_variable_data_c * const in_imported_PAC_filename, |
|
99 const eap_variable_data_c * const out_used_group_reference) = 0; |
|
100 |
|
101 /** |
|
102 * Function completes the query_PACs() function call. |
|
103 */ |
|
104 virtual eap_status_e complete_query_PACs( |
|
105 const eap_status_e in_completion_status, |
|
106 EAP_TEMPLATE_CONST eap_array_c<eap_fast_variable_data_c> * const out_matched_PACs, |
|
107 const eap_variable_data_c * const out_used_group_reference) = 0; |
|
108 |
|
109 /** |
|
110 * Function completes the remove_PAC() function call. |
|
111 */ |
|
112 virtual eap_status_e complete_remove_PAC( |
|
113 const eap_status_e in_completion_status, |
|
114 const eap_variable_data_c * const out_used_group_reference) = 0; |
|
115 |
|
116 /** |
|
117 * Function completes the remove_IAP_reference() function call. |
|
118 */ |
|
119 virtual eap_status_e complete_remove_IAP_reference( |
|
120 const eap_status_e in_completion_status) = 0; |
|
121 |
|
122 /** |
|
123 * Function cancels all PAC store operations. |
|
124 */ |
|
125 virtual eap_status_e cancel_PAC_store_operations() = 0; |
|
126 |
|
127 /** |
|
128 * The set_session_timeout() function changes the session timeout timer to be elapsed after session_timeout_ms milliseconds. |
|
129 */ |
|
130 virtual eap_status_e set_session_timeout( |
|
131 const u32_t session_timeout_ms) = 0; |
|
132 |
|
133 /** |
|
134 * This is notification of internal state transition. |
|
135 * This is used for notifications, debugging and protocol testing. |
|
136 * The primal notifications are eap_state_variable_e::eap_state_authentication_finished_successfully |
|
137 * and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully. EAP-type MUST send these |
|
138 * two notifications to lower layer. |
|
139 * These two notifications are sent using EAP-protocol layer (eap_protocol_layer_e::eap_protocol_layer_eap). |
|
140 * See also eap_state_notification_c. |
|
141 */ |
|
142 virtual void state_notification( |
|
143 const abs_eap_state_notification_c * const state) = 0; |
|
144 |
|
145 /** |
|
146 * The read_configure() function reads the configuration data identified |
|
147 * by the field string of field_length bytes length. Adaptation module must direct |
|
148 * the query to some persistent store. |
|
149 * @param field is generic configure string idenfying the required configure data. |
|
150 * @param field_length is length of the field string. |
|
151 * @param data is pointer to existing eap_variable_data object. |
|
152 * |
|
153 * EAP-type should store it's parameters to an own database. The own database should be accessed |
|
154 * through adaptation module of EAP-type. See eap_am_type_tls_peap_simulator_c::type_configure_read. |
|
155 */ |
|
156 virtual eap_status_e read_configure( |
|
157 const eap_configuration_field_c * const field, |
|
158 eap_variable_data_c * const data) = 0; |
|
159 |
|
160 //-------------------------------------------------- |
|
161 }; // class eap_am_fast_pac_store_services_c |
|
162 |
|
163 |
|
164 #endif //#if defined(USE_FAST_EAP_TYPE) |
|
165 |
|
166 #endif //#if !defined(_EAP_AM_FAST_PAC_STORE_SERVICES_H_) |
|
167 |
|
168 |
|
169 // End. |