javamanager/javacaptain/inc.s60/tickerprovider.h
changeset 21 2a9601315dfc
child 50 023eef975703
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     1 /*
       
     2 * Copyright (c) 2008 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:  TimerServer
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TICKERPROVIDER_H
       
    19 #define TICKERPROVIDER_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "tickerproviderinterface.h"
       
    25 
       
    26 namespace java
       
    27 {
       
    28 namespace captain
       
    29 {
       
    30 
       
    31 class TickerProvider : public CActive,
       
    32         public TickerProviderInterface
       
    33 {
       
    34     TickerProvider();                   // Cannot be used
       
    35     TickerProvider(TickerProvider&);    // Cannot be used
       
    36 
       
    37 public:
       
    38     TickerProvider(TickerProviderEventsInterface* aEvents);
       
    39     virtual ~TickerProvider();
       
    40 
       
    41     virtual void nextTickAt(const long long& aJavaTime);
       
    42     virtual long long getNextTickAt();
       
    43     virtual void cancel();
       
    44 
       
    45     // Helpers
       
    46 //    virtual long long getCurrentJavaTime();
       
    47 
       
    48 protected:
       
    49     // CActive
       
    50     virtual void RunL();
       
    51     virtual void DoCancel();
       
    52 
       
    53 private:
       
    54     RTimer      mRTimer;
       
    55     long long   mNextTickAt;
       
    56 };
       
    57 
       
    58 } // namespace captain
       
    59 } // namespace java
       
    60 
       
    61 #endif // TICKERPROVIDER_H
       
    62