williamr@4: /* williamr@4: * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: a contact store information interface williamr@4: * williamr@4: */ williamr@4: williamr@4: williamr@4: #ifndef MVPBKCONTACTSTOREINFO_H williamr@4: #define MVPBKCONTACTSTOREINFO_H williamr@4: williamr@4: williamr@4: // INCLUDES williamr@4: #include williamr@4: williamr@4: // CONSTANTS williamr@4: const TInt KVPbkStoreInfoUnlimitedNumber = -1; williamr@4: williamr@4: // CLASS DECLARATIONS williamr@4: williamr@4: /** williamr@4: * A contact store information interface. williamr@4: * williamr@4: * The interface offers access to contact store information that williamr@4: * can change runtime. williamr@4: */ williamr@4: class MVPbkContactStoreInfo williamr@4: { williamr@4: public: // Destructor williamr@4: /** williamr@4: * Destructor. williamr@4: */ williamr@4: virtual ~MVPbkContactStoreInfo() {} williamr@4: williamr@4: public: // New functions williamr@4: /** williamr@4: * Returns the maximum number of contacts that the store can have williamr@4: * williamr@4: * Client must always check the return value and compare it to williamr@4: * to the KVPbkStoreInfoUnlimitedNumber. williamr@4: * williamr@4: * @return The maximum number of contacts that the store can have williamr@4: * or KVPbkStoreInfoUnlimitedNumber if the store hasn't got williamr@4: * a limit. williamr@4: */ williamr@4: virtual TInt MaxNumberOfContactsL() const =0; williamr@4: williamr@4: /** williamr@4: * Returns the current number of contacts in the store williamr@4: * williamr@4: * @return The current number of contacts in the store williamr@4: */ williamr@4: virtual TInt NumberOfContactsL() const =0; williamr@4: williamr@4: /** williamr@4: * Returns the amount of memory in bytes that this store reserves williamr@4: * in the media it resides. williamr@4: * williamr@4: * This is practical to implement for stores whose database is in williamr@4: * the file system. All store implementations don't know their williamr@4: * memory consumption and in that case zero is returned. williamr@4: * williamr@4: * @return The amount of memory (bytes) that this store reserves williamr@4: * in the media it resides or zero if the information is williamr@4: * not available (e.g in SIM stores) williamr@4: */ williamr@4: virtual TInt64 ReservedMemoryL() const =0; williamr@4: williamr@4: /** williamr@4: * Returns the amount of memory in bytes that can be used williamr@4: * for the new contacts. williamr@4: * williamr@4: * This is practical to implement for stores whose database is in williamr@4: * the file system. All store implementations don't know this williamr@4: * information and in that case zero is returned. williamr@4: * williamr@4: * @return Returns the amount of memory (bytes) that can be used for williamr@4: * the new contacts or zero if the information is not available williamr@4: */ williamr@4: virtual TInt64 FreeMemoryL() const =0; williamr@4: williamr@4: /** williamr@4: * Returns the maximum number of groups that the store can have williamr@4: * williamr@4: * @return The maximum number of groups that the store can have williamr@4: * or KVPbkStoreInfoUnlimitedNumber if the store hasn't got williamr@4: * a limit. Zero if store doesn't support groups. williamr@4: */ williamr@4: virtual TInt MaxNumberOfGroupsL() const =0; williamr@4: williamr@4: /** williamr@4: * Returns the current amount of groups in the store. williamr@4: * williamr@4: * @return The current amount of groups in the store williamr@4: */ williamr@4: virtual TInt NumberOfGroupsL() const =0; williamr@4: williamr@4: /** williamr@4: * Returns an extension point for this interface or NULL. williamr@4: * williamr@4: * @param aExtensionUid no extensions defined currently. williamr@4: * @return an extension point for this interface or NULL. williamr@4: */ williamr@4: virtual TAny* ContactStoreInfoExtension(TUid /*aExtensionUid*/) williamr@4: { return NULL; } williamr@4: }; williamr@4: williamr@4: williamr@4: #endif // MVPBKCONTACTSTOREINFO_H williamr@4: williamr@4: //End of file