|
1 /* |
|
2 * Copyright (c) 2009 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: STIF testclass declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef XMPPSETTINGS_API_H |
|
19 #define XMPPSETTINGS_API_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <StifLogger.h> |
|
23 #include <TestScripterInternal.h> |
|
24 #include <StifTestModule.h> |
|
25 #include <TestclassAssert.h> |
|
26 |
|
27 // CONSTANTS |
|
28 //const ?type ?constant_var = ?constant; |
|
29 |
|
30 // MACROS |
|
31 //#define ?macro ?macro_def |
|
32 #define TEST_CLASS_VERSION_MAJOR 0 |
|
33 #define TEST_CLASS_VERSION_MINOR 0 |
|
34 #define TEST_CLASS_VERSION_BUILD 0 |
|
35 |
|
36 // Logging path |
|
37 _LIT( Kxmppsettings_apiLogPath, "\\logs\\testframework\\xmppsettings_api\\" ); |
|
38 // Log file |
|
39 _LIT( Kxmppsettings_apiLogFile, "xmppsettings_api.txt" ); |
|
40 _LIT( Kxmppsettings_apiLogFileWithTitle, "xmppsettings_api_[%S].txt" ); |
|
41 |
|
42 // FUNCTION PROTOTYPES |
|
43 //?type ?function_name(?arg_list); |
|
44 |
|
45 // FORWARD DECLARATIONS |
|
46 //class ?FORWARD_CLASSNAME; |
|
47 class CXmppSettingsApi; |
|
48 class Cxmppsettings_api; |
|
49 |
|
50 // DATA TYPES |
|
51 //enum ?declaration |
|
52 //typedef ?declaration |
|
53 //extern ?data_type; |
|
54 |
|
55 // CLASS DECLARATION |
|
56 |
|
57 /** |
|
58 * Cxmppsettings_api test class for STIF Test Framework TestScripter. |
|
59 * ?other_description_lines |
|
60 * |
|
61 * @lib ?library |
|
62 * @since ?Series60_version |
|
63 */ |
|
64 NONSHARABLE_CLASS(Cxmppsettings_api) : public CScriptBase |
|
65 { |
|
66 public: // Constructors and destructor |
|
67 |
|
68 /** |
|
69 * Two-phased constructor. |
|
70 */ |
|
71 static Cxmppsettings_api* NewL( CTestModuleIf& aTestModuleIf ); |
|
72 |
|
73 /** |
|
74 * Destructor. |
|
75 */ |
|
76 virtual ~Cxmppsettings_api(); |
|
77 |
|
78 public: // New functions |
|
79 |
|
80 /** |
|
81 * ?member_description. |
|
82 * @since ?Series60_version |
|
83 * @param ?arg1 ?description |
|
84 * @return ?description |
|
85 */ |
|
86 //?type ?member_function( ?type ?arg1 ); |
|
87 |
|
88 public: // Functions from base classes |
|
89 |
|
90 /** |
|
91 * From CScriptBase Runs a script line. |
|
92 * @since ?Series60_version |
|
93 * @param aItem Script line containing method name and parameters |
|
94 * @return Symbian OS error code |
|
95 */ |
|
96 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
97 |
|
98 protected: // New functions |
|
99 |
|
100 /** |
|
101 * ?member_description. |
|
102 * @since ?Series60_version |
|
103 * @param ?arg1 ?description |
|
104 * @return ?description |
|
105 */ |
|
106 //?type ?member_function( ?type ?arg1 ); |
|
107 |
|
108 protected: // Functions from base classes |
|
109 |
|
110 /** |
|
111 * From ?base_class ?member_description |
|
112 */ |
|
113 //?type ?member_function(); |
|
114 |
|
115 private: |
|
116 |
|
117 /** |
|
118 * C++ default constructor. |
|
119 */ |
|
120 Cxmppsettings_api( CTestModuleIf& aTestModuleIf ); |
|
121 |
|
122 /** |
|
123 * By default Symbian 2nd phase constructor is private. |
|
124 */ |
|
125 void ConstructL(); |
|
126 |
|
127 // Prohibit copy constructor if not deriving from CBase. |
|
128 // ?classname( const ?classname& ); |
|
129 // Prohibit assigment operator if not deriving from CBase. |
|
130 // ?classname& operator=( const ?classname& ); |
|
131 |
|
132 /** |
|
133 * Frees all resources allocated from test methods. |
|
134 * @since ?Series60_version |
|
135 */ |
|
136 void Delete(); |
|
137 |
|
138 /** |
|
139 * Test methods are listed below. |
|
140 */ |
|
141 |
|
142 /** |
|
143 * Example test method. |
|
144 * @since ?Series60_version |
|
145 * @param aItem Script line containing parameters. |
|
146 * @return Symbian OS error code. |
|
147 */ |
|
148 |
|
149 void ResetRepository(); |
|
150 virtual TInt Test_CreateSettingsRecordL( CStifItemParser& aItem ); |
|
151 virtual TInt Test_DefaultSettingsRecord( CStifItemParser& aItem ); |
|
152 virtual TInt Test_GetSettingsRecordIdArray(CStifItemParser& aItem ); |
|
153 virtual TInt Test_SetParamInt(CStifItemParser& aItem ); |
|
154 virtual TInt Test_SetParamLDes(CStifItemParser& aItem ); |
|
155 virtual TInt Test_GetParamInt(CStifItemParser& aItem ); |
|
156 virtual TInt Test_GetParamLDes(CStifItemParser& aItem ); |
|
157 virtual TInt Test_RemoveSettingsRecord(CStifItemParser& aItem ); |
|
158 virtual TInt Test_RemoveParam(CStifItemParser& aItem ); |
|
159 |
|
160 /** |
|
161 * Method used to log version of test class |
|
162 */ |
|
163 void SendTestClassVersion(); |
|
164 |
|
165 //ADD NEW METHOD DEC HERE |
|
166 //[TestMethods] - Do not remove |
|
167 |
|
168 public: // Data |
|
169 // ?one_line_short_description_of_data |
|
170 //?data_declaration; |
|
171 TInt iXmppSettingId; |
|
172 TInt iXmppSnapId; |
|
173 TInt iXmppServerPort; |
|
174 TInt iMessageToneVolume; |
|
175 TInt iLastRegistrationError; |
|
176 |
|
177 TBool iPublishOnThePhoneStatus; |
|
178 TBool iRoamingWarning; |
|
179 TBool iAllowBuddyReq; |
|
180 TBool iAutoLogin; |
|
181 TBool iDefaultProfile; |
|
182 |
|
183 HBufC* iMessageTone; |
|
184 HBufC* iSnapName; |
|
185 HBufC* iSettingsName; |
|
186 HBufC* iStackVersion; |
|
187 HBufC* iXmppServerAddress; |
|
188 HBufC* iUsername; |
|
189 HBufC* iPassword; |
|
190 HBufC* iConnectionServer1; |
|
191 HBufC* iConnectionServer2; |
|
192 TUint32 iSettingId; |
|
193 RArray<TUint32> iSettingIdArray; |
|
194 |
|
195 CXmppSettingsApi* iApi; |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 protected: // Data |
|
201 // ?one_line_short_description_of_data |
|
202 //?data_declaration; |
|
203 |
|
204 private: // Data |
|
205 |
|
206 // ?one_line_short_description_of_data |
|
207 //?data_declaration; |
|
208 |
|
209 // Reserved pointer for future extension |
|
210 //TAny* iReserved; |
|
211 |
|
212 public: // Friend classes |
|
213 //?friend_class_declaration; |
|
214 protected: // Friend classes |
|
215 //?friend_class_declaration; |
|
216 private: // Friend classes |
|
217 //?friend_class_declaration; |
|
218 |
|
219 }; |
|
220 |
|
221 #endif // XMPPSETTINGS_API_H |
|
222 |
|
223 // End of File |