|
1 /* |
|
2 * Copyright (c) 2007-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: Slideshow backlight timer management.. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef C_SHWSLIDESHOWBACKLIGHTTIMER_H |
|
22 #define C_SHWSLIDESHOWBACKLIGHTTIMER_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <shwconstants.h> |
|
26 |
|
27 // FORWARD DECLARATION |
|
28 class CRepository; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Media gallery backlight controlling timer (for slide show view) |
|
34 * @internal reviewed 07/06/2007 by Kimmo Hoikka |
|
35 */ |
|
36 NONSHARABLE_CLASS(CShwSlideshowBackLightTimer) : public CBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 */ |
|
43 static CShwSlideshowBackLightTimer* NewL(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CShwSlideshowBackLightTimer(); |
|
49 |
|
50 public: // New functions |
|
51 |
|
52 /** |
|
53 * Cancels the timer |
|
54 */ |
|
55 void Cancel(); |
|
56 |
|
57 /** |
|
58 * Starts the timer |
|
59 */ |
|
60 void StartL(); |
|
61 |
|
62 /** |
|
63 * Is timer active or not? |
|
64 * @return ETrue is active, EFalse otherwise |
|
65 */ |
|
66 TBool IsRunning(); |
|
67 |
|
68 /** |
|
69 * Delay value |
|
70 * @return TInt |
|
71 */ |
|
72 TInt Delay(); |
|
73 |
|
74 /** |
|
75 * Callback function for the timer to call |
|
76 * @param aObject any given object |
|
77 * @return TInt |
|
78 */ |
|
79 TInt Tick(); |
|
80 |
|
81 private: |
|
82 |
|
83 /** |
|
84 * C++ default constructor. |
|
85 */ |
|
86 CShwSlideshowBackLightTimer(); |
|
87 |
|
88 /** |
|
89 * Symbian 2nd phase constructor |
|
90 */ |
|
91 void ConstructL(); |
|
92 |
|
93 private: // Data |
|
94 |
|
95 TInt iSettingsDelay; |
|
96 TTime iStartTime; |
|
97 |
|
98 CPeriodic* iPeriodic; // owned |
|
99 }; |
|
100 |
|
101 #endif // C_SHWSLIDESHOWBACKLIGHTTIMER_H |