|
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: Class for making Feed Engine backup and restore aware. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BACKRESTOREHANDLER_H |
|
20 #define BACKRESTOREHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32property.h> |
|
24 #include <e32base.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CFeedsServer; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 class CBackRestoreHandler : public CActive |
|
31 { |
|
32 public: // Constructors and destructor |
|
33 /** |
|
34 * Two-phased constructor. |
|
35 */ |
|
36 static CBackRestoreHandler* NewL(CFeedsServer*); |
|
37 static CBackRestoreHandler* NewLC(CFeedsServer*); |
|
38 /** |
|
39 * Destructor. |
|
40 */ |
|
41 ~CBackRestoreHandler(); |
|
42 private: // Constructor |
|
43 |
|
44 /** |
|
45 * C++ default constructor. |
|
46 */ |
|
47 CBackRestoreHandler(); |
|
48 /** |
|
49 * By default Symbian 2nd phase constructor is private. |
|
50 * |
|
51 * @param pointer to CFeedsServer class,This pointer will be used to make server sleep and to wake up server |
|
52 * |
|
53 */ |
|
54 void ConstructL(CFeedsServer*); |
|
55 |
|
56 public: //Functions from CActive Class |
|
57 /** |
|
58 * Handles an active object's request completion event. |
|
59 * |
|
60 * @since ? |
|
61 * @return void. |
|
62 */ |
|
63 void RunL(); |
|
64 |
|
65 /** |
|
66 * Called by CActiveScheduler when RunL() Method leaves. |
|
67 * |
|
68 * @since ? |
|
69 * @return void. |
|
70 */ |
|
71 void RunError(); |
|
72 |
|
73 /** |
|
74 * Called by CActiveScheduler when Cancel() Method is called. |
|
75 * |
|
76 * @since ? |
|
77 * @return void. |
|
78 */ |
|
79 void DoCancel(); |
|
80 |
|
81 public: //Functions from CActive Class |
|
82 /** |
|
83 * This method subscribe to receive event when OS level |
|
84 * variable KUidBackupRestoreKey is changed by Backup or Restore |
|
85 * process |
|
86 * |
|
87 * @since 3.2 |
|
88 * @return void. |
|
89 */ |
|
90 void StartListening(); |
|
91 |
|
92 /** |
|
93 * This method unsubscribe to the events from publish and subscribe server |
|
94 * |
|
95 * @since 3.2 |
|
96 * @return void. |
|
97 */ |
|
98 void StopListening(); |
|
99 |
|
100 private: |
|
101 RProperty iProperty; |
|
102 TBool iIsListening; |
|
103 TBool iIsBkpRestoreInProgress; |
|
104 CFeedsServer* iFeedServer; |
|
105 }; |
|
106 |
|
107 |
|
108 #endif //BACKRESTOREHANDLER_H |
|
109 |
|
110 // End of File |