|
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 "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: |
|
15 * ?description_line |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPOSTp114_H |
|
21 #define CPOSTp114_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "FT_CLandmarkTestProcedureBase.h" |
|
25 #include <e32base.h> |
|
26 #include <e32property.h> |
|
27 |
|
28 // CLASS DECLARATION |
|
29 class CPosTp114BackupListener; |
|
30 class MUtfwLog; |
|
31 |
|
32 /** |
|
33 * Test procedure 114 |
|
34 */ |
|
35 class CPosTp114 :public CLandmarkTestProcedureBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * C++ default constructor. |
|
41 */ |
|
42 CPosTp114() : CLandmarkTestProcedureBase(114) {}; |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CPosTp114() {}; |
|
48 |
|
49 public: // Functions from base classes |
|
50 |
|
51 /** |
|
52 * From CUtfwTestBase |
|
53 * Retrieves the test module name |
|
54 * @param aName The name of the test module. |
|
55 */ |
|
56 void GetName( |
|
57 TDes& aName |
|
58 ) const; |
|
59 |
|
60 /** |
|
61 * From CUtfwTestBase |
|
62 * Always called, even if test leaves |
|
63 */ |
|
64 void CloseTest(); |
|
65 |
|
66 /** |
|
67 * From CLandmarkTestProcedureBase |
|
68 * Runs the test in the module |
|
69 */ |
|
70 void StartL(); |
|
71 |
|
72 private: |
|
73 TBool FileExistL(); |
|
74 |
|
75 void PrepareForRestoreTestL(); |
|
76 |
|
77 void InitBackupTestL(); |
|
78 |
|
79 TBool CheckDbAfterRestoreL(); |
|
80 |
|
81 private: |
|
82 //CPosTp114BackupListener* iBackupListener; |
|
83 |
|
84 }; |
|
85 |
|
86 /** |
|
87 * CPosTp114BackupListener |
|
88 */ |
|
89 class CPosTp114BackupListener : public CActive |
|
90 { |
|
91 public: // Constructors and destructor |
|
92 |
|
93 // Two-phased constructor. |
|
94 static CPosTp114BackupListener* NewL(MUtfwLog* aLog); |
|
95 |
|
96 /** |
|
97 * C++ Destructor |
|
98 */ |
|
99 ~CPosTp114BackupListener(); |
|
100 |
|
101 void StartCheckingL(); |
|
102 |
|
103 protected: // Functions from base classes |
|
104 |
|
105 /** |
|
106 * From CActive. |
|
107 * Active Object event handler. |
|
108 */ |
|
109 void RunL(); |
|
110 |
|
111 /** |
|
112 * From CActive. |
|
113 * Active Object cancel handler. |
|
114 */ |
|
115 void DoCancel(); |
|
116 |
|
117 private: |
|
118 |
|
119 /** |
|
120 * C++ Constructor |
|
121 */ |
|
122 CPosTp114BackupListener(); |
|
123 |
|
124 void ConstructL(MUtfwLog* aLog); |
|
125 |
|
126 TBool IsBackupRunning(); |
|
127 |
|
128 private: |
|
129 |
|
130 MUtfwLog* iLog; |
|
131 RProperty iProperty; |
|
132 TBool iBackupIsRunning; |
|
133 }; |
|
134 |
|
135 #endif // CPOSTp114_H |
|
136 |
|
137 // End of File |