eapol/eapol_framework/eapol_common/include/abs_eap_base_timer.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_EAP_BASE_TIMER_H_)
       
    22 #define _ABS_EAP_BASE_TIMER_H_
       
    23 
       
    24 #include "eap_status.h"
       
    25 #include "eap_am_export.h"
       
    26 
       
    27 
       
    28 /// An interface class of timer events.
       
    29 /// Each class whishing to use timer must be derived from class abs_eap_base_timer_c.
       
    30 class EAP_EXPORT abs_eap_base_timer_c
       
    31 {
       
    32 private:
       
    33 	//--------------------------------------------------
       
    34 
       
    35 	//--------------------------------------------------
       
    36 protected:
       
    37 	//--------------------------------------------------
       
    38 
       
    39 	//--------------------------------------------------
       
    40 public:
       
    41 	//--------------------------------------------------
       
    42 
       
    43 	/**
       
    44 	 * The destructor of the abs_eap_base_timer_c class does nothing special.
       
    45 	 */
       
    46 	virtual ~abs_eap_base_timer_c()
       
    47 	{
       
    48 	}
       
    49 
       
    50 	/**
       
    51 	 * The constructor of the abs_eap_base_timer_c class does nothing special.
       
    52 	 */
       
    53 	abs_eap_base_timer_c()
       
    54 	{
       
    55 	}
       
    56 
       
    57 	/**
       
    58 	 * Function timer_expired() is called after the timer is elapsed.
       
    59 	 * @param id and data are set by caller of abs_eap_am_tools::set_timer() function.
       
    60 	 * @param id could be used to separate different timer events.
       
    61 	 * @param data could be pointer to any data that is needed in timer processing.
       
    62 	 */
       
    63 	virtual eap_status_e timer_expired(
       
    64 		const u32_t id, void *data) = 0;
       
    65 
       
    66 	/**
       
    67 	 * This function is called when timer event is deleted.
       
    68 	 * Initialiser of the data must delete the data.
       
    69 	 * Only the initializer knows the real type of data.
       
    70 	 * @param id could be used to separate different timer events.
       
    71 	 * @param data could be pointer to any data that is needed in timer processing.
       
    72 	 */
       
    73 	virtual eap_status_e timer_delete_data(
       
    74 		const u32_t id, void *data) = 0;
       
    75 
       
    76 	//--------------------------------------------------
       
    77 }; // class abs_eap_base_timer_c
       
    78 
       
    79 #endif //#if !defined(_ABS_EAP_BASE_TIMER_H_)
       
    80 
       
    81 //--------------------------------------------------
       
    82 
       
    83 
       
    84 
       
    85 // End.