wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlantimer.h
changeset 13 ab7247ff6ef9
equal deleted inserted replaced
0:c40eb8fe8501 13:ab7247ff6ef9
       
     1 /*
       
     2 * Copyright (c) 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 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:
       
    15 * This class implements timer services.
       
    16 *
       
    17 */
       
    18 
       
    19 /*
       
    20 * %version: 1 %
       
    21 */
       
    22 
       
    23 #ifndef C_WLANTIMER_H
       
    24 #define C_WLANTIMER_H
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 /**
       
    29  *  CWlanTimer class.
       
    30  *
       
    31  *  Class providing timer services. The underlaying implementation relies
       
    32  *  on CTimer. Therefore this module has the same limitations as CTimer.
       
    33  * 
       
    34  *  @lib wlmserversrv.dll
       
    35  *  @since S60 v5.2
       
    36  */
       
    37  
       
    38 NONSHARABLE_CLASS( CWlanTimer ) : public CTimer
       
    39     {
       
    40     
       
    41 public: // CWlanTimer public methods
       
    42 
       
    43     /**
       
    44      * Static constructor.
       
    45      * @param aTimerExpiredCB   Callback for indicating timer expiry.
       
    46      * @param aTimerCancelledCB Callback for indicating timer cancellation.
       
    47      * @param aTimerErrorCB     Callback for indicating timer error.
       
    48      */
       
    49     static CWlanTimer* NewL(
       
    50         const TCallBack& aTimerExpiredCB,
       
    51         const TCallBack& aTimerCancelledCB,
       
    52         const TCallBack& aTimerErrorCB );
       
    53         
       
    54     /**
       
    55      * Destructor.
       
    56      */
       
    57     ~CWlanTimer();
       
    58 
       
    59 private: // CWlanTimer private methods
       
    60 
       
    61     /**
       
    62      * C++ constructor.
       
    63      * @param aTimerExpiredCB   Callback for indicating timer expiry.
       
    64      * @param aTimerCancelledCB Callback for indicating timer cancellation.
       
    65      * @param aTimerErrorCB     Callback for indicating timer error.
       
    66      */
       
    67     CWlanTimer(
       
    68         const TCallBack& aTimerExpiredCB,
       
    69         const TCallBack& aTimerCancelledCB,
       
    70         const TCallBack& aTimerErrorCB );
       
    71     
       
    72     /**
       
    73      * Symbian 2nd phase constructor.
       
    74      */
       
    75     void ConstructL();
       
    76 
       
    77 private: // From CTimer
       
    78 
       
    79     /**
       
    80      * Handles timer events.
       
    81      */
       
    82     void RunL();
       
    83     
       
    84     /**
       
    85      * Implements cancellation of an outstanding request.
       
    86      */
       
    87     void DoCancel();
       
    88 
       
    89 private: // CWlanTimer private data
       
    90 
       
    91     /**
       
    92      * TimerExpiredCB.
       
    93      * Registered callback method that is called, when the timer
       
    94      * expires. This is set when CWlanTimer instance is created.
       
    95      */   
       
    96     TCallBack iTimerExpiredCB;
       
    97     
       
    98     /**
       
    99      * TimerCancelledCB.
       
   100      * Registered callback method that is called, when the timer
       
   101      * is cancelled by an external event (i.e. cancellation is
       
   102      * not requested by the client). This is set when CWlanTimer
       
   103      * instance is created.
       
   104      */
       
   105     TCallBack iTimerCancelledCB;
       
   106     
       
   107     /**
       
   108      * TimerErrorCB.
       
   109      * Registered callback method that is called, when there is
       
   110      * a timer error. This is set when CWlanTimer instance is created.
       
   111      */
       
   112     TCallBack iTimerErrorCB;
       
   113     };
       
   114 
       
   115 #endif // C_WLANTIMER_H