1 /* |
|
2 * Copyright (c) 2005-2006 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: Implementation of class CSettingsPluginApiTest |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_SETTINGSPLUGINAPITEST_H |
|
20 #define C_SETTINGSPLUGINAPITEST_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <StifLogger.h> |
|
24 #include <TestScripterInternal.h> |
|
25 #include <StifTestModule.h> |
|
26 #include <TestclassAssert.h> |
|
27 #include <AknServerApp.h> |
|
28 #include <GSPluginInterface.h> |
|
29 |
|
30 #include "TestGSPlugin.h" |
|
31 |
|
32 // MACROS |
|
33 #define TEST_CLASS_VERSION_MAJOR 0 |
|
34 #define TEST_CLASS_VERSION_MINOR 0 |
|
35 #define TEST_CLASS_VERSION_BUILD 0 |
|
36 // User MACROS |
|
37 #define KErrGeneral -2 |
|
38 #define KFirstOption 1 |
|
39 #define KSecondtOption 2 |
|
40 |
|
41 //define client flags |
|
42 #define KFlagNoObserver 1 |
|
43 #define KFlagReserved1 2 |
|
44 #define KFlagReserved2 4 |
|
45 // Logging path |
|
46 _LIT( KSettingsPluginApiTestLogPath, "\\logs\\testframework\\SettingsPluginApiTest\\" ); |
|
47 // Log file |
|
48 _LIT( KSettingsPluginApiTestLogFile, "SettingsPluginApiTest.txt" ); |
|
49 _LIT( KSettingsPluginApiTestLogFileWithTitle, "SettingsPluginApiTest_[%S].txt" ); |
|
50 |
|
51 // |
|
52 /** |
|
53 * CSettingsPluginApiTest test class for STIF Test Framework TestScripter. |
|
54 * @since S60 5.0 |
|
55 */ |
|
56 |
|
57 NONSHARABLE_CLASS(CSettingsPluginApiTest) : public CScriptBase/*,public MAknServerAppExitObserver*/ |
|
58 { |
|
59 public: // Constructors and destructor |
|
60 |
|
61 /** |
|
62 * Two-phased constructor. |
|
63 */ |
|
64 static CSettingsPluginApiTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 virtual ~CSettingsPluginApiTest(); |
|
70 |
|
71 /*private: |
|
72 //function from MAknServerAppExitObserver. is used to handle the exit of the server. |
|
73 |
|
74 void HandleServerAppExit(TInt aReason);*/ |
|
75 |
|
76 public: // Functions from base classes |
|
77 |
|
78 /** |
|
79 * From CScriptBase Runs a script line. |
|
80 * @since S60 5.0 |
|
81 * @param aItem Script line containing method name and parameters |
|
82 * @return Symbian OS error code |
|
83 */ |
|
84 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
85 |
|
86 private: |
|
87 |
|
88 /** |
|
89 * C++ default constructor. |
|
90 */ |
|
91 CSettingsPluginApiTest( CTestModuleIf& aTestModuleIf ); |
|
92 |
|
93 /** |
|
94 * By default Symbian 2nd phase constructor is private. |
|
95 */ |
|
96 void ConstructL(); |
|
97 |
|
98 /** |
|
99 * Frees all resources allocated from test methods. |
|
100 * @since S60 5.0 |
|
101 */ |
|
102 void Delete(); |
|
103 |
|
104 /** |
|
105 * Test method. |
|
106 * @since S60 5.0 |
|
107 * @param aItem Script line containing parameters. |
|
108 * @return Symbian OS error code. |
|
109 */ |
|
110 |
|
111 TInt SetupCGSParentPluginL(); |
|
112 |
|
113 virtual TInt CallGetValueL( CStifItemParser& aItem ); |
|
114 |
|
115 virtual TInt CallMenuActivationItemL( CStifItemParser& aItem ); |
|
116 |
|
117 virtual TInt CallVisibleL( CStifItemParser& aItem ); |
|
118 |
|
119 virtual TInt CallResetSelectedItemIndexL( CStifItemParser& aItem ); |
|
120 |
|
121 /** |
|
122 * Method used to log version of test class |
|
123 */ |
|
124 void SendTestClassVersion(); |
|
125 |
|
126 /** |
|
127 * Turn off ScreenSaver |
|
128 * @since S60 5.0 |
|
129 * @return Symbian OS error code. |
|
130 */ |
|
131 void TurnOffScreenSaver(); |
|
132 |
|
133 /** |
|
134 * Restore ScreenSaver |
|
135 * @since S60 5.0 |
|
136 * @return Symbian OS error code. |
|
137 */ |
|
138 void RestoreScreenSaver(); |
|
139 |
|
140 private: // Data |
|
141 |
|
142 /** |
|
143 * ScreenSaver Property |
|
144 */ |
|
145 TInt iOldScreenSaverProperty; |
|
146 |
|
147 CTestGSPlugin* iTestGsPlugin; |
|
148 |
|
149 /** |
|
150 * description_of_pointer_member |
|
151 * Not own. |
|
152 */ |
|
153 CGSPluginInterface* iGSPluginInterface; |
|
154 |
|
155 }; |
|
156 |
|
157 #endif // C_SETTINGSPLUGINAPITEST_H |
|
158 |
|
159 // End of File |
|