equal
deleted
inserted
replaced
|
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: TimerData |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TIMERDATA_H |
|
19 #define TIMERDATA_H |
|
20 |
|
21 #include "logger.h" |
|
22 |
|
23 #include "timerserverinterface.h" |
|
24 |
|
25 namespace java |
|
26 { |
|
27 namespace captain |
|
28 { |
|
29 |
|
30 class TimerData |
|
31 { |
|
32 public: |
|
33 TimerData(const JavaTime& aTimeout, TimerServerEventsInterface* aEvents) |
|
34 :mTimeout(aTimeout), mEvents(aEvents) |
|
35 { |
|
36 LOG3(EJavaCaptain, EInfoHeavyLoad, "TimerData(this=%#x, aTimeout=%u, aEvents=%#x)", |
|
37 this, aTimeout.getTime(), aEvents); |
|
38 } |
|
39 virtual ~TimerData() |
|
40 { |
|
41 LOG1(EJavaCaptain, EInfoHeavyLoad, "~TimerData(this=%#x)", this); |
|
42 } |
|
43 |
|
44 virtual const JavaTime& getTimeout() const |
|
45 { |
|
46 return mTimeout; |
|
47 } |
|
48 virtual void timeoutReached() |
|
49 { |
|
50 mEvents->timerTimeout((int)this); |
|
51 } |
|
52 |
|
53 private: |
|
54 const JavaTime mTimeout; |
|
55 TimerServerEventsInterface* mEvents; |
|
56 }; |
|
57 |
|
58 } // namespace captain |
|
59 } // namespace java |
|
60 |
|
61 #endif // TIMERDATA_H |