eapol/eapol_framework/eapol_common/include/eap_plugin_server_message_if.h
branchRCL_3
changeset 46 c74b3d9f6b9e
parent 45 bad0cc58d154
child 55 9c2aa05919d9
equal deleted inserted replaced
45:bad0cc58d154 46:c74b3d9f6b9e
     1 /*
       
     2 * Copyright (c) 2001-2010 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-plugin message interface in the server.
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 7 %
       
    20 */
       
    21 
       
    22 #if !defined(_EAP_PLUGIN_SERVER_MESSAGE_IF_H_)
       
    23 #define _EAP_PLUGIN_SERVER_MESSAGE_IF_H_
       
    24 
       
    25 #include "eap_tools.h"
       
    26 #include "eap_am_export.h"
       
    27 #include "abs_eap_session_core.h"
       
    28 #include "eap_variable_data.h"
       
    29 #include "abs_eap_am_mutex.h"
       
    30 #include "eap_session_core_base.h"
       
    31 #include "abs_eap_am_message_if.h"
       
    32 #include "eap_am_message_if.h"
       
    33 #include "eap_process_tlv_message_data.h"
       
    34 #include "abs_eap_am_plugin.h"
       
    35 #include "eap_am_plugin.h"
       
    36 
       
    37 
       
    38 /** @file */
       
    39 
       
    40 
       
    41 class EAP_EXPORT eap_plugin_server_message_if_c
       
    42 : public abs_eap_am_plugin_c
       
    43 , public eap_am_message_if_c
       
    44 , public abs_eap_base_timer_c
       
    45 {
       
    46 
       
    47 private:
       
    48 	//--------------------------------------------------
       
    49 
       
    50 	/// This is back pointer to object which created this object.
       
    51 	abs_eap_am_message_if_c * m_partner;
       
    52 
       
    53 	eap_am_plugin_c * const m_am_plugin;
       
    54 
       
    55 	/// This is pointer to the tools class.
       
    56 	abs_eap_am_tools_c * const m_am_tools;
       
    57 
       
    58 	eap_status_e m_error_code;
       
    59 
       
    60 	eap_tlv_message_type_function_e m_error_function;
       
    61 
       
    62 	/// This indicates whether this object is client (true) or server (false).
       
    63 	/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
       
    64 	bool m_is_client;
       
    65 
       
    66 	/// This indicates whether this object was generated successfully.
       
    67 	bool m_is_valid;
       
    68 
       
    69 	bool m_shutdown_was_called;
       
    70 
       
    71 	eap_status_e send_error_message(
       
    72 		const eap_status_e error_code,
       
    73 		const eap_tlv_message_type_function_e function);
       
    74 
       
    75 	eap_status_e send_message(eap_process_tlv_message_data_c * const message);
       
    76 
       
    77 	eap_status_e process_message_type_error(
       
    78 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    79 
       
    80 	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
       
    81 
       
    82 
       
    83 	eap_status_e get_configuration(
       
    84 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    85 
       
    86 	eap_status_e set_configuration(
       
    87 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    88 
       
    89 	eap_status_e copy_configuration(
       
    90 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    91 
       
    92 	eap_status_e delete_configuration(
       
    93 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    94 
       
    95 	eap_status_e set_index(
       
    96 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
    97 
       
    98 	eap_status_e get_type_info(
       
    99 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
   100 
       
   101 	eap_status_e invoke_ui(
       
   102 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
       
   103 
       
   104 
       
   105 	//--------------------------------------------------
       
   106 protected:
       
   107 	//--------------------------------------------------
       
   108 
       
   109 	//--------------------------------------------------
       
   110 public:
       
   111 	//--------------------------------------------------
       
   112 
       
   113 	/**
       
   114 	 * The destructor deletes the m_eap_core object.
       
   115 	 */
       
   116 	EAP_FUNC_IMPORT virtual ~eap_plugin_server_message_if_c();
       
   117 
       
   118 	/**
       
   119 	 * The constructor creates the eap_core object and initializes the m_eap_core
       
   120 	 * to point the eap_core object.
       
   121 	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
       
   122 	 */
       
   123 	EAP_FUNC_IMPORT eap_plugin_server_message_if_c(
       
   124 		abs_eap_am_tools_c * const tools);
       
   125 
       
   126 	EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const partner);
       
   127 
       
   128 	EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
       
   129 
       
   130 	// This is documented in abs_eap_stack_interface_c::configure().
       
   131 	EAP_FUNC_IMPORT eap_status_e configure(
       
   132 		const eap_variable_data_c * const client_configuration);
       
   133 
       
   134 	// This is documented in abs_eap_stack_interface_c::shutdown().
       
   135 	EAP_FUNC_IMPORT eap_status_e shutdown();
       
   136 
       
   137 	// This is documented in abs_eap_stack_interface_c::set_is_valid().
       
   138 	EAP_FUNC_IMPORT void set_is_valid();
       
   139 
       
   140 	// This is documented in abs_eap_stack_interface_c::get_is_valid().
       
   141 	EAP_FUNC_IMPORT bool get_is_valid();
       
   142 
       
   143 	// See abs_eap_base_timer_c::timer_expired().
       
   144 	EAP_FUNC_IMPORT eap_status_e timer_expired(
       
   145 		const u32_t id, void *data);
       
   146 
       
   147 	// See abs_eap_base_timer_c::timer_delete_data().
       
   148 	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
       
   149 		const u32_t id, void *data);
       
   150 
       
   151 	EAP_FUNC_IMPORT eap_status_e complete_get_configuration(const eap_method_settings_c * const internal_settings);
       
   152 
       
   153 	EAP_FUNC_IMPORT eap_status_e complete_set_configuration(const eap_method_settings_c * const internal_settings);
       
   154 
       
   155 	EAP_FUNC_IMPORT eap_status_e complete_delete_configuration(const eap_method_settings_c * const internal_settings);
       
   156 
       
   157 	EAP_FUNC_IMPORT eap_status_e complete_copy_configuration(const eap_method_settings_c * const internal_settings);
       
   158 
       
   159 	EAP_FUNC_IMPORT eap_status_e complete_set_index(const eap_method_settings_c * const internal_settings);
       
   160 
       
   161 	EAP_FUNC_IMPORT eap_status_e complete_get_type_info(const eap_method_settings_c * const internal_settings);
       
   162 
       
   163 	EAP_FUNC_IMPORT eap_status_e complete_invoke_ui(const eap_method_settings_c * const internal_settings);
       
   164 
       
   165 	//--------------------------------------------------
       
   166 }; // class eap_plugin_server_message_if_c
       
   167 
       
   168 #endif //#if !defined(_EAP_PLUGIN_SERVER_MESSAGE_IF_H_)
       
   169 
       
   170 //--------------------------------------------------
       
   171 
       
   172 
       
   173 
       
   174 // End.