equal
deleted
inserted
replaced
|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef CCNTTEST_H |
|
17 #define CCNTTEST_H |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <e32test.h> |
|
21 #include <cntdef.h> |
|
22 |
|
23 class CConsoleBase; |
|
24 class CContactDatabase; |
|
25 class CContactItemField; |
|
26 |
|
27 class CCntTest : public CActive |
|
28 { |
|
29 public: // Construction and destructor |
|
30 static CCntTest* NewL(); |
|
31 ~CCntTest(); |
|
32 |
|
33 void RunTest(); |
|
34 |
|
35 protected: // From CActive |
|
36 virtual void RunL(); |
|
37 virtual void DoCancel(); |
|
38 |
|
39 private: // Implementation |
|
40 CCntTest(); |
|
41 void ConstructL(); |
|
42 void PrintTemplateInfoL(); |
|
43 void CreateContactsToDbL(TInt aCount); |
|
44 TContactItemId DoCreateContactL(TInt aIdentifier); |
|
45 CContactItemField* CreateFieldLC( |
|
46 const TUid aMappingUId, |
|
47 TFieldType aFieldType, |
|
48 const TDesC &aText); |
|
49 void ReadContactFieldIdsL(); |
|
50 void CompleteL(); |
|
51 void IssueRequest(); |
|
52 |
|
53 |
|
54 private: |
|
55 enum TCntTestPhase |
|
56 { |
|
57 ECntTestIdle, |
|
58 ECntTestTemplate, |
|
59 ECntTestCreating, |
|
60 ECntTestPrint, |
|
61 ECntTestDone |
|
62 }; |
|
63 |
|
64 private: // Data |
|
65 CContactDatabase* iContactDb; |
|
66 TCntTestPhase iPhase; |
|
67 RArray<TContactItemId> iContactIds; |
|
68 }; |
|
69 |
|
70 #endif // CCNTTEST_H |