eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_state_notification.h
changeset 0 c8830336c852
child 2 1c7bc153c08e
equal deleted inserted replaced
-1:000000000000 0:c8830336c852
       
     1 /*
       
     2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  EAP and WLAN authentication protocols.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #if !defined(_EAP_RADIUS_STATE_NOTIFICATION_H_)
       
    22 #define _EAP_RADIUS_STATE_NOTIFICATION_H_
       
    23 
       
    24 #include "eap_variable_data.h"
       
    25 #include "eap_am_export.h"
       
    26 #include "eap_protocol_layer.h"
       
    27 #include "abs_eap_state_notification.h"
       
    28 
       
    29 
       
    30 /// A eap_radius_state_notification_c class.
       
    31 /// This is used for debugging and protocol testing.
       
    32 class EAP_EXPORT eap_radius_state_notification_c
       
    33 : public abs_eap_state_notification_c
       
    34 {
       
    35 private:
       
    36 	//--------------------------------------------------
       
    37 
       
    38 	abs_eap_am_tools_c * const m_am_tools; ///< This is pointer to the tools class. @see abs_eap_am_tools_c.
       
    39 
       
    40 	eap_protocol_layer_e m_layer; ///< Here is the protocol layer (EAP type).
       
    41 
       
    42 	eap_variable_data_c m_notification_string; ///< Here is the notification string.
       
    43 
       
    44 	bool m_needs_confirmation_from_user; ///< This flag tells whether user interaction is required.
       
    45 
       
    46 	u32_t m_protocol; ///< Here are other protocols than EAP-types.
       
    47 
       
    48 	eap_type_value_e m_eap_type; ///< Here is the EAP type. This is needed for extented EAP-types.
       
    49 
       
    50 	u32_t m_previous_state; ///< Here is the previous state of the EAP type.
       
    51 	
       
    52 	u32_t m_current_state; ///< Here is the current state of the EAP type.
       
    53 	
       
    54 	const eap_am_network_id_c *m_send_network_id;
       
    55 	
       
    56 	bool m_is_client;
       
    57 	
       
    58 	u8_t m_eap_identifier;
       
    59 	
       
    60 	bool m_allow_send_eap_success;
       
    61 
       
    62 	EAP_FUNC_IMPORT eap_const_string get_state_string(const u32_t state) const;
       
    63 
       
    64 	//--------------------------------------------------
       
    65 protected:
       
    66 	//--------------------------------------------------
       
    67 
       
    68 	//--------------------------------------------------
       
    69 public:
       
    70 	//--------------------------------------------------
       
    71 
       
    72 	/**
       
    73 	 * The destructor of the eap_radius_state_notification_c class does nothing special.
       
    74 	 */
       
    75 	EAP_FUNC_IMPORT virtual ~eap_radius_state_notification_c();
       
    76 
       
    77 	/**
       
    78 	 * The constructor of the eap_radius_state_notification_c class does nothing special.
       
    79 	 */
       
    80 	EAP_FUNC_IMPORT eap_radius_state_notification_c(
       
    81 		abs_eap_am_tools_c * const tools,
       
    82 		const eap_am_network_id_c * const send_network_id,
       
    83 		bool is_client,
       
    84 		eap_state_notification_generic_e,
       
    85 		eap_protocol_layer_e layer,
       
    86 		u32_t protocol,
       
    87 		u32_t previous_state,
       
    88 		u32_t current_state,
       
    89 		u8_t eap_identifier,
       
    90 		bool allow_send_eap_success);
       
    91 
       
    92 
       
    93 #if defined(USE_EAP_EXPANDED_TYPES)
       
    94 
       
    95 	EAP_FUNC_IMPORT eap_radius_state_notification_c(
       
    96 		abs_eap_am_tools_c * const tools,
       
    97 		const eap_am_network_id_c * const send_network_id,
       
    98 		bool is_client,
       
    99 		eap_state_notification_eap_e,
       
   100 		eap_protocol_layer_e layer,
       
   101 		eap_type_value_e eap_type,
       
   102 		u32_t previous_state,
       
   103 		u32_t current_state,
       
   104 		u8_t eap_identifier,
       
   105 		bool allow_send_eap_success);
       
   106 
       
   107 #endif //#if defined(USE_EAP_EXPANDED_TYPES)
       
   108 
       
   109 
       
   110 	EAP_FUNC_IMPORT eap_radius_state_notification_c(
       
   111 		abs_eap_am_tools_c * const tools,
       
   112 		const eap_am_network_id_c * const send_network_id,
       
   113 		bool is_client,
       
   114 		eap_state_notification_eap_e,
       
   115 		eap_protocol_layer_e layer,
       
   116 		eap_type_ietf_values_e eap_type,
       
   117 		u32_t previous_state,
       
   118 		u32_t current_state,
       
   119 		u8_t eap_identifier,
       
   120 		bool allow_send_eap_success);
       
   121 
       
   122 	// This is commented in abs_eap_state_notification_c::get_send_network_id().
       
   123 	EAP_FUNC_IMPORT const eap_am_network_id_c * get_send_network_id() const;
       
   124 
       
   125 	// This is commented in abs_eap_state_notification_c::get_protocol_layer().
       
   126 	EAP_FUNC_IMPORT eap_protocol_layer_e get_protocol_layer() const;
       
   127 
       
   128 	// This is commented in abs_eap_state_notification_c::get_protocol().
       
   129 	EAP_FUNC_IMPORT u32_t get_protocol() const;
       
   130 
       
   131 	// This is commented in abs_eap_state_notification_c::get_eap_type().
       
   132 	EAP_FUNC_IMPORT eap_type_value_e get_eap_type() const;
       
   133 
       
   134 	// This is commented in abs_eap_state_notification_c::get_previous_state().
       
   135 	EAP_FUNC_IMPORT u32_t get_previous_state() const;
       
   136 
       
   137 	// This is commented in abs_eap_state_notification_c::get_previous_state_string().
       
   138 	EAP_FUNC_IMPORT eap_const_string get_previous_state_string() const;
       
   139 
       
   140 	// This is commented in abs_eap_state_notification_c::get_current_state().
       
   141 	EAP_FUNC_IMPORT u32_t get_current_state() const;
       
   142 
       
   143 	// This is commented in abs_eap_state_notification_c::get_current_state_string().
       
   144 	EAP_FUNC_IMPORT eap_const_string get_current_state_string() const;
       
   145 
       
   146 	// This is commented in abs_eap_state_notification_c::get_is_client().
       
   147 	EAP_FUNC_IMPORT bool get_is_client() const;
       
   148 
       
   149 	// This is commented in abs_eap_state_notification_c::get_eap_identifier().
       
   150 	EAP_FUNC_IMPORT u8_t get_eap_identifier() const;
       
   151 
       
   152 	// This is commented in abs_eap_state_notification_c::get_allow_send_eap_success().
       
   153 	EAP_FUNC_IMPORT bool get_allow_send_eap_success() const;
       
   154 
       
   155 	// This is commented in abs_eap_state_notification_c::set_notification_string().
       
   156 	EAP_FUNC_IMPORT eap_status_e set_notification_string(
       
   157 		const eap_variable_data_c * const notification_string,
       
   158 		const bool needs_confirmation_from_user);
       
   159 
       
   160 	// This is commented in abs_eap_state_notification_c::get_notification_string().
       
   161 	EAP_FUNC_IMPORT const eap_variable_data_c * get_notification_string() const;
       
   162 
       
   163 	// This is commented in abs_eap_state_notification_c::get_needs_confirmation_from_user().
       
   164 	EAP_FUNC_IMPORT bool get_needs_confirmation_from_user() const;
       
   165 
       
   166 	//--------------------------------------------------
       
   167 }; // class eap_radius_state_notification_c
       
   168 
       
   169 #endif //#if !defined(_EAP_RADIUS_STATE_NOTIFICATION_H_)
       
   170 
       
   171 //--------------------------------------------------
       
   172 
       
   173 
       
   174 
       
   175 // End.