2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: An interface for static contact store properties
19 #ifndef MVPBKCONTACTSTOREPROPERTIES_H
20 #define MVPBKCONTACTSTOREPROPERTIES_H
25 #include <tvpbkcontactstoreuriptr.h>
27 // FORWARD DECLARATIONS
28 class MVPbkFieldTypeList;
30 //Use this UID to access contact store propertiesextension 2.
31 //Used as a parameter to ContactStorePropertiesExtension() method.
32 const TUid KMVPbkContactStorePropertiesExtension2Uid = { 2 };
37 * An interface for static contact store properties.
39 * Client can retrieve the static store properties using this
40 * interface. The store must be opened before usage.
42 * @see MVPbkContactStore::StoreProperties
44 class MVPbkContactStoreProperties
47 virtual ~MVPbkContactStoreProperties() {}
49 public: // New functions
51 * Returns the EContactStoreUriStoreLocation component of the URI.
53 * The name could be e.g. contacts.cdb.
55 * @return The EContactStoreUriStoreLocation component of the URI
57 virtual TVPbkContactStoreUriPtr Name() const =0;
60 * Returns the complete URI of the contact store.
62 * The URI could be e.g cntdb://c:contacts.cdb
63 * @return The complete URI of the store.
65 virtual TVPbkContactStoreUriPtr Uri() const =0;
68 * Returns true if the store is read-only.
70 * Contacts can not be created, edited nor deleted if the store
73 * @return ETrue if the store is read-only.
75 virtual TBool ReadOnly() const =0;
78 * Returns true if the store is persistent.
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.
85 * @return ETrue if the store is persistent.
87 virtual TBool Persistent() const =0;
90 * Returns true if the store is local.
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.
97 * @return ETrue if the store is local
99 virtual TBool Local() const =0;
102 * Returns true if the data is stored on removable media.
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
110 * @return ETrue if the store data is stored on removable media.
112 virtual TBool Removable() const =0;
115 * Returns true if the store supports field labels.
117 * The support here means a global support i.e all fields of
118 * the store support labels.
120 * @return ETrue if the store supports field labels.
121 * @see MVPbkStoreContactField::SupportsLabel
123 virtual TBool SupportsFieldLabels() const =0;
126 * Returns true if the store supports defaults fields.
128 * Default field information is a contact field attribute and can be
129 * retrieved using the attribute manager.
131 * @return ETrue if the store supports defaults.
132 * @see MVPbkContactAttributeManager
133 * @see CVPbkDefaultAttribute
135 virtual TBool SupportsDefaults() const =0;
138 * Returns true if the store supports voice tags.
140 * Voice tag information is a contact field attribute and can be
141 * retrieved using the attribute manager.
143 * @return ETrue if the store supports voice tags
144 * @see MVPbkContactAttributeManager
145 * @see CVPbkVoiceTagAttribute
147 virtual TBool SupportsVoiceTags() const =0;
150 * Returns true if the store supports speed dials.
152 * Speed dial information is a contact field attribute and can be
153 * retrieved using the attribute manager.
155 * @return ETrue if the store supports speed dials.
156 * @see MVPbkContactAttributeManager
157 * @see CVPbkSpeedDialAttribute
159 virtual TBool SupportsSpeedDials() const =0;
162 * Returns true if the store supports contact groups.
164 * @return ETrue if the store supports contact groups.
166 virtual TBool SupportsContactGroups() const =0;
169 * Returns list of supported fields.
171 * The list contains a sub set of field types from
172 * the master field type list in CVPbkContactManager.
174 * @return The list of supported fields
175 * @see CVPbkContactManager::FieldTypes
177 virtual const MVPbkFieldTypeList& SupportedFields() const =0;
180 * Returns true if the store supports the requested service.
182 * @param aServiceUid The UID that is mapped to a service.
183 * @return ETrue if the store supports the requested service.
185 virtual TBool SupportsService(TUid aServiceUid) const =0;
188 * Returns an extension point for this interface or NULL.
190 * @param aExtensionUid no extensions defined currently.
191 * @return an extension point for this interface or NULL.
193 virtual TAny* ContactStorePropertiesExtension(TUid /*aExtensionUid*/) { return NULL; }
197 #endif // MVPBKCONTACTSTOREPROPERTIES_H