eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius_state.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(_ABS_RADIUS_STATE_H_)
       
    22 #define _ABS_RADIUS_STATE_H_
       
    23 
       
    24 #include "eap_tools.h"
       
    25 #include "eap_variable_data.h"
       
    26 #include "eap_buffer.h"
       
    27 #include "eap_base_type.h"
       
    28 #include "eap_config.h"
       
    29 #include "eap_radius_types.h"
       
    30 
       
    31 
       
    32 /// This class declares the functions eap_radius_state_c
       
    33 /// requires from the partner class.
       
    34 class EAP_EXPORT abs_eap_radius_state_c
       
    35 {
       
    36 private:
       
    37 	//--------------------------------------------------
       
    38 
       
    39 	//--------------------------------------------------
       
    40 protected:
       
    41 	//--------------------------------------------------
       
    42 
       
    43 	//--------------------------------------------------
       
    44 public:
       
    45 	//--------------------------------------------------
       
    46 
       
    47 	/**
       
    48 	 * Constructor does nothing.
       
    49 	 */
       
    50 	virtual ~abs_eap_radius_state_c()
       
    51 	{
       
    52 	}
       
    53 
       
    54 	/**
       
    55 	 * Desstructor does nothing.
       
    56 	 */
       
    57 	abs_eap_radius_state_c()
       
    58 	{
       
    59 	}
       
    60 
       
    61 	/**
       
    62 	 * The get_header_offset() function obtains the header offset of EAP-packet.
       
    63 	 * @see abs_eap_base_type_c::get_header_offset().
       
    64 	 */
       
    65 	virtual u32_t get_header_offset(
       
    66 		u32_t * const MTU,
       
    67 		u32_t * const trailer_length) = 0;
       
    68 
       
    69 	/**
       
    70 	 * The read_configure() function reads the configuration data identified
       
    71 	 * by the field string of field_length bytes length. Adaptation module must direct
       
    72 	 * the query to some persistent store.
       
    73 	 * @see abs_eap_base_type_c::read_configure().
       
    74 	 */
       
    75 	virtual eap_status_e read_configure(
       
    76 		const eap_configuration_field_c * const field,
       
    77 		eap_variable_data_c * const data) = 0;
       
    78 
       
    79 	/**
       
    80 	 * The write_configure() function writes the configuration data identified
       
    81 	 * by the field string of field_length bytes length. Adaptation module must direct
       
    82 	 * the action to some persistent store.
       
    83 	 * @see abs_eap_base_type_c::write_configure().
       
    84 	 */
       
    85 	virtual eap_status_e write_configure(
       
    86 		const eap_configuration_field_c * const field,
       
    87 		eap_variable_data_c * const data) = 0;
       
    88 
       
    89 	/**
       
    90 	 * The set_timer() function initializes timer to be elapsed after p_time_ms milliseconds.
       
    91 	 * @param initializer is pointer to object which timer_expired() function will
       
    92 	 * be called after timer elapses.
       
    93 	 * @param id is identifier which will be returned in timer_expired() function.
       
    94 	 * The user selects and interprets the id for this timer.
       
    95 	 * @param data is pointer to any user selected data which will be returned in timer_expired() function.
       
    96 	 *
       
    97 	 * Adaptation module internally implements the timer.
       
    98 	 */
       
    99 	virtual eap_status_e set_timer(
       
   100 		abs_eap_base_timer_c * const initializer, 
       
   101 		const u32_t id, 
       
   102 		void * const data,
       
   103 		const u32_t p_time_ms) = 0;
       
   104 
       
   105 	/**
       
   106 	 * The cancel_timer() function cancels the timer id initiated by initializer.
       
   107 	 *
       
   108 	 * Adaptation module internally implements the timer.
       
   109 	 */
       
   110 	virtual eap_status_e cancel_timer(
       
   111 		abs_eap_base_timer_c * const initializer, 
       
   112 		const u32_t id) = 0;
       
   113 
       
   114 	/**
       
   115 	 * The cancel_all_timers() function cancels all timers.
       
   116 	 * User should use this in termination of the stack before
       
   117 	 * the adaptation module of tools is deleted.
       
   118 	 * Preferred mode is to cancel each timer directly
       
   119 	 * using cancel_timer() function.
       
   120 	 *
       
   121 	 * Adaptation module internally implements the timer.
       
   122 	 */
       
   123 	virtual eap_status_e cancel_all_timers() = 0;
       
   124 
       
   125 	//--------------------------------------------------
       
   126 }; // class abs_eap_radius_state_c
       
   127 
       
   128 
       
   129 
       
   130 #endif //#if !defined(_ABS_RADIUS_STATE_H_)
       
   131 
       
   132 //--------------------------------------------------
       
   133 
       
   134 
       
   135 
       
   136 // End.