javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swttimer.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*******************************************************************************
       
     2  * Copyright (c) 2005, 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved. This program and the accompanying materials
       
     4  * are made available under the terms of the Eclipse Public License v1.0
       
     5  * which accompanies this distribution, and is available at
       
     6  * http://www.eclipse.org/legal/epl-v10.html
       
     7  *
       
     8  * Contributors:
       
     9  *     Nokia Corporation - S60 implementation
       
    10  *******************************************************************************/
       
    11 
       
    12 
       
    13 #ifndef SWTTIMER_H
       
    14 #define SWTTIMER_H
       
    15 
       
    16 
       
    17 #include <e32base.h>
       
    18 #include "eswt.h"
       
    19 
       
    20 
       
    21 class ASwtDisplayBase;
       
    22 
       
    23 
       
    24 /**
       
    25  * CSwtTimer
       
    26  * @lib eswt
       
    27  */
       
    28 NONSHARABLE_CLASS(CSwtTimer)
       
    29         : public CBase
       
    30 {
       
    31 public:
       
    32     static CSwtTimer* NewL(ASwtDisplayBase& aDisplay);
       
    33     ~CSwtTimer();
       
    34 
       
    35 public:
       
    36     void ExecuteAfterLD(TInt aDelayInMilliSecs, TInt aTimerHandle);
       
    37 
       
    38 private:
       
    39     inline CSwtTimer(ASwtDisplayBase& aDisplay);
       
    40     void ConstructL();
       
    41 
       
    42 private:
       
    43     static TInt TimerCallback(TAny* aThis);
       
    44 
       
    45     void DoTimerCallbackL();
       
    46     void ExecuteCallbackJavaSideL();
       
    47 
       
    48 private:
       
    49     ASwtDisplayBase& iDisplay;
       
    50     CPeriodic*       iTimer;
       
    51     TInt             iTimerHandle;
       
    52 };
       
    53 
       
    54 #endif // SWTTIMER_H