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