mmsharing/livecommsui/lcui/tsrc/dummymusengineplugin/inc/svptimer.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2007 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:  Timer services for SVP
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SVPTIMER_H
       
    21 #define SVPTIMER_H
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 class MSVPTimerObserver;
       
    26 
       
    27 /**
       
    28  *  SVP timer
       
    29  *
       
    30  *  Provides timer service for SVP 
       
    31  *
       
    32  *  @lib 
       
    33  *  @since S60 3.2
       
    34  */
       
    35 class CSVPTimer : public CTimer
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41     * Two-phased constructor.
       
    42     */
       
    43     static CSVPTimer* NewL( MSVPTimerObserver& aObserver,
       
    44                             TInt aTimerId );
       
    45     
       
    46     /**
       
    47     * Destructor.
       
    48     */
       
    49     virtual ~CSVPTimer();
       
    50 
       
    51 public: // new methods
       
    52 
       
    53     /**
       
    54     * Sets the timer to be fired after given number of milliseconds.
       
    55     * @since Series 60 3.2
       
    56     * @param aMilliSeconds Time in milliseconds 
       
    57     * @return 
       
    58     */
       
    59     void SetTime( TInt aMilliSeconds );
       
    60 
       
    61     /**
       
    62     * Stops the timer.
       
    63     * @since Series 60 3.2
       
    64     * @return 
       
    65     */
       
    66     void Stop();
       
    67 
       
    68     /**
       
    69     * Returns the Timer ID
       
    70     * @since Series 60 3.2
       
    71     * @return TInt The timer ID.
       
    72     */
       
    73     TInt Id() const;
       
    74     
       
    75 public: // methods from base classes
       
    76 
       
    77     /**
       
    78     * From CActive Called when an aychronic request is completed.
       
    79     * @since Series 60 3.0
       
    80     * @param None
       
    81     * @return None
       
    82     */
       
    83     void RunL();
       
    84 
       
    85 private:
       
    86 
       
    87     /**
       
    88     * C++ default constructor.
       
    89     */
       
    90     CSVPTimer( MSVPTimerObserver& aObserver, TInt aTimerId );
       
    91 
       
    92     /**
       
    93     * By default Symbian 2nd phase constructor is private.
       
    94     */
       
    95     void ConstructL();
       
    96 
       
    97 private: // data
       
    98     
       
    99     /**
       
   100     * Reference to the observer.
       
   101     */
       
   102     MSVPTimerObserver& iObserver;
       
   103   
       
   104     /**
       
   105     * The timer ID, given to observer when the timer fires.
       
   106     * Timers can be identifies with this ID.
       
   107     */
       
   108     TInt iId;
       
   109 		
       
   110     };
       
   111 
       
   112 #endif // SVPTIMER_H