epoc32/include/app/MVPbkContactStoreList.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:  An interface for a list of contact stores.
    15 *
    16 */
    17 
    18 
    19 #ifndef MVPBKCONTACTSTORELIST_H
    20 #define MVPBKCONTACTSTORELIST_H
    21 
    22 // INCLUDES
    23 #include <e32std.h>
    24 
    25 // FORWARD DECLARATIONS
    26 class MVPbkContactStore;
    27 class MVPbkContactStoreListObserver;
    28 class TVPbkContactStoreUriPtr;
    29 
    30 
    31 // CLASS DECLARATIONS
    32 /**
    33  * An interface for a list of contact stores.
    34  *
    35  * The interface provides an access to multiple stores. It's possible to open
    36  * and close all stores in single call using this interface. When client calls
    37  * OpenAllL it must also calls CloseAll after usage.
    38  *
    39  * @see CVPbkContactManager::ContactStoresL
    40  */
    41 class MVPbkContactStoreList
    42     {
    43     public: // interface
    44         virtual ~MVPbkContactStoreList() { }
    45 
    46         /**
    47          * Returns the number of stores in the list.
    48          *
    49          * @return The number of stores in the list.
    50          */
    51         virtual TInt Count() const =0;
    52 
    53         /**
    54          * Returns the store in given index in the list.
    55          *
    56          * @param aIndex the index of the store in the list
    57          * @precond aIndex >= 0 && aIndex < Count()
    58          *              VPbkError::Panic(VPbkError::EInvalidStoreIndex)
    59          *              is raised if the precondition does not hold.
    60          * @return The store in the specified index.
    61          */
    62         virtual MVPbkContactStore& At(TInt aIndex) const =0;
    63 
    64         /**
    65          * Finds the contact store corresponding to the aUri.
    66          *
    67          * @param aUri the store URI to search for.
    68          * @return The contact store corresponding to the aUri or NULL.
    69          */
    70         virtual MVPbkContactStore* Find(
    71             const TVPbkContactStoreUriPtr& aUri) const =0;
    72 
    73         /**
    74          * Opens all stores in the list asynchronously.
    75          *
    76          * A client can not use stores before it has successfully opened
    77          * them. CloseAll must be always called by the same observer that has
    78          * opened stores.
    79          *
    80          * NOTE: There can be only one observer for one store list at a time.
    81          *
    82          * @param aObserver An observer for the stores.
    83          * @exception KErrInUse If one observer is currently opening this list.
    84          */
    85         virtual void OpenAllL(MVPbkContactStoreListObserver& aObserver) =0;
    86 
    87         /**
    88          * Closes all stores in the list.
    89          *
    90          * This is safe to call in all circumstances. Implementations
    91          * can not trust that OpenAllL has been called before.
    92          *
    93          * @param aObserver An observer for the close process.
    94          */
    95         virtual void CloseAll(MVPbkContactStoreListObserver& aObserver) =0;
    96 
    97         /**
    98          * Returns an extension point for this interface or NULL.
    99          *
   100          * @param aExtensionUid no extensions defined currently.
   101          * @return an extension point for this interface or NULL.
   102          */
   103         virtual TAny* ContactStoreListExtension(TUid /*aExtensionUid*/) 
   104                 { return NULL; }
   105 
   106     };
   107 
   108 #endif // MVPBKCONTACTSTORELIST_H
   109 
   110 //End of file