|
1 /* |
|
2 * Copyright (c) 2005 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 the License "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: CTimer based timer class for Live TV application.* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CIPTV_LIVE_UI_OBJECT_TIMER_H |
|
21 #define __CIPTV_LIVE_UI_OBJECT_TIMER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> // CTimer |
|
25 // FORWARD DECLARATIONS |
|
26 class MIptvLiveUITimerObserver; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 /** |
|
30 * Live TV timer class derived from CTimer. |
|
31 */ |
|
32 class CIptvLiveUIObjectTimer : public CTimer |
|
33 { |
|
34 |
|
35 public: // Constructors and destructor |
|
36 |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param aObserver Timer observer. |
|
40 */ |
|
41 IMPORT_C static CIptvLiveUIObjectTimer* NewL( |
|
42 MIptvLiveUITimerObserver* aObserver ); |
|
43 |
|
44 /** |
|
45 * Virtual destructor. |
|
46 */ |
|
47 IMPORT_C virtual ~CIptvLiveUIObjectTimer(); |
|
48 |
|
49 public: // New functions |
|
50 |
|
51 /** |
|
52 * Start a timer. |
|
53 * @param aTime Time when timer fires. |
|
54 */ |
|
55 IMPORT_C void StartTimer( const TTime& aTime ); |
|
56 |
|
57 |
|
58 public: // Functions from base classes |
|
59 |
|
60 /** |
|
61 * From CActive. |
|
62 * Handles an active object's request completion event. |
|
63 */ |
|
64 void RunL(); |
|
65 |
|
66 /** |
|
67 * From CActive. |
|
68 * Implements cancellation of an outstanding request. |
|
69 */ |
|
70 void DoCancel(); |
|
71 |
|
72 /** |
|
73 * From CActive. |
|
74 * Handles a leave occurring in the request completion event handler |
|
75 * RunL(). |
|
76 * @param aError Error code. |
|
77 * @return KErrNone. |
|
78 */ |
|
79 TInt RunError( TInt aError ); |
|
80 |
|
81 private: // Constructors |
|
82 |
|
83 /** |
|
84 * Private C++ constructor. |
|
85 * @param aObserver Timer observer. |
|
86 */ |
|
87 CIptvLiveUIObjectTimer( MIptvLiveUITimerObserver* aObserver ); |
|
88 |
|
89 /** |
|
90 * By default Symbian 2nd phase constructor is private. |
|
91 */ |
|
92 void ConstructL(); |
|
93 |
|
94 |
|
95 private: // Data |
|
96 |
|
97 /** |
|
98 * Timer observer. |
|
99 */ |
|
100 MIptvLiveUITimerObserver* iObserver; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // __CIPTV_LIVE_UI_OBJECT_TIMER_H |
|
105 |
|
106 // End of File |