1 /* |
|
2 * Copyright (c) 2005-2007 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: Header file for the CUPnPAIWTimer class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef UPNP_AIW_TIMER_H |
|
20 #define UPNP_AIW_TIMER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32cons.h> |
|
25 #include <coecntrl.h> |
|
26 #include <AknUtils.h> |
|
27 #include "upnpaiwtimerobserver.h" |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CUPnPAiWTimer class. |
|
33 */ |
|
34 class CUPnPAiwTimer : public CBase, |
|
35 public MBeating |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Static NewL method to construct the timer. |
|
42 * |
|
43 * @since S60 3.0 |
|
44 * @param aInterval (TInt) Timer interval in seconds |
|
45 * @param aCallback (MUPnPAiwTimerObserver*) call back reference |
|
46 * @return CUPnPAVTimer* timer instance |
|
47 */ |
|
48 static CUPnPAiwTimer* NewL( TInt aInterval, |
|
49 MUPnPAiwTimerObserver* aCallback ); |
|
50 |
|
51 // Destructor |
|
52 virtual ~CUPnPAiwTimer(); |
|
53 |
|
54 private: |
|
55 |
|
56 /** |
|
57 * ConstructL. |
|
58 * |
|
59 * @since S60 3.0 |
|
60 * @param aInterval (TInt) Timer interval in seconds |
|
61 * @param aCallback (MUPnPAiwTimerObserver*) call back reference |
|
62 */ |
|
63 void ConstructL( TInt aInterval, |
|
64 MUPnPAiwTimerObserver* aCallback ); |
|
65 |
|
66 /** |
|
67 * Constructor. |
|
68 * |
|
69 * @since S60 3.0 |
|
70 */ |
|
71 CUPnPAiwTimer(); |
|
72 |
|
73 private: // for MBeating |
|
74 |
|
75 /** |
|
76 * Called when the beat is in sync. |
|
77 * |
|
78 * @since S60 3.0 |
|
79 */ |
|
80 void Beat(); |
|
81 |
|
82 /** |
|
83 * Called when the beat needs to be syncronized. |
|
84 * |
|
85 * @since S60 3.0 |
|
86 */ |
|
87 void Synchronize(); |
|
88 |
|
89 private: // Data members |
|
90 |
|
91 // Heartbeat active object |
|
92 CHeartbeat* iHeartbeat; // owned |
|
93 |
|
94 // Call back pointer |
|
95 MUPnPAiwTimerObserver *iCallback; // not owned |
|
96 |
|
97 // Interval in seconds |
|
98 TInt iInterval; |
|
99 |
|
100 // Heartbeat counter |
|
101 TInt iCounter; |
|
102 |
|
103 }; |
|
104 |
|
105 #endif // UPNP_AIW_TIMER_H |
|
106 |
|
107 // End of file |
|