resourcemgmt/hwresourcesmgr/server/inc/HWRMFmTxPowersaveTimer.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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 "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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef HWRMFMTXPOWERSAVETIMER_H
       
    21 #define HWRMFMTXPOWERSAVETIMER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 /**
       
    26 *  An interface for handling timer expiration events.
       
    27 *
       
    28 */
       
    29 NONSHARABLE_CLASS (MHWRMFmTxPowerSaveTimerObserver)
       
    30     {
       
    31 public:
       
    32     /**
       
    33     * This callback method is used to notify the client about
       
    34     * the timer expiry.
       
    35     *     
       
    36     */
       
    37     virtual void TimerExpired() = 0;
       
    38     };
       
    39     
       
    40 /**
       
    41 *  Timer for FmTx power save
       
    42 */
       
    43 NONSHARABLE_CLASS (CHWRMFmTxPowerSaveTimer) : public CTimer
       
    44     {
       
    45 public:
       
    46     
       
    47     /**
       
    48     * Two-phased constructor.
       
    49     *
       
    50     * @param aTimerObserver Reference to observer class.
       
    51     */
       
    52     static CHWRMFmTxPowerSaveTimer* NewL( MHWRMFmTxPowerSaveTimerObserver& aTimerObserver );
       
    53 
       
    54     /**
       
    55     * Destructor.
       
    56     */
       
    57     virtual ~CHWRMFmTxPowerSaveTimer();
       
    58 
       
    59     /**
       
    60     * Starts timer
       
    61     *
       
    62     * @param aTimeout Timer timeout in microseconds
       
    63     */
       
    64     void Start( const TTimeIntervalMicroSeconds32 aTimeout );
       
    65 
       
    66     /**
       
    67     * Stops timer   
       
    68     */
       
    69     void Stop();
       
    70 
       
    71 private:
       
    72     /**
       
    73     * C++ default constructor.
       
    74     * Not used.
       
    75     */ 
       
    76     CHWRMFmTxPowerSaveTimer();
       
    77     
       
    78     /**
       
    79     * Constructor.
       
    80     *
       
    81     * @param aTimerObserver Reference to observer class.
       
    82     */
       
    83     CHWRMFmTxPowerSaveTimer( MHWRMFmTxPowerSaveTimerObserver& aTimerObserver );
       
    84 
       
    85     /**
       
    86     * Symbian second phase constructor.
       
    87     */
       
    88     void ConstructL();
       
    89     
       
    90     // from CTimer
       
    91     void RunL();
       
    92 
       
    93 private: // data
       
    94 
       
    95     /**
       
    96     * Reference to power save timer observer.
       
    97     */
       
    98     MHWRMFmTxPowerSaveTimerObserver& iTimerObserver;
       
    99     };
       
   100 
       
   101 #endif  //HWRMFMTXPOWERSAVETIMER_H