|
1 /* |
|
2 * Copyright (c) 2004,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 "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: This header defines the CSVGTProgressBarTimer Class |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __SVGTPROGRESSBARTIMER_H__ |
|
19 #define __SVGTPROGRESSBARTIMER_H__ |
|
20 |
|
21 // Includes |
|
22 #if !defined(__E32BASE_H__) |
|
23 #include <e32base.h> |
|
24 #endif |
|
25 |
|
26 |
|
27 /** |
|
28 * Interface for the progress timer event listener. |
|
29 * @lib SVGTUIControl.lib |
|
30 * @since 3.0 |
|
31 */ |
|
32 |
|
33 class MSVGTProgressBarListener |
|
34 { |
|
35 public: |
|
36 |
|
37 /** |
|
38 * This function is called when the progress timer event occurs. The |
|
39 * user of this interface will be notified after the amount of time elapsed |
|
40 * configured in KSccProgressBarTimerYieldDur. |
|
41 * @since 3.0 |
|
42 */ |
|
43 virtual void UpdateProgressBar( ) = 0; |
|
44 }; |
|
45 |
|
46 /** |
|
47 * Provides the timer functionality for progress time display for the |
|
48 * dialog. |
|
49 * @lib SVGTUIControl.lib |
|
50 * @since 3.0 |
|
51 */ |
|
52 |
|
53 class CSVGTProgressBarTimer : public CTimer |
|
54 { |
|
55 public: // Constructors and Destructor |
|
56 /** |
|
57 * Two-phased constructor. |
|
58 */ |
|
59 static CSVGTProgressBarTimer* NewLC( MSVGTProgressBarListener* |
|
60 aListener , |
|
61 TBool aResetInactivityTime ); |
|
62 |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 */ |
|
66 static CSVGTProgressBarTimer* NewL( MSVGTProgressBarListener* |
|
67 aListener, |
|
68 TBool aResetInactivityTime ); |
|
69 |
|
70 // Destructor |
|
71 virtual ~CSVGTProgressBarTimer(); |
|
72 |
|
73 public: // New functions |
|
74 public: // Functions from base classes |
|
75 |
|
76 /** |
|
77 * From CActive Implements cancellation of an outstanding request. |
|
78 * @since 3.0 |
|
79 */ |
|
80 void DoCancel(); |
|
81 |
|
82 /** |
|
83 * From CActive Handles the timer's request completion event. |
|
84 * @since 3.0 |
|
85 */ |
|
86 void RunL(); |
|
87 |
|
88 protected: // New functions |
|
89 protected: // Functions from base classes |
|
90 |
|
91 private: |
|
92 /** |
|
93 * C++ default constructor. |
|
94 */ |
|
95 CSVGTProgressBarTimer( MSVGTProgressBarListener* |
|
96 aListener , TBool aResetInactivityTime ); |
|
97 |
|
98 /** |
|
99 * Second Phase constructor. |
|
100 */ |
|
101 void ConstructL(); |
|
102 |
|
103 private: // Data |
|
104 |
|
105 // Listener for progress bar timer event |
|
106 MSVGTProgressBarListener* iListener; |
|
107 |
|
108 // Reset Inactivity time |
|
109 TBool iUseInactivityTime; |
|
110 }; |
|
111 #endif // __SVGTPROGRESSBARTIMER_H__ |
|
112 |
|
113 // End of File |
|
114 |