eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_message.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    23 #define _SIMPLE_CONFIG_MESSAGE_H_
    23 #define _SIMPLE_CONFIG_MESSAGE_H_
    24 
    24 
    25 #include "eap_tools.h"
    25 #include "eap_tools.h"
    26 #include "eap_array.h"
    26 #include "eap_array.h"
    27 #include "abs_simple_config_apply_cipher_spec.h"
    27 #include "abs_simple_config_apply_cipher_spec.h"
       
    28 #include "eap_am_export.h"
       
    29 // Start: added by script change_export_macros.sh.
       
    30 #if defined(EAP_NO_EXPORT_SIMPLE_CONFIG_MESSAGE_H)
       
    31 	#define EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H EAP_NONSHARABLE 
       
    32 	#define EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H 
       
    33 	#define EAP_C_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H 
       
    34 	#define EAP_FUNC_EXPORT_SIMPLE_CONFIG_MESSAGE_H 
       
    35 	#define EAP_C_FUNC_EXPORT_SIMPLE_CONFIG_MESSAGE_H 
       
    36 #elif defined(EAP_EXPORT_SIMPLE_CONFIG_MESSAGE_H)
       
    37 	#define EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H EAP_EXPORT 
       
    38 	#define EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H EAP_C_FUNC_EXPORT 
       
    40 	#define EAP_FUNC_EXPORT_SIMPLE_CONFIG_MESSAGE_H EAP_FUNC_EXPORT 
       
    41 	#define EAP_C_FUNC_EXPORT_SIMPLE_CONFIG_MESSAGE_H EAP_C_FUNC_EXPORT 
       
    42 #else
       
    43 	#define EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H EAP_IMPORT 
       
    44 	#define EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H EAP_FUNC_IMPORT 
       
    45 	#define EAP_C_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H EAP_C_FUNC_IMPORT 
       
    46 	#define EAP_FUNC_EXPORT_SIMPLE_CONFIG_MESSAGE_H 
       
    47 	#define EAP_C_FUNC_EXPORT_SIMPLE_CONFIG_MESSAGE_H 
       
    48 #endif
       
    49 // End: added by script change_export_macros.sh.
       
    50 
    28 
    51 
    29 /** @file */
    52 /** @file */
    30 
    53 
    31 
    54 
    32 //----------------------------------------------------------------------------
    55 //----------------------------------------------------------------------------
    35 /// This class defines one SIMPLE_CONFIG-message.
    58 /// This class defines one SIMPLE_CONFIG-message.
    36 /**
    59 /**
    37  * This class defined one SIMPLE_CONFIG-message.
    60  * This class defined one SIMPLE_CONFIG-message.
    38  * Parse and analyse of SIMPLE_CONFIG-message is asyncronous.
    61  * Parse and analyse of SIMPLE_CONFIG-message is asyncronous.
    39  */
    62  */
    40 class EAP_EXPORT simple_config_message_c
    63 class EAP_CLASS_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H simple_config_message_c
    41 {
    64 {
    42 private:
    65 private:
    43 	//--------------------------------------------------
    66 	//--------------------------------------------------
    44 
    67 
    45 	/// This is pointer to the tools class. @see abs_eap_am_tools_c.
    68 	/// This is pointer to the tools class. @see abs_eap_am_tools_c.
    63 	//--------------------------------------------------
    86 	//--------------------------------------------------
    64 
    87 
    65 	/**
    88 	/**
    66 	 * The destructor of the simple_config_message_c class does nothing special.
    89 	 * The destructor of the simple_config_message_c class does nothing special.
    67 	 */
    90 	 */
    68 	EAP_FUNC_IMPORT virtual ~simple_config_message_c();
    91 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H virtual ~simple_config_message_c();
    69 
    92 
    70 	/**
    93 	/**
    71 	 * The constructor of the simple_config_message_c class simply initializes the attributes.
    94 	 * The constructor of the simple_config_message_c class simply initializes the attributes.
    72 	 */
    95 	 */
    73 	EAP_FUNC_IMPORT simple_config_message_c(
    96 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H simple_config_message_c(
    74 		abs_eap_am_tools_c * const tools,
    97 		abs_eap_am_tools_c * const tools,
    75 		const bool is_client);
    98 		const bool is_client);
    76 
    99 
    77 	/**
   100 	/**
    78 	 * This function resets this object.
   101 	 * This function resets this object.
    79 	 */
   102 	 */
    80 	EAP_FUNC_IMPORT eap_status_e reset();
   103 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H eap_status_e reset();
    81 
   104 
    82 	/**
   105 	/**
    83 	 * This function copies the received SIMPLE_CONFIG-message data and EAP-identifier.
   106 	 * This function copies the received SIMPLE_CONFIG-message data and EAP-identifier.
    84 	 * EAP-identifier is needed in PEAPv0. That PEAP version uses
   107 	 * EAP-identifier is needed in PEAPv0. That PEAP version uses
    85 	 * same EAP-identifier with PEAP header and tunneled EAP-header.
   108 	 * same EAP-identifier with PEAP header and tunneled EAP-header.
    86 	 */
   109 	 */
    87 	EAP_FUNC_IMPORT eap_status_e set_simple_config_message_data(
   110 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H eap_status_e set_simple_config_message_data(
    88 		eap_variable_data_c * const simple_config_message_data,
   111 		eap_variable_data_c * const simple_config_message_data,
    89 		const u8_t received_eap_identifier);
   112 		const u8_t received_eap_identifier);
    90 
   113 
    91 	/**
   114 	/**
    92 	 * This function returns the SIMPLE_CONFIG-message data.
   115 	 * This function returns the SIMPLE_CONFIG-message data.
    93 	 */
   116 	 */
    94 	EAP_FUNC_IMPORT eap_variable_data_c * get_simple_config_message_data();
   117 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H eap_variable_data_c * get_simple_config_message_data();
    95 
   118 
    96 	/**
   119 	/**
    97 	 * This function returns the EAP-identifier.
   120 	 * This function returns the EAP-identifier.
    98 	 */
   121 	 */
    99 	EAP_FUNC_IMPORT u8_t get_received_eap_identifier();
   122 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H u8_t get_received_eap_identifier();
   100 
   123 
   101 	/**
   124 	/**
   102 	 * Function adds padding for block size if it is needed.
   125 	 * Function adds padding for block size if it is needed.
   103 	 */
   126 	 */
   104 	EAP_FUNC_IMPORT eap_status_e add_padding(const u32_t block_size);
   127 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H eap_status_e add_padding(const u32_t block_size);
   105 
   128 
   106 	/**
   129 	/**
   107 	 * Object must indicate it's validity.
   130 	 * Object must indicate it's validity.
   108 	 * If object initialization fails this function must return false.
   131 	 * If object initialization fails this function must return false.
   109 	 * @return This function returns the validity of this object.
   132 	 * @return This function returns the validity of this object.
   110 	 */
   133 	 */
   111 	EAP_FUNC_IMPORT bool get_is_valid();
   134 	EAP_FUNC_VISIBILITY_SIMPLE_CONFIG_MESSAGE_H bool get_is_valid();
   112 	// 
   135 	// 
   113 	//--------------------------------------------------
   136 	//--------------------------------------------------
   114 }; // class simple_config_message_c
   137 }; // class simple_config_message_c
   115 
   138 
   116 
   139