epoc32/include/app/MVPbkContactStoreInfo.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  a contact store information interface
    15 *
    16 */
    17 
    18 
    19 #ifndef MVPBKCONTACTSTOREINFO_H
    20 #define MVPBKCONTACTSTOREINFO_H
    21 
    22 
    23 // INCLUDES
    24 #include <e32cmn.h>
    25 
    26 // CONSTANTS
    27 const TInt KVPbkStoreInfoUnlimitedNumber = -1;
    28 
    29 // CLASS DECLARATIONS
    30 
    31 /**
    32  * A contact store information interface.
    33  *
    34  * The interface offers access to contact store information that
    35  * can change runtime.
    36  */
    37 class MVPbkContactStoreInfo
    38     {
    39     public:  // Destructor
    40         /**
    41          * Destructor.
    42          */
    43         virtual ~MVPbkContactStoreInfo() {}
    44 
    45     public:  // New functions
    46         /**
    47          * Returns the maximum number of contacts that the store can have
    48          *
    49          * Client must always check the return value and compare it to
    50          * to the KVPbkStoreInfoUnlimitedNumber.
    51          *
    52          * @return The maximum number of contacts that the store can have
    53          *         or KVPbkStoreInfoUnlimitedNumber if the store hasn't got
    54          *         a limit.
    55          */
    56         virtual TInt MaxNumberOfContactsL() const =0;
    57         
    58         /**
    59          * Returns the current number of contacts in the store
    60          *
    61          * @return The current number of contacts in the store
    62          */
    63         virtual TInt NumberOfContactsL() const =0;
    64         
    65         /**
    66          * Returns the amount of memory in bytes that this store reserves
    67          * in the media it resides. 
    68          *
    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.
    72          *
    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)
    76          */
    77         virtual TInt64 ReservedMemoryL() const =0;
    78         
    79         /**
    80          * Returns the amount of memory in bytes that can be used 
    81          * for the new contacts.
    82          *
    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.
    86          * 
    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
    89          */
    90         virtual TInt64 FreeMemoryL() const =0;
    91         
    92         /**
    93          * Returns the maximum number of groups that the store can have
    94          *
    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.
    98          */
    99         virtual TInt MaxNumberOfGroupsL() const =0;
   100         
   101         /**
   102          * Returns the current amount of groups in the store.
   103          *
   104          * @return The current amount of groups in the store
   105          */
   106         virtual TInt NumberOfGroupsL() const =0;
   107         
   108         /**
   109          * Returns an extension point for this interface or NULL.
   110          *
   111          * @param aExtensionUid no extensions defined currently.
   112          * @return an extension point for this interface or NULL.
   113          */
   114         virtual TAny* ContactStoreInfoExtension(TUid /*aExtensionUid*/) 
   115                 { return NULL; }
   116     };
   117 
   118 
   119 #endif  // MVPBKCONTACTSTOREINFO_H
   120 
   121 //End of file