eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_state.h
changeset 49 43351a4f2da3
parent 26 9abfd4f00d37
equal deleted inserted replaced
47:712b4ffd76bb 49:43351a4f2da3
    22 #if !defined(_GSMSIM_STATE_H_)
    22 #if !defined(_GSMSIM_STATE_H_)
    23 #define _GSMSIM_STATE_H_
    23 #define _GSMSIM_STATE_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_TYPE_GSMSIM_STATE_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H 
       
    32 	#define EAP_FUNC_EXPORT_EAP_TYPE_GSMSIM_STATE_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_GSMSIM_STATE_H 
       
    34 #elif defined(EAP_EXPORT_EAP_TYPE_GSMSIM_STATE_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAP_TYPE_GSMSIM_STATE_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_GSMSIM_STATE_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAP_TYPE_GSMSIM_STATE_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAP_TYPE_GSMSIM_STATE_H 
       
    46 #endif
       
    47 // End: added by script change_export_macros.sh.
    27 #include "eap_base_type.h"
    48 #include "eap_base_type.h"
    28 #include "eap_variable_data.h"
    49 #include "eap_variable_data.h"
    29 #include "eap_type_gsmsim_header.h"
    50 #include "eap_type_gsmsim_header.h"
    30 #include "eap_type_gsmsim_types.h"
    51 #include "eap_type_gsmsim_types.h"
    31 #include "eap_type_gsmsim_payloads.h"
    52 #include "eap_type_gsmsim_payloads.h"
    43 
    64 
    44 //-----------------------------------------------
    65 //-----------------------------------------------
    45 
    66 
    46 /// This class stores the valid GSMSIM messages (gsmsim_subtype_e)
    67 /// This class stores the valid GSMSIM messages (gsmsim_subtype_e)
    47 /// within a one state (eap_type_gsmsim_state_variable_e).
    68 /// within a one state (eap_type_gsmsim_state_variable_e).
    48 class EAP_EXPORT eap_type_gsmsim_state_variable_parameters_c
    69 class EAP_CLASS_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H eap_type_gsmsim_state_variable_parameters_c
    49 {
    70 {
    50 private:
    71 private:
    51 
    72 
    52 	/// Array includes valid GSMSIM messages (gsmsim_subtype_e).
    73 	/// Array includes valid GSMSIM messages (gsmsim_subtype_e).
    53 	gsmsim_subtype_e m_valid_types[GSMSIM_STATE_MAX_TYPES];
    74 	gsmsim_subtype_e m_valid_types[GSMSIM_STATE_MAX_TYPES];
    61 public:
    82 public:
    62 
    83 
    63 	/**
    84 	/**
    64 	 * Destructor does nothing.
    85 	 * Destructor does nothing.
    65 	 */
    86 	 */
    66 	EAP_FUNC_IMPORT virtual ~eap_type_gsmsim_state_variable_parameters_c();
    87 	EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H virtual ~eap_type_gsmsim_state_variable_parameters_c();
    67 
    88 
    68 	/**
    89 	/**
    69 	 * Constructor initializes attributes with default values.
    90 	 * Constructor initializes attributes with default values.
    70 	 */
    91 	 */
    71 	EAP_FUNC_IMPORT eap_type_gsmsim_state_variable_parameters_c();
    92 	EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H eap_type_gsmsim_state_variable_parameters_c();
    72 
    93 
    73 	/**
    94 	/**
    74 	 * This function checks the GSMSIM message is valid in this state.
    95 	 * This function checks the GSMSIM message is valid in this state.
    75 	 */
    96 	 */
    76 	EAP_FUNC_IMPORT bool check_valid_types(gsmsim_subtype_e type) const;
    97 	EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H bool check_valid_types(gsmsim_subtype_e type) const;
    77 
    98 
    78 	/**
    99 	/**
    79 	 * This function checks the initiator is valid in this state.
   100 	 * This function checks the initiator is valid in this state.
    80 	 */
   101 	 */
    81 	EAP_FUNC_IMPORT bool check_initiator(const bool is_initiator) const;
   102 	EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H bool check_initiator(const bool is_initiator) const;
    82 
   103 
    83 	/**
   104 	/**
    84 	 * This function initializes this state to allow three GSMSIM message types.
   105 	 * This function initializes this state to allow three GSMSIM message types.
    85 	 */
   106 	 */
    86 	EAP_FUNC_IMPORT void init_state(
   107 	EAP_FUNC_VISIBILITY_EAP_TYPE_GSMSIM_STATE_H void init_state(
    87 		const bool must_be_initiator,
   108 		const bool must_be_initiator,
    88 		const bool must_be_responder,
   109 		const bool must_be_responder,
    89 		const gsmsim_subtype_e type0,
   110 		const gsmsim_subtype_e type0,
    90 		const gsmsim_subtype_e type1,
   111 		const gsmsim_subtype_e type1,
    91 		const gsmsim_subtype_e type2,
   112 		const gsmsim_subtype_e type2,