|
1 /* |
|
2 * Copyright (c) 2006-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 "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: Virtual Phonebook vCard data class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CVPBKVCARDDATA_H |
|
20 #define CVPBKVCARDDATA_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <badesca.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CVPbkVCardFieldTypeProperty; |
|
28 class CVPbkVCardIdNameMapping; |
|
29 class MVPbkFieldTypeList; |
|
30 class CParserVCard; |
|
31 class CVPbkContactCopyPolicyManager; |
|
32 class MVPbkContactCopyPolicy; |
|
33 class CVPbkContactManager; |
|
34 class TVPbkContactStoreUriPtr; |
|
35 class MVPbkContactAttributeManager; |
|
36 class MVPbkContactStore; |
|
37 class CVPbkContactDuplicatePolicy; |
|
38 class MVPbkContactDuplicatePolicy; |
|
39 namespace VPbkEngUtils |
|
40 { |
|
41 class CTextStore; |
|
42 } |
|
43 |
|
44 /** |
|
45 * Virtual Phonebook vCard data class. |
|
46 */ |
|
47 NONSHARABLE_CLASS(CVPbkVCardData) : public CBase |
|
48 { |
|
49 public: // Construction and destruction |
|
50 static CVPbkVCardData* NewL(CVPbkContactManager& aContactManager); |
|
51 ~CVPbkVCardData(); |
|
52 |
|
53 public: // Interface |
|
54 const MVPbkFieldTypeList& SupportedFieldTypes() const; |
|
55 TArray<CVPbkVCardFieldTypeProperty*> Properties() const; |
|
56 TArray<CVPbkVCardIdNameMapping*> VNameIdNameMappings() const; |
|
57 TArray<CVPbkVCardIdNameMapping*> ParamIdNameMappings() const; |
|
58 MVPbkContactAttributeManager& AttributeManagerL() const; |
|
59 /** |
|
60 * Returns a reference to policy or NULL if no policy exists |
|
61 */ |
|
62 MVPbkContactDuplicatePolicy* DuplicatePolicy(); |
|
63 |
|
64 /** |
|
65 * @exception KErrNotSupported if there is no policy for the store |
|
66 */ |
|
67 MVPbkContactCopyPolicy& CopyPolicyL( |
|
68 const TVPbkContactStoreUriPtr& aUri) const; |
|
69 |
|
70 /** |
|
71 * Returns the default contact database store. The store |
|
72 * is not necessary open so any operation that needes the store |
|
73 * to be open must not be done. |
|
74 * |
|
75 * @return the default contact database. |
|
76 * @exception KErrNotFound if the store is not found -> |
|
77 * store plugin is missing or loading it failed |
|
78 */ |
|
79 MVPbkContactStore& GetCntModelStoreL(); |
|
80 |
|
81 /** |
|
82 * A getter method that returns a pointer to the array |
|
83 * of masked fields used during a beamed export. |
|
84 * |
|
85 * @returns a pointer to the array. |
|
86 */ |
|
87 const CDesC8ArrayFlat* GetMaskedFields(); |
|
88 |
|
89 /** |
|
90 * A getter method that returns ContactManager |
|
91 * |
|
92 * @returns ContactManager |
|
93 */ |
|
94 CVPbkContactManager& GetContactManager(); |
|
95 |
|
96 private: // Implementation |
|
97 CVPbkVCardData(CVPbkContactManager& aContactManager); |
|
98 void ConstructL(); |
|
99 |
|
100 private: // Data |
|
101 /// Ref: Contact Manager |
|
102 CVPbkContactManager& iContactManager; |
|
103 /// Own: Array of CVPbkVCardFieldTypeProperty instances for exporting contact |
|
104 RPointerArray<CVPbkVCardFieldTypeProperty> iProperties; |
|
105 /// Own: Array of CVPbkVCardIdNameMapping instances for mapping versit |
|
106 /// parameter name with VPbk id |
|
107 RPointerArray<CVPbkVCardIdNameMapping> iParamIdNameMappings; |
|
108 /// Own: Array of CVPbkVCardIdNameMapping instances for mapping versit |
|
109 /// name with VPbk id |
|
110 RPointerArray<CVPbkVCardIdNameMapping> iVNameIdNameMappings; |
|
111 /// Own: Array of supported field types |
|
112 MVPbkFieldTypeList* iSupportedFieldTypes; |
|
113 /// Own: Copy policy manager for getting copy policies |
|
114 CVPbkContactCopyPolicyManager* iCopyPolicyManager; |
|
115 /// Own: A duplicate policy |
|
116 CVPbkContactDuplicatePolicy* iDuplicatePolicy; |
|
117 ///Own: X- versit type storage |
|
118 VPbkEngUtils::CTextStore* iTextStore; |
|
119 |
|
120 // Own: Array to hold those fields masked during a beamed export |
|
121 CDesC8ArrayFlat* iMaskedFieldsArray; |
|
122 }; |
|
123 |
|
124 #endif // CVPBKVCARDDATA_H |
|
125 //End of file |
|
126 |