1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/app/MVPbkContactStoreInfo.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,121 @@
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: a contact store information interface
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef MVPBKCONTACTSTOREINFO_H
1.23 +#define MVPBKCONTACTSTOREINFO_H
1.24 +
1.25 +
1.26 +// INCLUDES
1.27 +#include <e32cmn.h>
1.28 +
1.29 +// CONSTANTS
1.30 +const TInt KVPbkStoreInfoUnlimitedNumber = -1;
1.31 +
1.32 +// CLASS DECLARATIONS
1.33 +
1.34 +/**
1.35 + * A contact store information interface.
1.36 + *
1.37 + * The interface offers access to contact store information that
1.38 + * can change runtime.
1.39 + */
1.40 +class MVPbkContactStoreInfo
1.41 + {
1.42 + public: // Destructor
1.43 + /**
1.44 + * Destructor.
1.45 + */
1.46 + virtual ~MVPbkContactStoreInfo() {}
1.47 +
1.48 + public: // New functions
1.49 + /**
1.50 + * Returns the maximum number of contacts that the store can have
1.51 + *
1.52 + * Client must always check the return value and compare it to
1.53 + * to the KVPbkStoreInfoUnlimitedNumber.
1.54 + *
1.55 + * @return The maximum number of contacts that the store can have
1.56 + * or KVPbkStoreInfoUnlimitedNumber if the store hasn't got
1.57 + * a limit.
1.58 + */
1.59 + virtual TInt MaxNumberOfContactsL() const =0;
1.60 +
1.61 + /**
1.62 + * Returns the current number of contacts in the store
1.63 + *
1.64 + * @return The current number of contacts in the store
1.65 + */
1.66 + virtual TInt NumberOfContactsL() const =0;
1.67 +
1.68 + /**
1.69 + * Returns the amount of memory in bytes that this store reserves
1.70 + * in the media it resides.
1.71 + *
1.72 + * This is practical to implement for stores whose database is in
1.73 + * the file system. All store implementations don't know their
1.74 + * memory consumption and in that case zero is returned.
1.75 + *
1.76 + * @return The amount of memory (bytes) that this store reserves
1.77 + * in the media it resides or zero if the information is
1.78 + * not available (e.g in SIM stores)
1.79 + */
1.80 + virtual TInt64 ReservedMemoryL() const =0;
1.81 +
1.82 + /**
1.83 + * Returns the amount of memory in bytes that can be used
1.84 + * for the new contacts.
1.85 + *
1.86 + * This is practical to implement for stores whose database is in
1.87 + * the file system. All store implementations don't know this
1.88 + * information and in that case zero is returned.
1.89 + *
1.90 + * @return Returns the amount of memory (bytes) that can be used for
1.91 + * the new contacts or zero if the information is not available
1.92 + */
1.93 + virtual TInt64 FreeMemoryL() const =0;
1.94 +
1.95 + /**
1.96 + * Returns the maximum number of groups that the store can have
1.97 + *
1.98 + * @return The maximum number of groups that the store can have
1.99 + * or KVPbkStoreInfoUnlimitedNumber if the store hasn't got
1.100 + * a limit. Zero if store doesn't support groups.
1.101 + */
1.102 + virtual TInt MaxNumberOfGroupsL() const =0;
1.103 +
1.104 + /**
1.105 + * Returns the current amount of groups in the store.
1.106 + *
1.107 + * @return The current amount of groups in the store
1.108 + */
1.109 + virtual TInt NumberOfGroupsL() const =0;
1.110 +
1.111 + /**
1.112 + * Returns an extension point for this interface or NULL.
1.113 + *
1.114 + * @param aExtensionUid no extensions defined currently.
1.115 + * @return an extension point for this interface or NULL.
1.116 + */
1.117 + virtual TAny* ContactStoreInfoExtension(TUid /*aExtensionUid*/)
1.118 + { return NULL; }
1.119 + };
1.120 +
1.121 +
1.122 +#endif // MVPBKCONTACTSTOREINFO_H
1.123 +
1.124 +//End of file