eapol/eapol_framework/eapol_common/include/eap_base_type.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    21 
    21 
    22 #if !defined(_EAP_BASE_TYPE_H_)
    22 #if !defined(_EAP_BASE_TYPE_H_)
    23 #define _EAP_BASE_TYPE_H_
    23 #define _EAP_BASE_TYPE_H_
    24 
    24 
    25 #include "eap_am_export.h"
    25 #include "eap_am_export.h"
       
    26 // Start: added by script change_export_macros.sh.
       
    27 #if defined(EAP_NO_EXPORT_EAP_BASE_TYPE_H)
       
    28 	#define EAP_CLASS_VISIBILITY_EAP_BASE_TYPE_H EAP_NONSHARABLE 
       
    29 	#define EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H 
       
    30 	#define EAP_C_FUNC_VISIBILITY_EAP_BASE_TYPE_H 
       
    31 	#define EAP_FUNC_EXPORT_EAP_BASE_TYPE_H 
       
    32 	#define EAP_C_FUNC_EXPORT_EAP_BASE_TYPE_H 
       
    33 #elif defined(EAP_EXPORT_EAP_BASE_TYPE_H)
       
    34 	#define EAP_CLASS_VISIBILITY_EAP_BASE_TYPE_H EAP_EXPORT 
       
    35 	#define EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H EAP_FUNC_EXPORT 
       
    36 	#define EAP_C_FUNC_VISIBILITY_EAP_BASE_TYPE_H EAP_C_FUNC_EXPORT 
       
    37 	#define EAP_FUNC_EXPORT_EAP_BASE_TYPE_H EAP_FUNC_EXPORT 
       
    38 	#define EAP_C_FUNC_EXPORT_EAP_BASE_TYPE_H EAP_C_FUNC_EXPORT 
       
    39 #else
       
    40 	#define EAP_CLASS_VISIBILITY_EAP_BASE_TYPE_H EAP_IMPORT 
       
    41 	#define EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H EAP_FUNC_IMPORT 
       
    42 	#define EAP_C_FUNC_VISIBILITY_EAP_BASE_TYPE_H EAP_C_FUNC_IMPORT 
       
    43 	#define EAP_FUNC_EXPORT_EAP_BASE_TYPE_H 
       
    44 	#define EAP_C_FUNC_EXPORT_EAP_BASE_TYPE_H 
       
    45 #endif
       
    46 // End: added by script change_export_macros.sh.
    26 #include "abs_eap_base_type.h"
    47 #include "abs_eap_base_type.h"
    27 #include "eap_header.h"
    48 #include "eap_header.h"
    28 
    49 
    29 
    50 
    30 class abs_eap_base_type_c;
    51 class abs_eap_base_type_c;
    32 
    53 
    33 /// The eap_base_type_c class declares pure virtual functions 
    54 /// The eap_base_type_c class declares pure virtual functions 
    34 /// a user class of EAP-type class could call.
    55 /// a user class of EAP-type class could call.
    35 /// See also abs_eap_stack_interface_c. It includes
    56 /// See also abs_eap_stack_interface_c. It includes
    36 /// important functions too.
    57 /// important functions too.
    37 class EAP_EXPORT eap_base_type_c
    58 class EAP_CLASS_VISIBILITY_EAP_BASE_TYPE_H eap_base_type_c
    38 //: public abs_eap_stack_interface_c This is not used here because packet_process() function differs.
    59 //: public abs_eap_stack_interface_c This is not used here because packet_process() function differs.
    39 {
    60 {
    40 
    61 
    41 private:
    62 private:
    42 	//--------------------------------------------------
    63 	//--------------------------------------------------
    68 	//--------------------------------------------------
    89 	//--------------------------------------------------
    69 
    90 
    70 	/**
    91 	/**
    71 	 * The destructor of the eap_base_type class does nothing special.
    92 	 * The destructor of the eap_base_type class does nothing special.
    72 	 */
    93 	 */
    73 	EAP_FUNC_IMPORT virtual ~eap_base_type_c();
    94 	EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H virtual ~eap_base_type_c();
    74 
    95 
    75 	/**
    96 	/**
    76 	 * The constructor of the eap_base_type class simply initializes the attributes.
    97 	 * The constructor of the eap_base_type class simply initializes the attributes.
    77 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
    98 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
    78 	 * @param partner is back pointer to object which created this object.
    99 	 * @param partner is back pointer to object which created this object.
    79 	 * The eap_base_type_c object sends packets to the network using m_type_partner object.
   100 	 * The eap_base_type_c object sends packets to the network using m_type_partner object.
    80 	 */
   101 	 */
    81 	EAP_FUNC_IMPORT eap_base_type_c(
   102 	EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H eap_base_type_c(
    82 		abs_eap_am_tools_c * const tools,
   103 		abs_eap_am_tools_c * const tools,
    83 		abs_eap_base_type_c * const partner);
   104 		abs_eap_base_type_c * const partner);
    84 
   105 
    85 	/**
   106 	/**
    86 	 * The object_increase_reference_count() function increases the reference count.
   107 	 * The object_increase_reference_count() function increases the reference count.
    87 	 */
   108 	 */
    88 	EAP_FUNC_IMPORT void object_increase_reference_count();
   109 	EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H void object_increase_reference_count();
    89 
   110 
    90 	/**
   111 	/**
    91 	 * The object_decrease_reference_count () function decreases 
   112 	 * The object_decrease_reference_count () function decreases 
    92 	 * the reference count and returns the remaining value.
   113 	 * the reference count and returns the remaining value.
    93 	 * The EAP type is removed after there is no references to it.
   114 	 * The EAP type is removed after there is no references to it.
    94 	 */
   115 	 */
    95 	EAP_FUNC_IMPORT u32_t object_decrease_reference_count();
   116 	EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H u32_t object_decrease_reference_count();
    96 
   117 
    97 	/**
   118 	/**
    98 	 * Type partner is object below the EAP-type object.
   119 	 * Type partner is object below the EAP-type object.
    99 	 * @return The get_type_partner() function returns the pointer to the partner class.
   120 	 * @return The get_type_partner() function returns the pointer to the partner class.
   100 	 */
   121 	 */
   101 	EAP_FUNC_IMPORT abs_eap_base_type_c * get_type_partner();
   122 	EAP_FUNC_VISIBILITY_EAP_BASE_TYPE_H abs_eap_base_type_c * get_type_partner();
   102 
   123 
   103 	/**
   124 	/**
   104 	 * This function queries the identity of user using this type.
   125 	 * This function queries the identity of user using this type.
   105 	 * @param must_be_synchronous tells whether this call must be synchronous.
   126 	 * @param must_be_synchronous tells whether this call must be synchronous.
   106 	 * @param identity is buffer for queried identity in synchronous call.
   127 	 * @param identity is buffer for queried identity in synchronous call.