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.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description:  a contact store information interface
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
williamr@4
    19
#ifndef MVPBKCONTACTSTOREINFO_H
williamr@4
    20
#define MVPBKCONTACTSTOREINFO_H
williamr@4
    21
williamr@4
    22
williamr@4
    23
// INCLUDES
williamr@4
    24
#include <e32cmn.h>
williamr@4
    25
williamr@4
    26
// CONSTANTS
williamr@4
    27
const TInt KVPbkStoreInfoUnlimitedNumber = -1;
williamr@4
    28
williamr@4
    29
// CLASS DECLARATIONS
williamr@4
    30
williamr@4
    31
/**
williamr@4
    32
 * A contact store information interface.
williamr@4
    33
 *
williamr@4
    34
 * The interface offers access to contact store information that
williamr@4
    35
 * can change runtime.
williamr@4
    36
 */
williamr@4
    37
class MVPbkContactStoreInfo
williamr@4
    38
    {
williamr@4
    39
    public:  // Destructor
williamr@4
    40
        /**
williamr@4
    41
         * Destructor.
williamr@4
    42
         */
williamr@4
    43
        virtual ~MVPbkContactStoreInfo() {}
williamr@4
    44
williamr@4
    45
    public:  // New functions
williamr@4
    46
        /**
williamr@4
    47
         * Returns the maximum number of contacts that the store can have
williamr@4
    48
         *
williamr@4
    49
         * Client must always check the return value and compare it to
williamr@4
    50
         * to the KVPbkStoreInfoUnlimitedNumber.
williamr@4
    51
         *
williamr@4
    52
         * @return The maximum number of contacts that the store can have
williamr@4
    53
         *         or KVPbkStoreInfoUnlimitedNumber if the store hasn't got
williamr@4
    54
         *         a limit.
williamr@4
    55
         */
williamr@4
    56
        virtual TInt MaxNumberOfContactsL() const =0;
williamr@4
    57
        
williamr@4
    58
        /**
williamr@4
    59
         * Returns the current number of contacts in the store
williamr@4
    60
         *
williamr@4
    61
         * @return The current number of contacts in the store
williamr@4
    62
         */
williamr@4
    63
        virtual TInt NumberOfContactsL() const =0;
williamr@4
    64
        
williamr@4
    65
        /**
williamr@4
    66
         * Returns the amount of memory in bytes that this store reserves
williamr@4
    67
         * in the media it resides. 
williamr@4
    68
         *
williamr@4
    69
         * This is practical to implement for stores whose database is in 
williamr@4
    70
         * the file system. All store implementations don't know their
williamr@4
    71
         * memory consumption and in that case zero is returned.
williamr@4
    72
         *
williamr@4
    73
         * @return The amount of memory (bytes) that this store reserves 
williamr@4
    74
         *         in the media it resides or zero if the information is
williamr@4
    75
         *         not available (e.g in SIM stores)
williamr@4
    76
         */
williamr@4
    77
        virtual TInt64 ReservedMemoryL() const =0;
williamr@4
    78
        
williamr@4
    79
        /**
williamr@4
    80
         * Returns the amount of memory in bytes that can be used 
williamr@4
    81
         * for the new contacts.
williamr@4
    82
         *
williamr@4
    83
         * This is practical to implement for stores whose database is in 
williamr@4
    84
         * the file system. All store implementations don't know this
williamr@4
    85
         * information and in that case zero is returned.
williamr@4
    86
         * 
williamr@4
    87
         * @return Returns the amount of memory (bytes) that can be used for 
williamr@4
    88
         *         the new contacts or zero if the information is not available
williamr@4
    89
         */
williamr@4
    90
        virtual TInt64 FreeMemoryL() const =0;
williamr@4
    91
        
williamr@4
    92
        /**
williamr@4
    93
         * Returns the maximum number of groups that the store can have
williamr@4
    94
         *
williamr@4
    95
         * @return The maximum number of groups that the store can have
williamr@4
    96
         *         or KVPbkStoreInfoUnlimitedNumber if the store hasn't got
williamr@4
    97
         *         a limit. Zero if store doesn't support groups.
williamr@4
    98
         */
williamr@4
    99
        virtual TInt MaxNumberOfGroupsL() const =0;
williamr@4
   100
        
williamr@4
   101
        /**
williamr@4
   102
         * Returns the current amount of groups in the store.
williamr@4
   103
         *
williamr@4
   104
         * @return The current amount of groups in the store
williamr@4
   105
         */
williamr@4
   106
        virtual TInt NumberOfGroupsL() const =0;
williamr@4
   107
        
williamr@4
   108
        /**
williamr@4
   109
         * Returns an extension point for this interface or NULL.
williamr@4
   110
         *
williamr@4
   111
         * @param aExtensionUid no extensions defined currently.
williamr@4
   112
         * @return an extension point for this interface or NULL.
williamr@4
   113
         */
williamr@4
   114
        virtual TAny* ContactStoreInfoExtension(TUid /*aExtensionUid*/) 
williamr@4
   115
                { return NULL; }
williamr@4
   116
    };
williamr@4
   117
williamr@4
   118
williamr@4
   119
#endif  // MVPBKCONTACTSTOREINFO_H
williamr@4
   120
williamr@4
   121
//End of file