eapol/eapol_framework/eapol_common/am/include/eap_am_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-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 * %version: %
       
    20 */
       
    21 
       
    22 #if !defined(_EAP_AM_MESSAGE_IF_H_)
       
    23 #define _EAP_AM_MESSAGE_IF_H_
       
    24 
       
    25 #include "eap_tools.h"
       
    26 #include "eap_am_export.h"
       
    27 
       
    28 class abs_eap_general_settings_message_c;
       
    29 
       
    30 /** @file */
       
    31 
       
    32 /// This class is the common part of EAP message interface.
       
    33 /// This class is interface to the message creation and parsing function.
       
    34 class EAP_EXPORT eap_am_message_if_c
       
    35 {
       
    36 
       
    37 private:
       
    38 
       
    39 	// ----------------------------------------------------------------------
       
    40 
       
    41 public:
       
    42 
       
    43 	virtual ~eap_am_message_if_c()
       
    44 	{
       
    45 	}
       
    46 
       
    47 	virtual bool get_is_valid() = 0;
       
    48 
       
    49 	virtual void set_partner(abs_eap_am_message_if_c * const client) = 0;
       
    50 
       
    51 	/// Function receives the data message from lower layer.
       
    52 	/// Data is formatted to Attribute-Value Pairs.
       
    53 	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
       
    54 	virtual eap_status_e process_data(const void * const data, const u32_t length) = 0;
       
    55 
       
    56 	// This is documented in abs_eap_stack_interface_c::configure().
       
    57 	virtual eap_status_e configure(
       
    58 		const eap_variable_data_c * const client_configuration) = 0;
       
    59 
       
    60 	// This is documented in abs_eap_stack_interface_c::shutdown().
       
    61 	virtual eap_status_e shutdown() = 0;
       
    62 
       
    63 	static eap_am_message_if_c * new_eap_am_server_message_if_c(
       
    64 		abs_eap_am_tools_c * const tools,
       
    65 		const bool is_client_when_true,
       
    66 		const u32_t MTU);
       
    67 
       
    68 	static eap_am_message_if_c * new_eap_plugin_server_message_if_c(
       
    69 		abs_eap_am_tools_c * const tools);
       
    70 
       
    71 	static eap_am_message_if_c * new_eap_am_server_general_settings_c(
       
    72 		abs_eap_am_tools_c * const tools);
       
    73 
       
    74 	static eap_am_message_if_c * new_eap_general_settings_server_message_if_c(
       
    75 		abs_eap_am_tools_c * const tools);
       
    76 
       
    77 	static eap_am_message_if_c * new_eap_am_message_if_c(
       
    78 		abs_eap_am_tools_c * const tools);
       
    79 	
       
    80 	// ----------------------------------------------------------------------
       
    81 };
       
    82 
       
    83 EAP_FUNC_IMPORT eap_am_message_if_c * new_eap_am_client_message_if_c(
       
    84 	abs_eap_am_tools_c * const tools,
       
    85 	const bool is_client_when_true,
       
    86 	const u32_t MTU);
       
    87 
       
    88 
       
    89 #endif //#if !defined(_EAP_AM_MESSAGE_IF_H_)
       
    90 
       
    91 
       
    92 //--------------------------------------------------
       
    93 // End