|
1 /* |
|
2 * Copyright (c) 2003 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 for Imps Transport. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef IMPSTRANSPORTTIMER_H |
|
21 #define IMPSTRANSPORTTIMER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "ImpsTransportTimerCallback.h" |
|
26 |
|
27 class TImpsTimingRequester; |
|
28 // CLASS DECLARATION |
|
29 |
|
30 class CImpsTransportTimer : public CActive |
|
31 { |
|
32 public: // Constructors and destructor |
|
33 |
|
34 /** |
|
35 * Two-phased constructor. |
|
36 * @param aCallback A pointer to MMmsViewerTimerCallback class |
|
37 */ |
|
38 static CImpsTransportTimer* NewL( MImpsTransportTimerCallback* aCallback, |
|
39 TImpsTimingRequester* aRequester ); |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~CImpsTransportTimer(); |
|
45 |
|
46 public: // New functions |
|
47 |
|
48 /** |
|
49 * Request to activate timer |
|
50 * @param aDelay Time in microseconds after which |
|
51 * the callback function is called. |
|
52 */ |
|
53 void ActivateTimer( TTimeIntervalMicroSeconds32 aDelay ); |
|
54 |
|
55 private: |
|
56 |
|
57 /** |
|
58 * By default Symbian OS constructor is private. |
|
59 */ |
|
60 void ConstructL(); |
|
61 |
|
62 /** |
|
63 * C++ constructor. |
|
64 * @param aCallback A pointer to MImpsTransportTimerCallback class |
|
65 * @param aRequester Who constructed and/or activated the timer |
|
66 * @param aLogging Trace or not |
|
67 */ |
|
68 CImpsTransportTimer( MImpsTransportTimerCallback* aCallback, |
|
69 TImpsTimingRequester* aRequester ); |
|
70 |
|
71 /** |
|
72 * From CActive. |
|
73 * @return void |
|
74 */ |
|
75 void RunL(); |
|
76 |
|
77 /** |
|
78 * From CActive. |
|
79 * @return void |
|
80 */ |
|
81 void DoCancel(); |
|
82 |
|
83 private: // Data |
|
84 |
|
85 RTimer iTimer; |
|
86 TImpsTimingRequester* iRequester; |
|
87 MImpsTransportTimerCallback* iCallback; |
|
88 }; |
|
89 |
|
90 #endif //IMPSTRANSPORTTIMER_H |
|
91 |
|
92 // End of File |