eapol/eapol_framework/eapol_common/include/eap_session_core_base.h
changeset 52 c23bdf5a328a
parent 33 938269283a16
equal deleted inserted replaced
51:e863583e6720 52:c23bdf5a328a
    22 #if !defined(_EAP_SESSION_CORE_BASE_H_)
    22 #if !defined(_EAP_SESSION_CORE_BASE_H_)
    23 #define _EAP_SESSION_CORE_BASE_H_
    23 #define _EAP_SESSION_CORE_BASE_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_SESSION_CORE_BASE_H)
       
    29 	#define EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_BASE_H EAP_NONSHARABLE 
       
    30 	#define EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H 
       
    31 	#define EAP_C_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H 
       
    32 	#define EAP_FUNC_EXPORT_EAP_SESSION_CORE_BASE_H 
       
    33 	#define EAP_C_FUNC_EXPORT_EAP_SESSION_CORE_BASE_H 
       
    34 #elif defined(EAP_EXPORT_EAP_SESSION_CORE_BASE_H)
       
    35 	#define EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_BASE_H EAP_EXPORT 
       
    36 	#define EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H EAP_FUNC_EXPORT 
       
    37 	#define EAP_C_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H EAP_C_FUNC_EXPORT 
       
    38 	#define EAP_FUNC_EXPORT_EAP_SESSION_CORE_BASE_H EAP_FUNC_EXPORT 
       
    39 	#define EAP_C_FUNC_EXPORT_EAP_SESSION_CORE_BASE_H EAP_C_FUNC_EXPORT 
       
    40 #else
       
    41 	#define EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_BASE_H EAP_IMPORT 
       
    42 	#define EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H EAP_FUNC_IMPORT 
       
    43 	#define EAP_C_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H EAP_C_FUNC_IMPORT 
       
    44 	#define EAP_FUNC_EXPORT_EAP_SESSION_CORE_BASE_H 
       
    45 	#define EAP_C_FUNC_EXPORT_EAP_SESSION_CORE_BASE_H 
       
    46 #endif
       
    47 // End: added by script change_export_macros.sh.
    27 #include "abs_eap_core.h"
    48 #include "abs_eap_core.h"
    28 #include "eap_core_map.h"
    49 #include "eap_core_map.h"
    29 #include "eap_database_reference_if.h"
    50 #include "eap_database_reference_if.h"
    30 #include "eapol_key_types.h"
    51 #include "eapol_key_types.h"
    31 
    52 
    32 class abs_eap_session_core_c;
    53 class abs_eap_session_core_c;
    33 
    54 
    34 /// A eap_session_core_base_c class implements mapping of EAP authentication sessions.
    55 /// A eap_session_core_base_c class implements mapping of EAP authentication sessions.
    35 /// Network identity separates parallel EAP authentication sessions.
    56 /// Network identity separates parallel EAP authentication sessions.
    36 class EAP_EXPORT eap_session_core_base_c
    57 class EAP_CLASS_VISIBILITY_EAP_SESSION_CORE_BASE_H eap_session_core_base_c
    37 : public eap_database_reference_if_c
    58 : public eap_database_reference_if_c
    38 {
    59 {
    39 private:
    60 private:
    40 	//--------------------------------------------------
    61 	//--------------------------------------------------
    41 
    62 
    49 	//--------------------------------------------------
    70 	//--------------------------------------------------
    50 
    71 
    51 	/**
    72 	/**
    52 	 * The destructor of the eap_core class does nothing special.
    73 	 * The destructor of the eap_core class does nothing special.
    53 	 */
    74 	 */
    54 	EAP_FUNC_IMPORT virtual ~eap_session_core_base_c();
    75 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H virtual ~eap_session_core_base_c();
    55 
    76 
    56 	/**
    77 	/**
    57 	 * The constructor initializes member attributes using parameters passed to it.
    78 	 * The constructor initializes member attributes using parameters passed to it.
    58 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
    79 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
    59 	 * @param partner is back pointer to object which created this object.
    80 	 * @param partner is back pointer to object which created this object.
    60 	 * @param is_client_when_true indicates whether the network entity should act
    81 	 * @param is_client_when_true indicates whether the network entity should act
    61 	 * as a client (true) or server (false), in terms of EAP-protocol
    82 	 * as a client (true) or server (false), in terms of EAP-protocol
    62 	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
    83 	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
    63 	 */
    84 	 */
    64 	EAP_FUNC_IMPORT eap_session_core_base_c();
    85 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H eap_session_core_base_c();
    65 
    86 
    66 	/**
    87 	/**
    67 	 * This function must reset the state of object to same as 
    88 	 * This function must reset the state of object to same as 
    68 	 * state was after the configure() function call.
    89 	 * state was after the configure() function call.
    69 	 * If object reset succeeds this function must return eap_status_ok.
    90 	 * If object reset succeeds this function must return eap_status_ok.
   138 		const eap_variable_data_c * const SSID,
   159 		const eap_variable_data_c * const SSID,
   139 		const eap_variable_data_c * const preshared_key) = 0;
   160 		const eap_variable_data_c * const preshared_key) = 0;
   140 
   161 
   141 	//--------------------------------------------------
   162 	//--------------------------------------------------
   142 
   163 
   143 	EAP_FUNC_IMPORT static eap_session_core_base_c * new_eap_session_core_c(
   164 	EAP_FUNC_VISIBILITY_EAP_SESSION_CORE_BASE_H static eap_session_core_base_c * new_eap_session_core_c(
   144 		abs_eap_am_tools_c * const tools,
   165 		abs_eap_am_tools_c * const tools,
   145 		abs_eap_session_core_c * const partner,
   166 		abs_eap_session_core_c * const partner,
   146 		const bool is_client_when_true,
   167 		const bool is_client_when_true,
   147 		const u32_t MTU);
   168 		const u32_t MTU);
   148 
   169