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: imconnectionprovider_test.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef IMCONNECTIONPROVIDER_TEST_H |
|
21 #define IMCONNECTIONPROVIDER_TEST_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifLogger.h> |
|
25 #include <TestScripterInternal.h> |
|
26 #include <StifTestModule.h> |
|
27 #include <TestclassAssert.h> |
|
28 #include <cchservice.h> |
|
29 #include <cchtypes.h> |
|
30 #include <e32property.h> |
|
31 #include <spentry.h> |
|
32 #include <spproperty.h> |
|
33 #include <spsettings.h> |
|
34 #include <spdefinitions.h> |
|
35 #include <presenceauthorization.h> |
|
36 |
|
37 #include "s_ximpobjectfactory.h" |
|
38 #include "s_ximpcontext.h" |
|
39 #include "s_xmppsettingsapi.h" |
|
40 #include "s_ximpclient.h" |
|
41 |
|
42 #include "s_ximprequestcompleteevent.h" |
|
43 #include "cicpservicemanager.h" |
|
44 |
|
45 // CONSTANTS |
|
46 //const ?type ?constant_var = ?constant; |
|
47 |
|
48 // MACROS |
|
49 //#define ?macro ?macro_def |
|
50 #define TEST_CLASS_VERSION_MAJOR 0 |
|
51 #define TEST_CLASS_VERSION_MINOR 0 |
|
52 #define TEST_CLASS_VERSION_BUILD 0 |
|
53 |
|
54 // Logging path |
|
55 _LIT( Kimconnectionprovider_testLogPath, "\\logs\\testframework\\imconnectionprovider_test\\" ); |
|
56 // Log file |
|
57 _LIT( Kimconnectionprovider_testLogFile, "imconnectionprovider_test.txt" ); |
|
58 _LIT( Kimconnectionprovider_testLogFileWithTitle, "imconnectionprovider_test_[%S].txt" ); |
|
59 |
|
60 _LIT( KServiceName, "TestService"); |
|
61 |
|
62 _LIT( KServicePropName, "DummyService"); |
|
63 |
|
64 _LIT( KServreName, "test@testserver.com"); |
|
65 |
|
66 // FUNCTION PROTOTYPES |
|
67 //?type ?function_name(?arg_list); |
|
68 |
|
69 // FORWARD DECLARATIONS |
|
70 //class ?FORWARD_CLASSNAME; |
|
71 |
|
72 |
|
73 class Cimconnectionprovider_test; |
|
74 |
|
75 // DATA TYPES |
|
76 //enum ?declaration |
|
77 //typedef ?declaration |
|
78 //extern ?data_type; |
|
79 |
|
80 // CLASS DECLARATION |
|
81 |
|
82 /** |
|
83 * Cimconnectionprovider_test test class for STIF Test Framework TestScripter. |
|
84 * ?other_description_lines |
|
85 * |
|
86 * @lib ?library |
|
87 * @since ?Series60_version |
|
88 */ |
|
89 NONSHARABLE_CLASS(Cimconnectionprovider_test) : public CScriptBase, |
|
90 public MCchServiceObserver |
|
91 { |
|
92 public: // Constructors and destructor |
|
93 |
|
94 friend class CIcpServiceManager; |
|
95 /** |
|
96 * Two-phased constructor. |
|
97 */ |
|
98 static Cimconnectionprovider_test* NewL( CTestModuleIf& aTestModuleIf ); |
|
99 |
|
100 /** |
|
101 * Destructor. |
|
102 */ |
|
103 virtual ~Cimconnectionprovider_test(); |
|
104 |
|
105 CIcpServiceManager* NewL( MCchServiceObserver* aServiceObserver = NULL); |
|
106 |
|
107 private: |
|
108 void ServiceStateChanged( |
|
109 const TServiceSelection aServiceSelection, |
|
110 TCCHSubserviceState aState, |
|
111 TInt aError ); |
|
112 public: // New functions |
|
113 |
|
114 /** |
|
115 * ?member_description. |
|
116 * @since ?Series60_version |
|
117 * @param ?arg1 ?description |
|
118 * @return ?description |
|
119 */ |
|
120 //?type ?member_function( ?type ?arg1 ); |
|
121 |
|
122 public: // Functions from base classes |
|
123 |
|
124 /** |
|
125 * From CScriptBase Runs a script line. |
|
126 * @since ?Series60_version |
|
127 * @param aItem Script line containing method name and parameters |
|
128 * @return Symbian OS error code |
|
129 */ |
|
130 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
131 |
|
132 protected: // New functions |
|
133 |
|
134 /** |
|
135 * ?member_description. |
|
136 * @since ?Series60_version |
|
137 * @param ?arg1 ?description |
|
138 * @return ?description |
|
139 */ |
|
140 //?type ?member_function( ?type ?arg1 ); |
|
141 |
|
142 protected: // Functions from base classes |
|
143 |
|
144 /** |
|
145 * From ?base_class ?member_description |
|
146 */ |
|
147 //?type ?member_function(); |
|
148 |
|
149 private: |
|
150 |
|
151 /** |
|
152 * C++ default constructor. |
|
153 */ |
|
154 Cimconnectionprovider_test( CTestModuleIf& aTestModuleIf ); |
|
155 |
|
156 /** |
|
157 * By default Symbian 2nd phase constructor is private. |
|
158 */ |
|
159 void ConstructL(); |
|
160 |
|
161 // Prohibit copy constructor if not deriving from CBase. |
|
162 // ?classname( const ?classname& ); |
|
163 // Prohibit assigment operator if not deriving from CBase. |
|
164 // ?classname& operator=( const ?classname& ); |
|
165 |
|
166 /** |
|
167 * Frees all resources allocated from test methods. |
|
168 * @since ?Series60_version |
|
169 */ |
|
170 void Delete(); |
|
171 |
|
172 |
|
173 |
|
174 /** |
|
175 * Test methods are listed below. |
|
176 */ |
|
177 |
|
178 /** |
|
179 * Example test method. |
|
180 * @since ?Series60_version |
|
181 * @param aItem Script line containing parameters. |
|
182 * @return Symbian OS error code. |
|
183 */ |
|
184 virtual TInt T_EnableServiceL( CStifItemParser& aItem ); |
|
185 |
|
186 virtual TInt T_DisableServiceL( CStifItemParser& aItem ); |
|
187 |
|
188 virtual TInt T_SetIMDisabledL( CStifItemParser& aItem ); |
|
189 |
|
190 virtual TInt T_RemoveRequestId( CStifItemParser& aItem ); |
|
191 |
|
192 virtual TInt T_BindL( CStifItemParser& aItem ); |
|
193 |
|
194 virtual TInt T_UnBindL( CStifItemParser& aItem ); |
|
195 |
|
196 virtual TInt T_IsReserved( CStifItemParser& aItem ); |
|
197 |
|
198 virtual TInt T_SetConnectionParameter( CStifItemParser& aItem ); |
|
199 |
|
200 virtual TInt T_GetConnectionParameter( CStifItemParser& aItem ); |
|
201 |
|
202 virtual TInt T_ValidateServiceL( CStifItemParser& aItem ); |
|
203 |
|
204 virtual TInt T_GetSPSettingsIntPropertyL( CStifItemParser& aItem ); |
|
205 |
|
206 virtual TInt T_ValidateSubService( CStifItemParser& aItem ); |
|
207 |
|
208 virtual TInt T_GetServiceNameL( CStifItemParser& aItem ); |
|
209 |
|
210 virtual TInt T_ConvertXIMPErrToCChErr( CStifItemParser& aItem ); |
|
211 |
|
212 virtual TInt T_FindRequestId( CStifItemParser& aItem ); |
|
213 |
|
214 virtual TInt T_GetServiceNetworkInfo_emptypasswordL( CStifItemParser& aItem ); |
|
215 |
|
216 virtual TInt T_GetServiceNetworkInfo_passwordExistL( CStifItemParser& aItem ); |
|
217 |
|
218 // virtual TInt T_UnsubscribePresenceGrantRequestListL( CStifItemParser& aItem ); |
|
219 /** |
|
220 * Method used to log version of test class |
|
221 */ |
|
222 void SendTestClassVersion(); |
|
223 |
|
224 void Cimconnectionprovider_test::CreateSpEntryL( TInt aServiceId, |
|
225 TServicePropertyName aName, |
|
226 TInt aValue ); |
|
227 |
|
228 //ADD NEW METHOD DEC HERE |
|
229 //[TestMethods] - Do not remove |
|
230 |
|
231 public: // Data |
|
232 // ?one_line_short_description_of_data |
|
233 //?data_declaration; |
|
234 |
|
235 protected: // Data |
|
236 // ?one_line_short_description_of_data |
|
237 //?data_declaration; |
|
238 |
|
239 private: // Data |
|
240 CSPSettings* iSpSettings; |
|
241 // ?one_line_short_description_of_data |
|
242 //?data_declaration; |
|
243 |
|
244 // Reserved pointer for future extension |
|
245 //TAny* iReserved; |
|
246 |
|
247 public: // Friend classes |
|
248 //?friend_class_declaration; |
|
249 protected: // Friend classes |
|
250 //?friend_class_declaration; |
|
251 private: // Friend classes |
|
252 //?friend_class_declaration; |
|
253 |
|
254 }; |
|
255 |
|
256 #endif // IMCONNECTIONPROVIDER_TEST_H |
|
257 |
|
258 // End of File |
|