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