|
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: Test alarm_api |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_TESTDOMALARM_H |
|
21 #define C_TESTDOMALARM_H |
|
22 |
|
23 /* |
|
24 * INCLUDES |
|
25 */ |
|
26 #include <stiflogger.h> |
|
27 #include <testscripterinternal.h> |
|
28 #include <stiftestmodule.h> |
|
29 #include <testclassassert.h> |
|
30 |
|
31 /* |
|
32 * MACROS |
|
33 */ |
|
34 #define TEST_CLASS_VERSION_MAJOR 0 |
|
35 #define TEST_CLASS_VERSION_MINOR 0 |
|
36 #define TEST_CLASS_VERSION_BUILD 0 |
|
37 |
|
38 _LIT( KtestdomalarmLogPath, "\\logs\\testframework\\testdomalarm\\" ); |
|
39 |
|
40 _LIT( KtestdomalarmLogFile, "testdomalarm.txt" ); |
|
41 _LIT( KtestdomalarmLogFileWithTitle, "testdomalarm_[%S].txt" ); |
|
42 |
|
43 /** |
|
44 * Ctestdomalarm test class for STIF Test Framework TestScripter. |
|
45 * @since S60 5.0 |
|
46 */ |
|
47 NONSHARABLE_CLASS(Ctestdomalarm) : public CScriptBase |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 static Ctestdomalarm* NewL( CTestModuleIf& aTestModuleIf ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 virtual ~Ctestdomalarm(); |
|
60 |
|
61 public: |
|
62 |
|
63 /** |
|
64 * From CScriptBase Runs a script line. |
|
65 * @since S60 5.0 |
|
66 * @param aItem Script line containing method name and parameters |
|
67 * @return Symbian OS error code |
|
68 */ |
|
69 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
70 |
|
71 private: |
|
72 |
|
73 /** |
|
74 * C++ default constructor. |
|
75 */ |
|
76 Ctestdomalarm( CTestModuleIf& aTestModuleIf ); |
|
77 |
|
78 /** |
|
79 * By default Symbian 2nd phase constructor is private. |
|
80 */ |
|
81 void ConstructL(); |
|
82 |
|
83 /** |
|
84 * Frees all resources allocated from test methods. |
|
85 * @since S60 5.0 |
|
86 */ |
|
87 void Delete(); |
|
88 |
|
89 /** |
|
90 * TestALARMAllFunctionL test function for testing the constructor , destructor ande constructl function |
|
91 * @since S60 5.0 |
|
92 * @param aItem never used |
|
93 * @return Symbian OS error code. |
|
94 */ |
|
95 virtual TInt TestALARMAllFunctionL( CStifItemParser& /*aItem*/ ); |
|
96 |
|
97 /** |
|
98 * Method used to log version of test class |
|
99 */ |
|
100 void SendTestClassVersion(); |
|
101 |
|
102 /** |
|
103 * Turn off ScreenSaver |
|
104 * @since S60 5.0 |
|
105 * @return Symbian OS error code. |
|
106 */ |
|
107 void TurnOffScreenSaver(); |
|
108 |
|
109 /** |
|
110 * Restore ScreenSaver |
|
111 * @since S60 5.0 |
|
112 * @return Symbian OS error code. |
|
113 */ |
|
114 void RestoreScreenSaver(); |
|
115 |
|
116 |
|
117 private: |
|
118 |
|
119 /** |
|
120 * ScreenSaver Property |
|
121 */ |
|
122 TInt iOldScreenSaverProperty; |
|
123 |
|
124 |
|
125 }; |
|
126 |
|
127 #endif |
|
128 |
|
129 /* |
|
130 * End of File |
|
131 */ |