wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmtimer.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  generic Symbian timer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WLMTIMER_H
       
    20 #define WLMTIMER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "abs_core_timer.h"
       
    25 
       
    26 class core_callback_c;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 /**
       
    30 * This class implements a generic Symbian timer.
       
    31 *
       
    32 * Timers are instantiated using the the timer factory.
       
    33 * @see core_timer_factory_c::create_timer
       
    34 */
       
    35 NONSHARABLE_CLASS( am_symbian_timer_c ) :
       
    36     public CTimer,
       
    37     public abs_core_timer_c
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40         
       
    41         /**
       
    42         * C++ default constructor.
       
    43         * @param callback Callback to call when the timer expires.
       
    44         */
       
    45         am_symbian_timer_c(
       
    46             core_callback_c* callback );
       
    47         
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         virtual ~am_symbian_timer_c();
       
    52 
       
    53     public: // Functions from base classes
       
    54 
       
    55         /**
       
    56         * From abs_core_timer_c Start the timer.
       
    57         * @param delay Expiracy time in micro seconds.
       
    58         */        
       
    59         void start(
       
    60             unsigned long int delay );
       
    61 
       
    62         /**
       
    63         * From abs_core_timer_c Stop the timer.
       
    64         */
       
    65         void stop();
       
    66 
       
    67         /**
       
    68         * From abs_core_timer_c Check whether the timer is active.
       
    69         * @ return True if the timer is active, false otherwise.
       
    70         */
       
    71         bool_t is_active() const;
       
    72 
       
    73     protected:  // Functions from base classes
       
    74         
       
    75         /**
       
    76         * From CTimer Action of timer expiration.
       
    77         */
       
    78         void RunL();
       
    79 
       
    80     private:
       
    81 
       
    82         // Prohibit copy constructor if not deriving from CBase.
       
    83         am_symbian_timer_c(
       
    84             const am_symbian_timer_c& );
       
    85         // Prohibit assigment operator if not deriving from CBase.
       
    86         am_symbian_timer_c& operator=(
       
    87             const am_symbian_timer_c& );
       
    88 
       
    89     private:    // Data
       
    90 
       
    91         /** Callback to call when the timer expires. */
       
    92         core_callback_c* callback_m;
       
    93     };
       
    94 
       
    95 #endif // WLMTIMER_H
       
    96             
       
    97 // End of File