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: a contact store information interface
19 #ifndef MVPBKCONTACTSTOREINFO_H
20 #define MVPBKCONTACTSTOREINFO_H
27 const TInt KVPbkStoreInfoUnlimitedNumber = -1;
32 * A contact store information interface.
34 * The interface offers access to contact store information that
37 class MVPbkContactStoreInfo
43 virtual ~MVPbkContactStoreInfo() {}
45 public: // New functions
47 * Returns the maximum number of contacts that the store can have
49 * Client must always check the return value and compare it to
50 * to the KVPbkStoreInfoUnlimitedNumber.
52 * @return The maximum number of contacts that the store can have
53 * or KVPbkStoreInfoUnlimitedNumber if the store hasn't got
56 virtual TInt MaxNumberOfContactsL() const =0;
59 * Returns the current number of contacts in the store
61 * @return The current number of contacts in the store
63 virtual TInt NumberOfContactsL() const =0;
66 * Returns the amount of memory in bytes that this store reserves
67 * in the media it resides.
69 * This is practical to implement for stores whose database is in
70 * the file system. All store implementations don't know their
71 * memory consumption and in that case zero is returned.
73 * @return The amount of memory (bytes) that this store reserves
74 * in the media it resides or zero if the information is
75 * not available (e.g in SIM stores)
77 virtual TInt64 ReservedMemoryL() const =0;
80 * Returns the amount of memory in bytes that can be used
81 * for the new contacts.
83 * This is practical to implement for stores whose database is in
84 * the file system. All store implementations don't know this
85 * information and in that case zero is returned.
87 * @return Returns the amount of memory (bytes) that can be used for
88 * the new contacts or zero if the information is not available
90 virtual TInt64 FreeMemoryL() const =0;
93 * Returns the maximum number of groups that the store can have
95 * @return The maximum number of groups that the store can have
96 * or KVPbkStoreInfoUnlimitedNumber if the store hasn't got
97 * a limit. Zero if store doesn't support groups.
99 virtual TInt MaxNumberOfGroupsL() const =0;
102 * Returns the current amount of groups in the store.
104 * @return The current amount of groups in the store
106 virtual TInt NumberOfGroupsL() const =0;
109 * Returns an extension point for this interface or NULL.
111 * @param aExtensionUid no extensions defined currently.
112 * @return an extension point for this interface or NULL.
114 virtual TAny* ContactStoreInfoExtension(TUid /*aExtensionUid*/)
119 #endif // MVPBKCONTACTSTOREINFO_H