|
1 /* |
|
2 * Copyright (c) 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 Module DLL to Location Settings Launch API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef TESTMNCLIENTLIB_H |
|
21 #define TESTMNCLIENTLIB_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifLogger.h> |
|
25 #include <TestScripterInternal.h> |
|
26 #include <StifTestModule.h> |
|
27 #include <swinstapi.h> |
|
28 |
|
29 // CONSTANTS |
|
30 _LIT( KtestmnclientlibLogPath, "\\logs\\testframework\\testmnclientlib\\" ); |
|
31 _LIT( KtestmnclientlibLogFile, "testmnclientlib.txt" ); |
|
32 _LIT( KProviderSisxPath, "e:\\testing\\data\\mnrefprovider.sisx" ); |
|
33 _LIT( KMnPanicInternal, "MnInternal" ); |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CTestMNClientLib; |
|
37 class CTestMnGeocoder; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * CTestMNClientLib test class for STIF Test Framework TestScripter. |
|
43 * This is the testclass for Geocoding API |
|
44 * |
|
45 * @lib testmnclientlib.lib |
|
46 * @since S60 v3.2 |
|
47 */ |
|
48 NONSHARABLE_CLASS(CTestMNClientLib) : public CScriptBase |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 static CTestMNClientLib* NewL( CTestModuleIf& aTestModuleIf ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CTestMNClientLib(); |
|
61 |
|
62 public: // New functions |
|
63 |
|
64 /** |
|
65 * Test Case for Creating the new instance of CMnGeocoder |
|
66 * using NewL |
|
67 * |
|
68 * @since S60 v3.2 |
|
69 * Returns KErrNone if successful. |
|
70 * |
|
71 */ |
|
72 TInt TestNewL( CStifItemParser& aItem ); |
|
73 |
|
74 /** |
|
75 * Test Case for Creating the new instance of CMnGeocoder |
|
76 * using NewChainedL - Expected to Fail with KErrNotsupported |
|
77 * |
|
78 * @since S60 v3.2 |
|
79 * Returns KErrNone if successful. |
|
80 * |
|
81 */ |
|
82 TInt TestNewChainedL( CStifItemParser& aItem ); |
|
83 |
|
84 /** |
|
85 * Test Case for Setting and Getting options |
|
86 * of CMnGeocoder |
|
87 * |
|
88 * @since S60 v3.2 |
|
89 * Returns KErrNone if successful. |
|
90 * |
|
91 */ |
|
92 TInt TestGetSetOptionsL( CStifItemParser& aItem ); |
|
93 |
|
94 /** |
|
95 * Test Case for converting coordinate to Address |
|
96 * Asynchronous Call |
|
97 * |
|
98 * @since S60 v3.2 |
|
99 * Returns KErrNone if successful. |
|
100 * |
|
101 */ |
|
102 TInt TestFindAddressByCoordinateL( CStifItemParser& aItem ); |
|
103 |
|
104 /** |
|
105 * Test Case for converting Address(CPosLandmark) to coordinate |
|
106 * Asynchronous Call |
|
107 * |
|
108 * @since S60 v3.2 |
|
109 * Returns KErrNone if successful. |
|
110 * |
|
111 */ |
|
112 TInt TestFindCoordinateByAddressL( CStifItemParser& aItem ); |
|
113 |
|
114 /** |
|
115 * Test Case for converting Address(Desc) to coordinate |
|
116 * Asynchronous Call |
|
117 * |
|
118 * @since S60 v3.2 |
|
119 * Returns KErrNone if successful. |
|
120 * |
|
121 */ |
|
122 TInt TestFindCoordinateByAddressDescL( CStifItemParser& aItem ); |
|
123 |
|
124 /** |
|
125 * Test Case for Setting the Exit Observer |
|
126 * for CMnGeocoder |
|
127 * |
|
128 * @since S60 v3.2 |
|
129 * Returns KErrNone if successful. |
|
130 * |
|
131 */ |
|
132 TInt TestSetExitObserverL( CStifItemParser& aItem ); |
|
133 |
|
134 /** |
|
135 * Test Case for Removing the Exit Observer |
|
136 * for CMnGeocoder |
|
137 * |
|
138 * @since S60 v3.2 |
|
139 * Returns KErrNone if successful. |
|
140 * |
|
141 */ |
|
142 TInt TestRemoveExitObserverL( CStifItemParser& aItem ); |
|
143 |
|
144 /** |
|
145 * Test Case for Cancelling a the request given to |
|
146 * CMnGeocoder |
|
147 * |
|
148 * @since S60 v3.2 |
|
149 * Returns KErrNone if successful. |
|
150 * |
|
151 */ |
|
152 TInt TestCancelRequestL( CStifItemParser& aItem ); |
|
153 |
|
154 /** |
|
155 * Test Case for allowing a panic(KMnPanicDuplicateRequest) on |
|
156 * issuing duplicate requests on CMnGeocoder |
|
157 * |
|
158 * @since S60 v3.2 |
|
159 * Returns KErrNone if successful. |
|
160 * |
|
161 */ |
|
162 TInt TestRequestPanicL( CStifItemParser& aItem ); |
|
163 |
|
164 |
|
165 public: // Functions from base classes |
|
166 |
|
167 /** |
|
168 * From CScriptBase Runs a script line. |
|
169 * @since S60 v3.2 |
|
170 * @param aItem Script line containing method name and parameters |
|
171 * @return Symbian OS error code |
|
172 */ |
|
173 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
174 |
|
175 private: |
|
176 |
|
177 /** |
|
178 * C++ default constructor. |
|
179 */ |
|
180 CTestMNClientLib( CTestModuleIf& aTestModuleIf ); |
|
181 |
|
182 /** |
|
183 * By default Symbian 2nd phase constructor is private. |
|
184 */ |
|
185 void ConstructL(); |
|
186 |
|
187 /** |
|
188 * Install Dependent sisx files. |
|
189 */ |
|
190 TInt Install( const TDesC& aPackagePath ); |
|
191 |
|
192 /** |
|
193 * Frees all resources allocated from test methods. |
|
194 * @since S60 v3.2 |
|
195 */ |
|
196 void Delete(); |
|
197 |
|
198 private: // Data |
|
199 CTestMnGeocoder* iTestMnGeocoder; |
|
200 }; |
|
201 |
|
202 #endif // TESTMNCLIENTLIB_H |
|
203 |
|
204 // End of File |