eapol/eapol_framework/eapol_common/include/eap_state_notification.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    22 #if !defined(_EAP_STATE_NOTIFICATION_H_)
    22 #if !defined(_EAP_STATE_NOTIFICATION_H_)
    23 #define _EAP_STATE_NOTIFICATION_H_
    23 #define _EAP_STATE_NOTIFICATION_H_
    24 
    24 
    25 #include "eap_variable_data.h"
    25 #include "eap_variable_data.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_STATE_NOTIFICATION_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAP_STATE_NOTIFICATION_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H 
       
    32 	#define EAP_FUNC_EXPORT_EAP_STATE_NOTIFICATION_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAP_STATE_NOTIFICATION_H 
       
    34 #elif defined(EAP_EXPORT_EAP_STATE_NOTIFICATION_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAP_STATE_NOTIFICATION_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAP_STATE_NOTIFICATION_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAP_STATE_NOTIFICATION_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAP_STATE_NOTIFICATION_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAP_STATE_NOTIFICATION_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAP_STATE_NOTIFICATION_H 
       
    46 #endif
       
    47 // End: added by script change_export_macros.sh.
    27 #include "eap_protocol_layer.h"
    48 #include "eap_protocol_layer.h"
    28 #include "abs_eap_state_notification.h"
    49 #include "abs_eap_state_notification.h"
    29 
    50 
    30 
    51 
    31 /// A eap_state_notification_c class.
    52 /// A eap_state_notification_c class.
    32 /// This is used for state change indications of EAP-protocol.
    53 /// This is used for state change indications of EAP-protocol.
    33 /// EAP-Success and EAP-Failure are sent based on eap_state_variable_e::eap_state_authentication_finished_successfully
    54 /// EAP-Success and EAP-Failure are sent based on eap_state_variable_e::eap_state_authentication_finished_successfully
    34 /// and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully notifications.
    55 /// and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully notifications.
    35 class EAP_EXPORT eap_state_notification_c
    56 class EAP_CLASS_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_state_notification_c
    36 : public abs_eap_state_notification_c
    57 : public abs_eap_state_notification_c
    37 {
    58 {
    38 private:
    59 private:
    39 	//--------------------------------------------------
    60 	//--------------------------------------------------
    40 
    61 
    73 	//--------------------------------------------------
    94 	//--------------------------------------------------
    74 
    95 
    75 	/**
    96 	/**
    76 	 * The destructor of the eap_state_notification_c class does nothing special.
    97 	 * The destructor of the eap_state_notification_c class does nothing special.
    77 	 */
    98 	 */
    78 	EAP_FUNC_IMPORT virtual ~eap_state_notification_c();
    99 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H virtual ~eap_state_notification_c();
    79 
   100 
    80 	/**
   101 	/**
    81 	 * The constructor of the eap_state_notification_c class does nothing special.
   102 	 * The constructor of the eap_state_notification_c class does nothing special.
    82 	 */
   103 	 */
    83 	EAP_FUNC_IMPORT eap_state_notification_c(
   104 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_state_notification_c(
    84 		abs_eap_am_tools_c * const tools,
   105 		abs_eap_am_tools_c * const tools,
    85 		const eap_am_network_id_c * const send_network_id,
   106 		const eap_am_network_id_c * const send_network_id,
    86 		bool is_client,
   107 		bool is_client,
    87 		eap_state_notification_generic_e,
   108 		eap_state_notification_generic_e,
    88 		eap_protocol_layer_e layer,
   109 		eap_protocol_layer_e layer,
    90 		u32_t previous_state,
   111 		u32_t previous_state,
    91 		u32_t current_state,
   112 		u32_t current_state,
    92 		u8_t eap_identifier,
   113 		u8_t eap_identifier,
    93 		bool allow_send_eap_success);
   114 		bool allow_send_eap_success);
    94 
   115 
    95 	EAP_FUNC_IMPORT eap_state_notification_c(
   116 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_state_notification_c(
    96 		abs_eap_am_tools_c * const tools,
   117 		abs_eap_am_tools_c * const tools,
    97 		const eap_am_network_id_c * const send_network_id,
   118 		const eap_am_network_id_c * const send_network_id,
    98 		bool is_client,
   119 		bool is_client,
    99 		eap_state_notification_eap_e,
   120 		eap_state_notification_eap_e,
   100 		eap_protocol_layer_e layer,
   121 		eap_protocol_layer_e layer,
   102 		u32_t previous_state,
   123 		u32_t previous_state,
   103 		u32_t current_state,
   124 		u32_t current_state,
   104 		u8_t eap_identifier,
   125 		u8_t eap_identifier,
   105 		bool allow_send_eap_success);
   126 		bool allow_send_eap_success);
   106 
   127 
   107 	EAP_FUNC_IMPORT eap_state_notification_c(
   128 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_state_notification_c(
   108 		abs_eap_am_tools_c * const tools,
   129 		abs_eap_am_tools_c * const tools,
   109 		const eap_am_network_id_c * const send_network_id,
   130 		const eap_am_network_id_c * const send_network_id,
   110 		bool is_client,
   131 		bool is_client,
   111 		eap_state_notification_eap_e,
   132 		eap_state_notification_eap_e,
   112 		eap_protocol_layer_e layer,
   133 		eap_protocol_layer_e layer,
   115 		u32_t current_state,
   136 		u32_t current_state,
   116 		u8_t eap_identifier,
   137 		u8_t eap_identifier,
   117 		bool allow_send_eap_success);
   138 		bool allow_send_eap_success);
   118 
   139 
   119 	// This is commented in abs_eap_state_notification_c::get_send_network_id().
   140 	// This is commented in abs_eap_state_notification_c::get_send_network_id().
   120 	EAP_FUNC_IMPORT const eap_am_network_id_c * get_send_network_id() const;
   141 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H const eap_am_network_id_c * get_send_network_id() const;
   121 
   142 
   122 	// This is commented in abs_eap_state_notification_c::get_protocol_layer().
   143 	// This is commented in abs_eap_state_notification_c::get_protocol_layer().
   123 	EAP_FUNC_IMPORT eap_protocol_layer_e get_protocol_layer() const;
   144 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_protocol_layer_e get_protocol_layer() const;
   124 
   145 
   125 	// This is commented in abs_eap_state_notification_c::get_protocol().
   146 	// This is commented in abs_eap_state_notification_c::get_protocol().
   126 	EAP_FUNC_IMPORT u32_t get_protocol() const;
   147 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H u32_t get_protocol() const;
   127 
   148 
   128 	// This is commented in abs_eap_state_notification_c::get_eap_type().
   149 	// This is commented in abs_eap_state_notification_c::get_eap_type().
   129 	EAP_FUNC_IMPORT eap_type_value_e get_eap_type() const;
   150 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_type_value_e get_eap_type() const;
   130 
   151 
   131 	// This is commented in abs_eap_state_notification_c::get_previous_state().
   152 	// This is commented in abs_eap_state_notification_c::get_previous_state().
   132 	EAP_FUNC_IMPORT u32_t get_previous_state() const;
   153 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H u32_t get_previous_state() const;
   133 
   154 
   134 	// This is commented in abs_eap_state_notification_c::get_previous_state_string().
   155 	// This is commented in abs_eap_state_notification_c::get_previous_state_string().
   135 	EAP_FUNC_IMPORT eap_const_string get_previous_state_string() const;
   156 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_const_string get_previous_state_string() const;
   136 
   157 
   137 	// This is commented in abs_eap_state_notification_c::get_current_state().
   158 	// This is commented in abs_eap_state_notification_c::get_current_state().
   138 	EAP_FUNC_IMPORT u32_t get_current_state() const;
   159 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H u32_t get_current_state() const;
   139 
   160 
   140 	// This is commented in abs_eap_state_notification_c::get_current_state_string().
   161 	// This is commented in abs_eap_state_notification_c::get_current_state_string().
   141 	EAP_FUNC_IMPORT eap_const_string get_current_state_string() const;
   162 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_const_string get_current_state_string() const;
   142 
   163 
   143 	// This is commented in abs_eap_state_notification_c::get_is_client().
   164 	// This is commented in abs_eap_state_notification_c::get_is_client().
   144 	EAP_FUNC_IMPORT bool get_is_client() const;
   165 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H bool get_is_client() const;
   145 
   166 
   146 	// This is commented in abs_eap_state_notification_c::get_eap_identifier().
   167 	// This is commented in abs_eap_state_notification_c::get_eap_identifier().
   147 	EAP_FUNC_IMPORT u8_t get_eap_identifier() const;
   168 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H u8_t get_eap_identifier() const;
   148 
   169 
   149 	// This is commented in abs_eap_state_notification_c::get_allow_send_eap_success().
   170 	// This is commented in abs_eap_state_notification_c::get_allow_send_eap_success().
   150 	EAP_FUNC_IMPORT bool get_allow_send_eap_success() const;
   171 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H bool get_allow_send_eap_success() const;
   151 
   172 
   152 	// This is commented in abs_eap_state_notification_c::set_notification_string().
   173 	// This is commented in abs_eap_state_notification_c::set_notification_string().
   153 	EAP_FUNC_IMPORT eap_status_e set_notification_string(
   174 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_status_e set_notification_string(
   154 		const eap_variable_data_c * const notification_string,
   175 		const eap_variable_data_c * const notification_string,
   155 		const bool needs_confirmation_from_user);
   176 		const bool needs_confirmation_from_user);
   156 
   177 
   157 	// This is commented in abs_eap_state_notification_c::get_notification_string().
   178 	// This is commented in abs_eap_state_notification_c::get_notification_string().
   158 	EAP_FUNC_IMPORT const eap_variable_data_c * get_notification_string() const;
   179 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H const eap_variable_data_c * get_notification_string() const;
   159 
   180 
   160 	// This is commented in abs_eap_state_notification_c::get_needs_confirmation_from_user().
   181 	// This is commented in abs_eap_state_notification_c::get_needs_confirmation_from_user().
   161 	EAP_FUNC_IMPORT bool get_needs_confirmation_from_user() const;
   182 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H bool get_needs_confirmation_from_user() const;
   162 
   183 
   163 
   184 
   164 	// This is commented in abs_eap_state_notification_c::set_authentication_error().
   185 	// This is commented in abs_eap_state_notification_c::set_authentication_error().
   165 	EAP_FUNC_IMPORT void set_authentication_error(const eap_status_e error);
   186 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H void set_authentication_error(const eap_status_e error);
   166 
   187 
   167 	// This is commented in abs_eap_state_notification_c::get_authentication_error().
   188 	// This is commented in abs_eap_state_notification_c::get_authentication_error().
   168 	EAP_FUNC_IMPORT eap_status_e get_authentication_error() const;
   189 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_status_e get_authentication_error() const;
   169 
   190 
   170 
   191 
   171 	EAP_FUNC_IMPORT static eap_const_string get_state_string(const u32_t protocol_layer, const u32_t state);
   192 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H static eap_const_string get_state_string(const u32_t protocol_layer, const u32_t state);
   172 	
   193 	
   173 
   194 
   174 	EAP_FUNC_IMPORT static eap_const_string get_protocol_layer_string(const u32_t protocol_layer);
   195 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H static eap_const_string get_protocol_layer_string(const u32_t protocol_layer);
   175 
   196 
   176 	EAP_FUNC_IMPORT eap_const_string get_protocol_layer_string() const;
   197 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_const_string get_protocol_layer_string() const;
   177 
   198 
   178 
   199 
   179 	EAP_FUNC_IMPORT static eap_const_string get_protocol_string(const u32_t protocol_layer, const u32_t state);
   200 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H static eap_const_string get_protocol_string(const u32_t protocol_layer, const u32_t state);
   180 
   201 
   181 	EAP_FUNC_IMPORT eap_const_string get_protocol_string() const;
   202 	EAP_FUNC_VISIBILITY_EAP_STATE_NOTIFICATION_H eap_const_string get_protocol_string() const;
   182 
   203 
   183 	//--------------------------------------------------
   204 	//--------------------------------------------------
   184 }; // class eap_state_notification_c
   205 }; // class eap_state_notification_c
   185 
   206 
   186 #endif //#if !defined(_EAP_STATE_NOTIFICATION_H_)
   207 #endif //#if !defined(_EAP_STATE_NOTIFICATION_H_)