epoc32/include/app/MVPbkContactLinkArray.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) 2002-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:  Virtual Phonebook interface for contact link array.
    15 *
    16 */
    17 
    18 
    19 #ifndef MVPBKCONTACTLINKARRAY_H
    20 #define MVPBKCONTACTLINKARRAY_H
    21 
    22 // INCLUDES
    23 #include <e32cmn.h>
    24 #include <e32std.h>
    25 
    26 // FORWARD DECLARATIONS
    27 class MVPbkContactLink;
    28 class MVPbkStreamable;
    29 
    30 
    31 // CLASS DECLARATIONS
    32 
    33 /**
    34  * Virtual Phonebook contact link array.
    35  * This interface can be used to handle a read-only array of contact links.
    36  */
    37 class MVPbkContactLinkArray
    38     {
    39     public: // Destructor
    40         /**
    41          * Destructor.
    42          */
    43         virtual ~MVPbkContactLinkArray() { }
    44 
    45     public: // Interface
    46         /**
    47          * Returns the number of links in this array.
    48          * @return Number of links in this array.
    49          */
    50         virtual TInt Count() const =0;
    51 
    52         /**
    53          * Returns a link in this array at aIndex.
    54          * @return Link in this array at aIndex.
    55          */
    56         virtual const MVPbkContactLink& At(TInt aIndex) const =0;
    57 
    58         /**
    59          * Conveniency wrapper for At().
    60          * @param aindex    Index to retrieve from the array.
    61          * @return Read-only reference to a contact link.
    62          */
    63         inline const MVPbkContactLink& operator[](TInt aIndex) const
    64             {
    65             return this->At(aIndex);
    66             }
    67 
    68         /**
    69          * Searches this array for a link.
    70          *
    71          * @param aLink the link to search.
    72          * @return The index where aLink was found or KErrNotFound.
    73          */
    74         virtual TInt Find(const MVPbkContactLink& aLink) const =0;
    75 
    76         /**
    77          * Packs the contents of this link array for IPC transfer.
    78          * @see MVPbkContactLink::PackLC
    79          * @see CVPbkContactManager::CreateLinksLC
    80          */
    81         virtual HBufC8* PackLC() const =0;
    82 
    83         /**
    84          * Returns persistent streaming interface for this link array, 
    85          * or NULL if persistent streaming is not supported.
    86          */
    87         virtual const MVPbkStreamable* Streamable() const =0;    
    88 
    89         /**
    90          * Returns an extension point for this interface or NULL.
    91          */
    92         virtual TAny* ContactLinkArrayExtension(
    93                 TUid /*aExtensionUid*/) { return NULL; }
    94 
    95     };
    96 
    97 #endif // MVPBKCONTACTLINKARRAY_H
    98 
    99 // End of File