epoc32/include/app/MVPbkContactStoreProperties.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/app/MVPbkContactStoreProperties.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,199 @@
     1.4 +/*
     1.5 +* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  An interface for static contact store properties
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef MVPBKCONTACTSTOREPROPERTIES_H
    1.23 +#define MVPBKCONTACTSTOREPROPERTIES_H
    1.24 +
    1.25 +
    1.26 +// INCLUDES
    1.27 +#include <e32cmn.h>
    1.28 +#include <tvpbkcontactstoreuriptr.h>
    1.29 +
    1.30 +// FORWARD DECLARATIONS
    1.31 +class MVPbkFieldTypeList;
    1.32 +
    1.33 +//Use this UID to access contact store propertiesextension 2. 
    1.34 +//Used as a parameter to ContactStorePropertiesExtension() method.
    1.35 +const TUid KMVPbkContactStorePropertiesExtension2Uid = { 2 };
    1.36 +
    1.37 +// CLASS DECLARATIONS
    1.38 +
    1.39 +/**
    1.40 + * An interface for static contact store properties.
    1.41 + *
    1.42 + * Client can retrieve the static store properties using this
    1.43 + * interface. The store must be opened before usage.
    1.44 + *
    1.45 + * @see MVPbkContactStore::StoreProperties
    1.46 + */
    1.47 +class MVPbkContactStoreProperties
    1.48 +    {
    1.49 +    public:  // Destructor
    1.50 +        virtual ~MVPbkContactStoreProperties() {}
    1.51 +
    1.52 +    public:  // New functions
    1.53 +        /**
    1.54 +         * Returns the EContactStoreUriStoreLocation component of the URI.
    1.55 +         *
    1.56 +         * The name could be e.g. contacts.cdb.
    1.57 +         *
    1.58 +         * @return The EContactStoreUriStoreLocation component of the URI
    1.59 +         */
    1.60 +        virtual TVPbkContactStoreUriPtr Name() const =0;
    1.61 +
    1.62 +        /**
    1.63 +         * Returns the complete URI of the contact store.
    1.64 +         *
    1.65 +         * The URI could be e.g cntdb://c:contacts.cdb
    1.66 +         * @return The complete URI of the store.
    1.67 +         */
    1.68 +        virtual TVPbkContactStoreUriPtr Uri() const =0;
    1.69 +
    1.70 +        /**
    1.71 +         * Returns true if the store is read-only.
    1.72 +         * 
    1.73 +         * Contacts can not be created, edited nor deleted if the store 
    1.74 +         * is read-only.
    1.75 +         *
    1.76 +         * @return ETrue if the store is read-only.
    1.77 +         */
    1.78 +        virtual TBool ReadOnly() const =0;
    1.79 +
    1.80 +        /**
    1.81 +         * Returns true if the store is persistent. 
    1.82 +         * 
    1.83 +         * Persistent means that if you do changes to a store and 
    1.84 +         * then switch of the power of the phone the contact doesn't disappear 
    1.85 +         * but can be retrieved from the store later. E.g. a store in RAM
    1.86 +         * wouldn't be persistent.
    1.87 +         *
    1.88 +         * @return ETrue if the store is persistent.
    1.89 +         */
    1.90 +        virtual TBool Persistent() const =0;
    1.91 +
    1.92 +        /**
    1.93 +         * Returns true if the store is local. 
    1.94 +         *
    1.95 +         * The data is stored in the device.
    1.96 +         * This is the opposite of the remote stores. E.g. stores that
    1.97 +         * are in device memory, memory card or SIM card are local stores.
    1.98 +         * Stores that reside in an external device are not local.
    1.99 +         *
   1.100 +         * @return ETrue if the store is local
   1.101 +         */
   1.102 +        virtual TBool Local() const =0;
   1.103 +
   1.104 +        /**
   1.105 +         * Returns true if the data is stored on removable media.
   1.106 +         *
   1.107 +         * It means that store can be removed from the device 
   1.108 +         * run time by the user. Memory card is typically this kind of
   1.109 +         * memory and also SIM card can be removed run time in some devices.
   1.110 +         * Remote stores are also removable since user can e.g. switch to
   1.111 +         * offline mode.
   1.112 +         *
   1.113 +         * @return ETrue if the store data is stored on removable media.
   1.114 +         */
   1.115 +        virtual TBool Removable() const =0;
   1.116 +
   1.117 +        /**
   1.118 +         * Returns true if the store supports field labels. 
   1.119 +         * 
   1.120 +         * The support here means a global support i.e all fields of
   1.121 +         * the store support labels.
   1.122 +         *
   1.123 +         * @return ETrue if the store supports field labels.
   1.124 +         * @see MVPbkStoreContactField::SupportsLabel
   1.125 +         */
   1.126 +        virtual TBool SupportsFieldLabels() const =0;
   1.127 +
   1.128 +        /**
   1.129 +         * Returns true if the store supports defaults fields.
   1.130 +         *
   1.131 +         * Default field information is a contact field attribute and can be
   1.132 +         * retrieved using the attribute manager.
   1.133 +         *
   1.134 +         * @return ETrue if the store supports defaults.
   1.135 +         * @see MVPbkContactAttributeManager
   1.136 +         * @see CVPbkDefaultAttribute
   1.137 +         */
   1.138 +        virtual TBool SupportsDefaults() const =0;
   1.139 +
   1.140 +        /**
   1.141 +         * Returns true if the store supports voice tags.
   1.142 +         *
   1.143 +         * Voice tag information is a contact field attribute and can be
   1.144 +         * retrieved using the attribute manager.
   1.145 +         *
   1.146 +         * @return ETrue if the store supports voice tags
   1.147 +         * @see MVPbkContactAttributeManager
   1.148 +         * @see CVPbkVoiceTagAttribute
   1.149 +         */
   1.150 +        virtual TBool SupportsVoiceTags() const =0;
   1.151 +
   1.152 +        /**
   1.153 +         * Returns true if the store supports speed dials.
   1.154 +         *
   1.155 +         * Speed dial information is a contact field attribute and can be
   1.156 +         * retrieved using the attribute manager.
   1.157 +         *
   1.158 +         * @return ETrue if the store supports speed dials.
   1.159 +         * @see MVPbkContactAttributeManager
   1.160 +         * @see CVPbkSpeedDialAttribute
   1.161 +         */
   1.162 +        virtual TBool SupportsSpeedDials() const =0;
   1.163 +
   1.164 +        /**
   1.165 +         * Returns true if the store supports contact groups.
   1.166 +         *
   1.167 +         * @return ETrue if the store supports contact groups.
   1.168 +         */
   1.169 +        virtual TBool SupportsContactGroups() const =0;
   1.170 +
   1.171 +        /**
   1.172 +         * Returns list of supported fields.
   1.173 +         *
   1.174 +         * The list contains a sub set of field types from
   1.175 +         * the master field type list in CVPbkContactManager.
   1.176 +         *
   1.177 +         * @return The list of supported fields
   1.178 +         * @see CVPbkContactManager::FieldTypes
   1.179 +         */
   1.180 +        virtual const MVPbkFieldTypeList& SupportedFields() const =0;
   1.181 +
   1.182 +        /**
   1.183 +         * Returns true if the store supports the requested service.
   1.184 +         *
   1.185 +         * @param aServiceUid   The UID that is mapped to a service.
   1.186 +         * @return ETrue if the store supports the requested service.
   1.187 +         */
   1.188 +        virtual TBool SupportsService(TUid aServiceUid) const =0;
   1.189 +
   1.190 +        /**
   1.191 +         * Returns an extension point for this interface or NULL.
   1.192 +         *
   1.193 +         * @param aExtensionUid no extensions defined currently.
   1.194 +         * @return an extension point for this interface or NULL.
   1.195 +         */
   1.196 +        virtual TAny* ContactStorePropertiesExtension(TUid /*aExtensionUid*/) { return NULL; }
   1.197 +    };
   1.198 +
   1.199 +
   1.200 +#endif  // MVPBKCONTACTSTOREPROPERTIES_H
   1.201 +
   1.202 +//End of file