|
1 /** |
|
2 * Copyright (c) 2006-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @publishedAll |
|
23 @released |
|
24 */ |
|
25 |
|
26 #ifndef __CUSTOM_TEMPLATE_TEST_H__ |
|
27 #define __CUSTOM_TEMPLATE_TEST_H__ |
|
28 |
|
29 #include "CntBaseStep.h" |
|
30 |
|
31 class CCustomTemplateTest : public CCntBaseStep |
|
32 { |
|
33 public: |
|
34 CCustomTemplateTest(); |
|
35 virtual ~CCustomTemplateTest(); |
|
36 virtual TVerdict doTestStepL(); |
|
37 virtual void PreTestL() |
|
38 { |
|
39 } |
|
40 private: |
|
41 void EmptyTemplateTestL(const TContactItemId aCid); |
|
42 void CreateCustomTemplateL(); |
|
43 void LoadContactL(const TContactItemId aCid, const TBool aReadMinimal = EFalse); |
|
44 void Clean(); |
|
45 void FullTemplateTestL(const TContactItemId aCid); |
|
46 TContactItemId AddTemplatedContactL(const CContactItem &aTemplate); |
|
47 TContactItemId AddTemplatedContactL(const TContactItemId aTemplate); |
|
48 void OpenL(const TContactItemId aCid); |
|
49 void CommitL(); |
|
50 void ModifiedTemplateTestL(const TContactItemId aCid, const TBool aReadMinimal); |
|
51 TBool CompareToTemplateL( const TContactItemId aCid, const CContactItemFieldSet &aFields, |
|
52 const TInt aStart=1, const TBool aNogroup=EFalse); |
|
53 TInt FindCtype( const CContentType &aCtype, const CContactItemFieldSet &aFields ); |
|
54 void NewFieldsTemplateTestL(const TContactItemId aCid, const TBool aNewAndOldFields); |
|
55 void doDynamicLoadingL(const TContactItemId aCid, const TContactItemId aTemplate, |
|
56 const TInt aCount, const TBool aSystemTemplate = EFalse); |
|
57 void TestDynamicLoadingL(const TContactItemId aCid); |
|
58 void CustomFieldsTemplateTestL(const TContactItemId aCid, TBool aSetCustomLabels, const TBool aUids); |
|
59 CContactItemFieldSet *CopyFieldSetLC(const CContactItemFieldSet &aFields); |
|
60 void DeleteCustomTemplateTestL(const TContactItemId aCid); |
|
61 void DeleteSystemTemplateTestL(const TContactItemId aCid); |
|
62 TBool CheckDeleteItemL( const TContactItemId aCid, |
|
63 const TInt aFieldCountPreDelete, |
|
64 const TInt aHiddenCountPreDelete ); |
|
65 TBool CompareFields(const CContactItemField &aField1, const CContactItemField &aField2) const; |
|
66 |
|
67 private: |
|
68 CContactItem *iCustomTemplate; |
|
69 CContactItemFieldSet *iFields;//fieldset of open contact item |
|
70 CContactItem *iContactRead;//contact opened using readcontact |
|
71 CContactItem *iContactOpened;//contact opened using opencontact |
|
72 TContactItemId iCustomTemplateId;//contact id of custom template |
|
73 }; |
|
74 |
|
75 #endif |