|
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 AknKeyLock.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_TESTSDKKEYLOCK_H |
|
21 #define C_TESTSDKKEYLOCK_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <stiflogger.h> |
|
25 #include <testscripterinternal.h> |
|
26 #include <stiftestmodule.h> |
|
27 #include <testclassassert.h> |
|
28 |
|
29 |
|
30 #define TEST_CLASS_VERSION_MAJOR 0 |
|
31 #define TEST_CLASS_VERSION_MINOR 0 |
|
32 #define TEST_CLASS_VERSION_BUILD 0 |
|
33 |
|
34 // Logging path |
|
35 _LIT( KtestsdkkeylockLogPath, "\\logs\\testframework\\testsdkkeylock\\" ); |
|
36 // Log file |
|
37 _LIT( KtestsdkkeylockLogFile, "testsdkkeylock.txt" ); |
|
38 _LIT( KtestsdkkeylockLogFileWithTitle, "testsdkkeylock_[%S].txt" ); |
|
39 |
|
40 class CTestSDKKeyLock; |
|
41 |
|
42 /** |
|
43 * CTestSDKKeyLock test class for STIF Test Framework TestScripter. |
|
44 */ |
|
45 NONSHARABLE_CLASS(CTestSDKKeyLock) : public CScriptBase |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CTestSDKKeyLock* NewL( CTestModuleIf& aTestModuleIf ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CTestSDKKeyLock(); |
|
58 |
|
59 public: // Functions from base classes |
|
60 |
|
61 /** |
|
62 * From CScriptBase Runs a script line. |
|
63 * @since ?Series60_version |
|
64 * @param aItem Script line containing method name and parameters |
|
65 * @return Symbian OS error code |
|
66 */ |
|
67 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
68 |
|
69 private: |
|
70 |
|
71 /** |
|
72 * C++ default constructor. |
|
73 */ |
|
74 CTestSDKKeyLock( CTestModuleIf& aTestModuleIf ); |
|
75 |
|
76 /** |
|
77 * By default Symbian 2nd phase constructor is private. |
|
78 */ |
|
79 void ConstructL(); |
|
80 |
|
81 /** |
|
82 * Frees all resources allocated from test methods. |
|
83 * @since ?Series60_version |
|
84 */ |
|
85 void Delete(); |
|
86 /** |
|
87 * Method used to log version of test class |
|
88 */ |
|
89 void SendTestClassVersion(); |
|
90 |
|
91 /** |
|
92 * Turn off ScreenSaver |
|
93 * @since S60 5.0 |
|
94 * @return Symbian OS error code. |
|
95 */ |
|
96 void TurnOffScreenSaver(); |
|
97 |
|
98 /** |
|
99 * Restore ScreenSaver |
|
100 * @since S60 5.0 |
|
101 * @return Symbian OS error code. |
|
102 */ |
|
103 void RestoreScreenSaver(); |
|
104 |
|
105 |
|
106 private: // Test AknKeyLock.h |
|
107 /* class RAknKeylock2 */ |
|
108 /** |
|
109 * TestKLConnectL test function for testing the |
|
110 * Connect function |
|
111 * @since S60 5.0 |
|
112 * @param aItem never used |
|
113 * @return Symbian OS error code. |
|
114 */ |
|
115 virtual TInt TestKLConnectL( CStifItemParser& aItem ); |
|
116 |
|
117 /* class RAknKeyLock */ |
|
118 /** |
|
119 * TestKLEnableKeyLockL test function for testing the EnableKeyLock function |
|
120 * @since S60 5.0 |
|
121 * @param aItem never used |
|
122 * @return Symbian OS error code. |
|
123 */ |
|
124 virtual TInt TestKLEnableKeyLockL( CStifItemParser& aItem ); |
|
125 |
|
126 /** |
|
127 * TestKLDisableKeyLockL test function for testing the DisableKeyLock function |
|
128 * @since S60 5.0 |
|
129 * @param aItem never used |
|
130 * @return Symbian OS error code. |
|
131 */ |
|
132 virtual TInt TestKLDisableKeyLockL( CStifItemParser& aItem ); |
|
133 |
|
134 /** |
|
135 * TestKLIsKeyLockEnabledL test function for testing the |
|
136 * IsKeyLockEnabled function |
|
137 * @since S60 5.0 |
|
138 * @param aItem never used |
|
139 * @return Symbian OS error code. |
|
140 */ |
|
141 virtual TInt TestKLIsKeyLockEnabledL( CStifItemParser& aItem ); |
|
142 |
|
143 /** |
|
144 * TestKLEnableSoftNotificationsL test function for testing the |
|
145 * EnableSoftNotifications function |
|
146 * @since S60 5.0 |
|
147 * @param aItem never used |
|
148 * @return Symbian OS error code. |
|
149 */ |
|
150 virtual TInt TestKLEnableSoftNotificationsL( CStifItemParser& aItem ); |
|
151 |
|
152 /** |
|
153 * TestKLOfferKeyLockL test function for testing the OfferKeyLock function |
|
154 * @since S60 5.0 |
|
155 * @param aItem never used |
|
156 * @return Symbian OS error code. |
|
157 */ |
|
158 virtual TInt TestKLOfferKeyLockL( CStifItemParser& aItem ); |
|
159 |
|
160 /** |
|
161 * TestKLCancelAllNotificationsL test function for testing the |
|
162 * CancelAllNotifications function |
|
163 * @since S60 5.0 |
|
164 * @param aItem never used |
|
165 * @return Symbian OS error code. |
|
166 */ |
|
167 virtual TInt TestKLCancelAllNotificationsL( CStifItemParser& aItem ); |
|
168 |
|
169 /** |
|
170 * TestKLDisableWithoutNoteL test function for testing the |
|
171 * DisableWithoutNote function |
|
172 * @since S60 5.0 |
|
173 * @param aItem never used |
|
174 * @return Symbian OS error code. |
|
175 */ |
|
176 virtual TInt TestKLDisableWithoutNoteL( CStifItemParser& aItem ); |
|
177 |
|
178 /** |
|
179 * TestKLEnableWithoutNoteL test function for testing the |
|
180 * EnableWithoutNote function |
|
181 * @since S60 5.0 |
|
182 * @param aItem never used |
|
183 * @return Symbian OS error code. |
|
184 */ |
|
185 virtual TInt TestKLEnableWithoutNoteL( CStifItemParser& aItem ); |
|
186 |
|
187 /** |
|
188 * TestKLEnableAutoLockEmulationL test function for testing the |
|
189 * EnableAutoLockEmulation function |
|
190 * @since S60 5.0 |
|
191 * @param aItem never used |
|
192 * @return Symbian OS error code. |
|
193 */ |
|
194 virtual TInt TestKLEnableAutoLockEmulationL( CStifItemParser& aItem ); |
|
195 |
|
196 private: // Data |
|
197 |
|
198 TInt iOldScreenSaverProperty; |
|
199 }; |
|
200 |
|
201 #endif // C_TESTSDKKEYLOCK_H |
|
202 |
|
203 // End of File |