|
1 /* |
|
2 * Copyright (c) 2004-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: An interface for static contact store properties |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MVPBKCONTACTSTOREPROPERTIES_H |
|
20 #define MVPBKCONTACTSTOREPROPERTIES_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32cmn.h> |
|
25 #include <tvpbkcontactstoreuriptr.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MVPbkFieldTypeList; |
|
29 |
|
30 //Use this UID to access contact store propertiesextension 2. |
|
31 //Used as a parameter to ContactStorePropertiesExtension() method. |
|
32 const TUid KMVPbkContactStorePropertiesExtension2Uid = { 2 }; |
|
33 |
|
34 // CLASS DECLARATIONS |
|
35 |
|
36 /** |
|
37 * An interface for static contact store properties. |
|
38 * |
|
39 * Client can retrieve the static store properties using this |
|
40 * interface. The store must be opened before usage. |
|
41 * |
|
42 * @see MVPbkContactStore::StoreProperties |
|
43 */ |
|
44 class MVPbkContactStoreProperties |
|
45 { |
|
46 public: // Destructor |
|
47 virtual ~MVPbkContactStoreProperties() {} |
|
48 |
|
49 public: // New functions |
|
50 /** |
|
51 * Returns the EContactStoreUriStoreLocation component of the URI. |
|
52 * |
|
53 * The name could be e.g. contacts.cdb. |
|
54 * |
|
55 * @return The EContactStoreUriStoreLocation component of the URI |
|
56 */ |
|
57 virtual TVPbkContactStoreUriPtr Name() const =0; |
|
58 |
|
59 /** |
|
60 * Returns the complete URI of the contact store. |
|
61 * |
|
62 * The URI could be e.g cntdb://c:contacts.cdb |
|
63 * @return The complete URI of the store. |
|
64 */ |
|
65 virtual TVPbkContactStoreUriPtr Uri() const =0; |
|
66 |
|
67 /** |
|
68 * Returns true if the store is read-only. |
|
69 * |
|
70 * Contacts can not be created, edited nor deleted if the store |
|
71 * is read-only. |
|
72 * |
|
73 * @return ETrue if the store is read-only. |
|
74 */ |
|
75 virtual TBool ReadOnly() const =0; |
|
76 |
|
77 /** |
|
78 * Returns true if the store is persistent. |
|
79 * |
|
80 * Persistent means that if you do changes to a store and |
|
81 * then switch of the power of the phone the contact doesn't disappear |
|
82 * but can be retrieved from the store later. E.g. a store in RAM |
|
83 * wouldn't be persistent. |
|
84 * |
|
85 * @return ETrue if the store is persistent. |
|
86 */ |
|
87 virtual TBool Persistent() const =0; |
|
88 |
|
89 /** |
|
90 * Returns true if the store is local. |
|
91 * |
|
92 * The data is stored in the device. |
|
93 * This is the opposite of the remote stores. E.g. stores that |
|
94 * are in device memory, memory card or SIM card are local stores. |
|
95 * Stores that reside in an external device are not local. |
|
96 * |
|
97 * @return ETrue if the store is local |
|
98 */ |
|
99 virtual TBool Local() const =0; |
|
100 |
|
101 /** |
|
102 * Returns true if the data is stored on removable media. |
|
103 * |
|
104 * It means that store can be removed from the device |
|
105 * run time by the user. Memory card is typically this kind of |
|
106 * memory and also SIM card can be removed run time in some devices. |
|
107 * Remote stores are also removable since user can e.g. switch to |
|
108 * offline mode. |
|
109 * |
|
110 * @return ETrue if the store data is stored on removable media. |
|
111 */ |
|
112 virtual TBool Removable() const =0; |
|
113 |
|
114 /** |
|
115 * Returns true if the store supports field labels. |
|
116 * |
|
117 * The support here means a global support i.e all fields of |
|
118 * the store support labels. |
|
119 * |
|
120 * @return ETrue if the store supports field labels. |
|
121 * @see MVPbkStoreContactField::SupportsLabel |
|
122 */ |
|
123 virtual TBool SupportsFieldLabels() const =0; |
|
124 |
|
125 /** |
|
126 * Returns true if the store supports defaults fields. |
|
127 * |
|
128 * Default field information is a contact field attribute and can be |
|
129 * retrieved using the attribute manager. |
|
130 * |
|
131 * @return ETrue if the store supports defaults. |
|
132 * @see MVPbkContactAttributeManager |
|
133 * @see CVPbkDefaultAttribute |
|
134 */ |
|
135 virtual TBool SupportsDefaults() const =0; |
|
136 |
|
137 /** |
|
138 * Returns true if the store supports voice tags. |
|
139 * |
|
140 * Voice tag information is a contact field attribute and can be |
|
141 * retrieved using the attribute manager. |
|
142 * |
|
143 * @return ETrue if the store supports voice tags |
|
144 * @see MVPbkContactAttributeManager |
|
145 * @see CVPbkVoiceTagAttribute |
|
146 */ |
|
147 virtual TBool SupportsVoiceTags() const =0; |
|
148 |
|
149 /** |
|
150 * Returns true if the store supports speed dials. |
|
151 * |
|
152 * Speed dial information is a contact field attribute and can be |
|
153 * retrieved using the attribute manager. |
|
154 * |
|
155 * @return ETrue if the store supports speed dials. |
|
156 * @see MVPbkContactAttributeManager |
|
157 * @see CVPbkSpeedDialAttribute |
|
158 */ |
|
159 virtual TBool SupportsSpeedDials() const =0; |
|
160 |
|
161 /** |
|
162 * Returns true if the store supports contact groups. |
|
163 * |
|
164 * @return ETrue if the store supports contact groups. |
|
165 */ |
|
166 virtual TBool SupportsContactGroups() const =0; |
|
167 |
|
168 /** |
|
169 * Returns list of supported fields. |
|
170 * |
|
171 * The list contains a sub set of field types from |
|
172 * the master field type list in CVPbkContactManager. |
|
173 * |
|
174 * @return The list of supported fields |
|
175 * @see CVPbkContactManager::FieldTypes |
|
176 */ |
|
177 virtual const MVPbkFieldTypeList& SupportedFields() const =0; |
|
178 |
|
179 /** |
|
180 * Returns true if the store supports the requested service. |
|
181 * |
|
182 * @param aServiceUid The UID that is mapped to a service. |
|
183 * @return ETrue if the store supports the requested service. |
|
184 */ |
|
185 virtual TBool SupportsService(TUid aServiceUid) const =0; |
|
186 |
|
187 /** |
|
188 * Returns an extension point for this interface or NULL. |
|
189 * |
|
190 * @param aExtensionUid no extensions defined currently. |
|
191 * @return an extension point for this interface or NULL. |
|
192 */ |
|
193 virtual TAny* ContactStorePropertiesExtension(TUid /*aExtensionUid*/) { return NULL; } |
|
194 }; |
|
195 |
|
196 |
|
197 #endif // MVPBKCONTACTSTOREPROPERTIES_H |
|
198 |
|
199 //End of file |