|
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 the License "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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef TMANUALCONTACTS_H |
|
22 #define TMANUALCONTACTS_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <StifLogger.h> |
|
26 #include <TestScripterInternal.h> |
|
27 #include <StifTestModule.h> |
|
28 #include <stringloader.h>//for StringLoaderLC |
|
29 #include <barsread.h>//resource reader |
|
30 #include <aknnotewrappers.h>//for note |
|
31 #include <cvpbkvcardeng.h>//for the vcard engin |
|
32 #include <cvpbkcontactmanager.h>// for iContactManager |
|
33 #include <mvpbkcontactstore.h>// for iContactStore |
|
34 #include <tvpbkcontactstoreuriPtr.h>//used in SetupL |
|
35 #include <mvpbkcontactstorelist.h>//used in SetupL to get contact stores |
|
36 #include <mvpbkstorecontactfield.h>//used in AddFieldToContactL |
|
37 #include <mvpbkstorecontact.h>// used in many function to get the store contact |
|
38 #include <mvpbkcontactfieldtextdata.h>//for the field text data |
|
39 #include <tvpbkfieldtypemapping.h>//used in CreateFieldTypeL() |
|
40 #include <mvpbkfieldtype.h>//return type of CreateFieldTypeL() |
|
41 #include <mvpbkcontactoperationbase.h>//for observer |
|
42 #include <mvpbkcontactfielddatetimedata.h>//Used in AddDateFieldToContactL |
|
43 #include <mvpbkcontactlink.h>//for param in ContactsSaved() |
|
44 #include <cvpbkcontactstoreuriarray.h>//used in SetupL |
|
45 #include "contactservice.h" |
|
46 #include<cntitem.h> |
|
47 #include<cntdb.h> |
|
48 #include <e32base.h> |
|
49 #include <e32cons.h> |
|
50 #include<cntfldst.h> |
|
51 #include "contactiter.h" |
|
52 #include "contactcallback.h" |
|
53 #include <MVPbkStoreContact.h> |
|
54 #include <MVpbkFieldType.h> |
|
55 #include <VPbkEng.rsg> |
|
56 #include <MVPbkStoreContact.h> |
|
57 |
|
58 |
|
59 class CContactCallback : public MContactCallback |
|
60 { |
|
61 public: |
|
62 |
|
63 |
|
64 virtual void HandleReturnValue( TOperationEvent aEventId, const TInt& aError, TInt aTransId ); |
|
65 |
|
66 virtual void HandleReturnIter( const TInt& aError, CContactIter* aIter, TInt aTransId ); |
|
67 |
|
68 |
|
69 virtual void HandleReturnArray(const TInt& aError, RPointerArray<HBufC8>& aArray, TInt aTransId ); |
|
70 virtual void HandleReturnId(const TInt& aError, HBufC8* aId, TInt aTransId ); |
|
71 TInt iError; |
|
72 }; |
|
73 |
|
74 |
|
75 // CONSTANTS |
|
76 //const ?type ?constant_var = ?constant; |
|
77 |
|
78 // MACROS |
|
79 //#define ?macro ?macro_def |
|
80 // Logging path |
|
81 _LIT( KtmanualcontactsLogPath, "\\logs\\testframework\\tmanualcontacts\\" ); |
|
82 // Log file |
|
83 _LIT( KtmanualcontactsLogFile, "tmanualcontacts.txt" ); |
|
84 |
|
85 |
|
86 // FUNCTION PROTOTYPES |
|
87 //?type ?function_name(?arg_list); |
|
88 |
|
89 // FORWARD DECLARATIONS |
|
90 //class ?FORWARD_CLASSNAME; |
|
91 class Ctcontactgetids; |
|
92 |
|
93 // DATA TYPES |
|
94 //enum ?declaration |
|
95 //typedef ?declaration |
|
96 //extern ?data_type; |
|
97 |
|
98 // CLASS DECLARATION |
|
99 |
|
100 /** |
|
101 * Ctmanualcontacts test class for STIF Test Framework TestScripter. |
|
102 * ?other_description_lines |
|
103 * |
|
104 * @lib ?library |
|
105 * @since ?Series60_version |
|
106 */ |
|
107 NONSHARABLE_CLASS(Ctcontactgetids) : public CScriptBase |
|
108 { |
|
109 public: // Constructors and destructor |
|
110 |
|
111 /** |
|
112 * Two-phased constructor. |
|
113 */ |
|
114 static Ctcontactgetids* NewL( CTestModuleIf& aTestModuleIf ); |
|
115 |
|
116 /** |
|
117 * Destructor. |
|
118 */ |
|
119 virtual ~Ctcontactgetids(); |
|
120 |
|
121 public: // New functions |
|
122 |
|
123 /** |
|
124 * ?member_description. |
|
125 * @since ?Series60_version |
|
126 * @param ?arg1 ?description |
|
127 * @return ?description |
|
128 */ |
|
129 //?type ?member_function( ?type ?arg1 ); |
|
130 |
|
131 public: // Functions from base classes |
|
132 |
|
133 /** |
|
134 * From CScriptBase Runs a script line. |
|
135 * @since ?Series60_version |
|
136 * @param aItem Script line containing method name and parameters |
|
137 * @return Symbian OS error code |
|
138 */ |
|
139 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
140 |
|
141 protected: // New functions |
|
142 |
|
143 /** |
|
144 * ?member_description. |
|
145 * @since ?Series60_version |
|
146 * @param ?arg1 ?description |
|
147 * @return ?description |
|
148 */ |
|
149 //?type ?member_function( ?type ?arg1 ); |
|
150 |
|
151 protected: // Functions from base classes |
|
152 |
|
153 /** |
|
154 * From ?base_class ?member_description |
|
155 */ |
|
156 //?type ?member_function(); |
|
157 |
|
158 private: |
|
159 |
|
160 /** |
|
161 * C++ default constructor. |
|
162 */ |
|
163 Ctcontactgetids( CTestModuleIf& aTestModuleIf ); |
|
164 |
|
165 /** |
|
166 * By default Symbian 2nd phase constructor is private. |
|
167 */ |
|
168 void ConstructL(); |
|
169 |
|
170 // Prohibit copy constructor if not deriving from CBase. |
|
171 // ?classname( const ?classname& ); |
|
172 // Prohibit assigment operator if not deriving from CBase. |
|
173 // ?classname& operator=( const ?classname& ); |
|
174 |
|
175 /** |
|
176 * Frees all resources allocated from test methods. |
|
177 * @since ?Series60_version |
|
178 */ |
|
179 void Delete(); |
|
180 |
|
181 /** |
|
182 * Test methods are listed below. |
|
183 */ |
|
184 |
|
185 /** |
|
186 * Example test method. |
|
187 * @since ?Series60_version |
|
188 * @param aItem Script line containing parameters. |
|
189 * @return Symbian OS error code. |
|
190 */ |
|
191 virtual TInt GetIds_Test1L( CStifItemParser& aItem ); |
|
192 virtual TInt GetIds_Test2L( CStifItemParser& aItem ); |
|
193 virtual TInt GetIds_Test3L( CStifItemParser& aItem ); |
|
194 virtual TInt GetIds_Test4L( CStifItemParser& aItem ); |
|
195 virtual TInt GetIds_Test5L( CStifItemParser& aItem ); |
|
196 virtual TInt GetIds_Test6L( CStifItemParser& aItem ); |
|
197 virtual TInt GetIds_Test7L( CStifItemParser& aItem ); |
|
198 virtual TInt GetIds_Test8L( CStifItemParser& aItem ); |
|
199 virtual TInt GetIds_Test9L( CStifItemParser& aItem ); |
|
200 // virtual TInt GetIds_Test10L( CStifItemParser& aItem ); |
|
201 |
|
202 //ADD NEW METHOD DEC HERE |
|
203 |
|
204 public: // Data |
|
205 // ?one_line_short_description_of_data |
|
206 //?data_declaration; |
|
207 |
|
208 protected: // Data |
|
209 // ?one_line_short_description_of_data |
|
210 //?data_declaration; |
|
211 |
|
212 private: // Data |
|
213 |
|
214 CContactService* icontactservice; |
|
215 CContactCallback* icallback; |
|
216 |
|
217 // ?one_line_short_description_of_data |
|
218 //?data_declaration; |
|
219 |
|
220 // Reserved pointer for future extension |
|
221 //TAny* iReserved; |
|
222 |
|
223 public: // Friend classes |
|
224 //?friend_class_declaration; |
|
225 protected: // Friend classes |
|
226 //?friend_class_declaration; |
|
227 private: // Friend classes |
|
228 //?friend_class_declaration; |
|
229 |
|
230 }; |
|
231 |
|
232 #endif // TMANUALCONTACTS_H |
|
233 |
|
234 // End of File |