|
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 CDasClientApiTest |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_DASCLIENTAPITEST_H |
|
20 #define C_DASCLIENTAPITEST_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 <das_client.h> |
|
29 // |
|
30 #include <CClientLauncher.h> |
|
31 // MACROS |
|
32 #define TEST_CLASS_VERSION_MAJOR 0 |
|
33 #define TEST_CLASS_VERSION_MINOR 0 |
|
34 #define TEST_CLASS_VERSION_BUILD 0 |
|
35 // User MACROS |
|
36 #define KErrGeneral -2 |
|
37 #define KFirstOption 1 |
|
38 #define KSecondtOption 2 |
|
39 |
|
40 //define client flags |
|
41 #define KFlagNoObserver 1 |
|
42 #define KFlagReserved1 2 |
|
43 #define KFlagReserved2 4 |
|
44 // Logging path |
|
45 _LIT( KDasClientApiTestLogPath, "\\logs\\testframework\\DasClientApiTest\\" ); |
|
46 // Log file |
|
47 _LIT( KDasClientApiTestLogFile, "DasClientApiTest.txt" ); |
|
48 _LIT( KDasClientApiTestLogFileWithTitle, "DasClientApiTest_[%S].txt" ); |
|
49 |
|
50 // |
|
51 /** |
|
52 * CDasClientApiTest test class for STIF Test Framework TestScripter. |
|
53 * @since S60 5.0 |
|
54 */ |
|
55 |
|
56 NONSHARABLE_CLASS(CDasClientApiTest) : public CScriptBase/*,public MAknServerAppExitObserver*/ |
|
57 { |
|
58 public: // Constructors and destructor |
|
59 |
|
60 /** |
|
61 * Two-phased constructor. |
|
62 */ |
|
63 static CDasClientApiTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 virtual ~CDasClientApiTest(); |
|
69 |
|
70 /*private: |
|
71 //function from MAknServerAppExitObserver. is used to handle the exit of the server. |
|
72 |
|
73 void HandleServerAppExit(TInt aReason);*/ |
|
74 |
|
75 public: // Functions from base classes |
|
76 |
|
77 /** |
|
78 * From CScriptBase Runs a script line. |
|
79 * @since S60 5.0 |
|
80 * @param aItem Script line containing method name and parameters |
|
81 * @return Symbian OS error code |
|
82 */ |
|
83 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
84 |
|
85 private: |
|
86 |
|
87 /** |
|
88 * C++ default constructor. |
|
89 */ |
|
90 CDasClientApiTest( CTestModuleIf& aTestModuleIf ); |
|
91 |
|
92 /** |
|
93 * By default Symbian 2nd phase constructor is private. |
|
94 */ |
|
95 void ConstructL(); |
|
96 |
|
97 /** |
|
98 * Frees all resources allocated from test methods. |
|
99 * @since S60 5.0 |
|
100 */ |
|
101 void Delete(); |
|
102 |
|
103 /** |
|
104 * Test method. |
|
105 * @since S60 5.0 |
|
106 * @param aItem Script line containing parameters. |
|
107 * @return Symbian OS error code. |
|
108 */ |
|
109 virtual TInt InitialClientL(const TInt aOption ); |
|
110 |
|
111 virtual TInt CallClientNewLL( CStifItemParser& aItem ); |
|
112 |
|
113 virtual TInt CallClientNewLCL( CStifItemParser& aItem ); |
|
114 |
|
115 virtual TInt CallServiceAvailableL( CStifItemParser& aItem ); |
|
116 |
|
117 // virtual TInt CallPairsToDisplayLL( CStifItemParser& aItem ); |
|
118 |
|
119 virtual TInt CallChangeDefaultsLL( CStifItemParser& aItem ); |
|
120 /** |
|
121 * Method used to log version of test class |
|
122 */ |
|
123 void SendTestClassVersion(); |
|
124 |
|
125 /** |
|
126 * Turn off ScreenSaver |
|
127 * @since S60 5.0 |
|
128 * @return Symbian OS error code. |
|
129 */ |
|
130 void TurnOffScreenSaver(); |
|
131 |
|
132 /** |
|
133 * Restore ScreenSaver |
|
134 * @since S60 5.0 |
|
135 * @return Symbian OS error code. |
|
136 */ |
|
137 void RestoreScreenSaver(); |
|
138 |
|
139 |
|
140 /** |
|
141 * In this method NewLC is called. |
|
142 * @since ?Series60_version |
|
143 * @param aResReader Resource reader to get information from Resource file |
|
144 * @return Symbian OS error code. |
|
145 */ |
|
146 void CallNewlcL( MAknServerAppExitObserver* aObserver ); |
|
147 |
|
148 |
|
149 private: // Data |
|
150 |
|
151 /** |
|
152 * ScreenSaver Property |
|
153 */ |
|
154 TInt iOldScreenSaverProperty; |
|
155 |
|
156 /** |
|
157 * ?description_of_pointer_member |
|
158 * Not own. |
|
159 */ |
|
160 //?type* ?member_name; |
|
161 CDefaultAppClient* iClient; |
|
162 |
|
163 // |
|
164 CCClientLauncher* iLauncher; |
|
165 |
|
166 }; |
|
167 |
|
168 #endif // C_DASCLIENTAPITEST_H |
|
169 |
|
170 // End of File |