|
1 /* |
|
2 * Copyright (c) 2002-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: Active object to monitor the refresh event. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CSATREFRESHMONITOR_H |
|
21 #define CSATREFRESHMONITOR_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <msatrefreshobserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RSatRefresh; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Active object for monitoring the refresh event. |
|
34 * |
|
35 * @lib SatClient |
|
36 * @since 2.6 |
|
37 */ |
|
38 class CSatRefreshMonitor : public CActive |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aRefresh Refresh sub-session. |
|
45 * @param aObserver Observer for refresh event. |
|
46 */ |
|
47 static CSatRefreshMonitor* NewL( |
|
48 RSatRefresh& aRefresh, |
|
49 MSatRefreshObserver& aObserver ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CSatRefreshMonitor(); |
|
55 |
|
56 public: // New functions |
|
57 |
|
58 /** |
|
59 * Starts to monitor the refresh event. |
|
60 * @since 2.6 |
|
61 */ |
|
62 void Start(); |
|
63 |
|
64 protected: // Functions from Base classes. |
|
65 |
|
66 /** |
|
67 * From CActive. |
|
68 */ |
|
69 void RunL(); |
|
70 |
|
71 /** |
|
72 * From CActive. |
|
73 */ |
|
74 void DoCancel(); |
|
75 |
|
76 private: |
|
77 |
|
78 /** |
|
79 * C++ default constructor. |
|
80 * @param aRefresh Refresh sub-session. |
|
81 * @param aObserver Observer for refresh event. |
|
82 */ |
|
83 CSatRefreshMonitor( |
|
84 RSatRefresh& aRefresh, |
|
85 MSatRefreshObserver& aObserver ); |
|
86 |
|
87 private: // Data |
|
88 // Observer |
|
89 MSatRefreshObserver& iObserver; |
|
90 |
|
91 // Refresh sub session. |
|
92 RSatRefresh& iRefresh; |
|
93 |
|
94 // Changed files |
|
95 TSatRefreshFiles iChangedFiles; |
|
96 |
|
97 // Changed files package. |
|
98 TPckg<TSatRefreshFiles> iChangedFilesPckg; |
|
99 |
|
100 // Refresh type. |
|
101 TSatRefreshType iType; |
|
102 |
|
103 // Refresh type package. |
|
104 TPckg<TSatRefreshType> iTypePckg; |
|
105 }; |
|
106 |
|
107 #endif // CSATREFRESHMONITOR_H |
|
108 |
|
109 // End of File |