eapol/eapol_framework/eapol_common/include/eap_pac_store_server_message_if.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    14 * Description:  EAP and WLAN authentication protocols.
    14 * Description:  EAP and WLAN authentication protocols.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 /*
    18 /*
    19 * %version: %
    19 * %version: 9 %
    20 */
    20 */
    21 
    21 
    22 #if !defined(_EAP_PAC_STORE_SERVER_MESSAGE_IF_H_)
    22 #if !defined(_EAP_PAC_STORE_SERVER_MESSAGE_IF_H_)
    23 #define _EAP_PAC_STORE_SERVER_MESSAGE_IF_H_
    23 #define _EAP_PAC_STORE_SERVER_MESSAGE_IF_H_
    24 
    24 
    25 #include "eap_tools.h"
    25 #include "eap_tools.h"
    26 #include "eap_am_export.h"
    26 #include "eap_am_export.h"
       
    27 // Start: added by script change_export_macros.sh.
       
    28 #if defined(EAP_NO_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H 
       
    32 	#define EAP_FUNC_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H 
       
    34 #elif defined(EAP_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAP_PAC_STORE_SERVER_MESSAGE_IF_H 
       
    46 #endif
       
    47 // End: added by script change_export_macros.sh.
    27 #include "abs_eap_session_core.h"
    48 #include "abs_eap_session_core.h"
    28 #include "eap_variable_data.h"
    49 #include "eap_variable_data.h"
    29 #include "abs_eap_am_mutex.h"
    50 #include "abs_eap_am_mutex.h"
    30 #include "eap_session_core_base.h"
    51 #include "eap_session_core_base.h"
    31 #include "abs_eap_am_message_if.h"
    52 #include "abs_eap_am_message_if.h"
    37 
    58 
    38 /** @file */
    59 /** @file */
    39 
    60 
    40 
    61 
    41 /// A eap_pac_store_server_message_if_c class implements the basic functionality of EAPOL.
    62 /// A eap_pac_store_server_message_if_c class implements the basic functionality of EAPOL.
    42 class EAP_EXPORT eap_pac_store_server_message_if_c
    63 class EAP_CLASS_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_pac_store_server_message_if_c
    43 : public abs_eap_am_pac_store_c
    64 : public abs_eap_am_pac_store_c
    44 , public eap_am_message_if_c
    65 , public eap_am_message_if_c
    45 , public abs_eap_base_timer_c
    66 , public abs_eap_base_timer_c
    46 {
    67 {
    47 
    68 
    78 	eap_status_e process_message_type_error(
    99 	eap_status_e process_message_type_error(
    79 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   100 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
    80 
   101 
    81 	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
   102 	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
    82 
   103 
    83 	eap_status_e open_pac_store(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    84 	eap_status_e create_device_seed(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    85     eap_status_e is_master_key_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   104     eap_status_e is_master_key_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
    86     eap_status_e is_master_key_and_password_matching(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   105     eap_status_e is_master_key_and_password_matching(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
    87     eap_status_e create_and_save_master_key(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   106     eap_status_e create_and_save_master_key(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
    88     eap_status_e compare_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   107     eap_status_e compare_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
    89     eap_status_e is_pacstore_password_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   108     eap_status_e is_pacstore_password_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
   108 	//--------------------------------------------------
   127 	//--------------------------------------------------
   109 
   128 
   110 	/**
   129 	/**
   111 	 * The destructor deletes the m_eap_core object.
   130 	 * The destructor deletes the m_eap_core object.
   112 	 */
   131 	 */
   113 	EAP_FUNC_IMPORT virtual ~eap_pac_store_server_message_if_c();
   132 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H virtual ~eap_pac_store_server_message_if_c();
   114 
   133 
   115 	/**
   134 	/**
   116 	 * The constructor creates the eap_core object and initializes the m_eap_core
   135 	 * The constructor creates the eap_core object and initializes the m_eap_core
   117 	 * to point the eap_core object.
   136 	 * to point the eap_core object.
   118 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
   137 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
   119 	 */
   138 	 */
   120 	EAP_FUNC_IMPORT eap_pac_store_server_message_if_c(
   139 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_pac_store_server_message_if_c(
   121 		abs_eap_am_tools_c * const tools);
   140 		abs_eap_am_tools_c * const tools);
   122 
   141 
   123 	static eap_pac_store_server_message_if_c * new_eap_pac_store_server_message_if_c(
   142 	static eap_pac_store_server_message_if_c * new_eap_pac_store_server_message_if_c(
   124 	    abs_eap_am_tools_c * const tools);
   143 	    abs_eap_am_tools_c * const tools);
   125 	
   144 	
   126 	EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const partner);
   145 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H void set_partner(abs_eap_am_message_if_c * const partner);
   127 
   146 
   128 	EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
   147 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e process_data(const void * const data, const u32_t length);
   129 
   148 
   130 	// This is documented in abs_eap_stack_interface_c::configure().
   149 	// This is documented in abs_eap_stack_interface_c::configure().
   131 	EAP_FUNC_IMPORT eap_status_e configure(
   150 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e configure(
   132 		const eap_variable_data_c * const client_configuration);
   151 		const eap_variable_data_c * const client_configuration);
   133 
   152 
   134 	// This is documented in abs_eap_stack_interface_c::shutdown().
   153 	// This is documented in abs_eap_stack_interface_c::shutdown().
   135 	EAP_FUNC_IMPORT eap_status_e shutdown();
   154 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e shutdown();
   136 
   155 
   137 	// This is documented in abs_eap_stack_interface_c::set_is_valid().
   156 	// This is documented in abs_eap_stack_interface_c::set_is_valid().
   138 	EAP_FUNC_IMPORT void set_is_valid();
   157 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H void set_is_valid();
   139 
   158 
   140 	// This is documented in abs_eap_stack_interface_c::get_is_valid().
   159 	// This is documented in abs_eap_stack_interface_c::get_is_valid().
   141 	EAP_FUNC_IMPORT bool get_is_valid();
   160 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H bool get_is_valid();
   142 
   161 
   143 	// See abs_eap_base_timer_c::timer_expired().
   162 	// See abs_eap_base_timer_c::timer_expired().
   144 	EAP_FUNC_IMPORT eap_status_e timer_expired(
   163 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e timer_expired(
   145 		const u32_t id, void *data);
   164 		const u32_t id, void *data);
   146 
   165 
   147 	// See abs_eap_base_timer_c::timer_delete_data().
   166 	// See abs_eap_base_timer_c::timer_delete_data().
   148 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
   167 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e timer_delete_data(
   149 		const u32_t id, void *data);
   168 		const u32_t id, void *data);
   150 
   169 
   151 
   170 
   152 	EAP_FUNC_IMPORT eap_status_e complete_open_pac_store(
   171 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e complete_is_master_key_present(
       
   172       const bool is_present);
       
   173 
       
   174 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e complete_is_master_key_and_password_matching(
       
   175       const bool is_matching);
       
   176 
       
   177 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e complete_create_and_save_master_key(
   153         const eap_status_e completion_status);
   178         const eap_status_e completion_status);
   154 
   179 
   155 	EAP_FUNC_IMPORT eap_status_e complete_create_device_seed(
   180 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e complete_is_pacstore_password_present(
       
   181         const bool is_present);
       
   182 
       
   183 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e complete_compare_pac_store_password(
       
   184         const bool is_matching);
       
   185 
       
   186 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e complete_set_pac_store_password(
   156         const eap_status_e completion_status);
   187         const eap_status_e completion_status);
   157 
   188 
   158 	EAP_FUNC_IMPORT eap_status_e complete_is_master_key_present(
   189 	EAP_FUNC_VISIBILITY_EAP_PAC_STORE_SERVER_MESSAGE_IF_H eap_status_e complete_destroy_pac_store(
   159       const bool is_present);
       
   160 
       
   161 	EAP_FUNC_IMPORT eap_status_e complete_is_master_key_and_password_matching(
       
   162       const bool is_matching);
       
   163 
       
   164 	EAP_FUNC_IMPORT eap_status_e complete_create_and_save_master_key(
       
   165         const eap_status_e completion_status);
   190         const eap_status_e completion_status);
   166 
   191 
   167 	EAP_FUNC_IMPORT eap_status_e complete_is_pacstore_password_present(
       
   168         const bool is_present);
       
   169 
       
   170 	EAP_FUNC_IMPORT eap_status_e complete_compare_pac_store_password(
       
   171         const bool is_matching);
       
   172 
       
   173 	EAP_FUNC_IMPORT eap_status_e complete_set_pac_store_password(
       
   174         const eap_status_e completion_status);
       
   175 
       
   176 	EAP_FUNC_IMPORT eap_status_e complete_destroy_pac_store(
       
   177         const eap_status_e completion_status);
       
   178 
       
   179 	//--------------------------------------------------
   192 	//--------------------------------------------------
   180 }; // class eap_pac_store_server_message_if_c
   193 }; // class eap_pac_store_server_message_if_c
   181 
   194 
   182 #endif //#if !defined(_EAP_PAC_STORE_SERVER_MESSAGE_IF_H_)
   195 #endif //#if !defined(_EAP_PAC_STORE_SERVER_MESSAGE_IF_H_)
   183 
   196