2 * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Virtual Phonebook interface for contact link array.
19 #ifndef MVPBKCONTACTLINKARRAY_H
20 #define MVPBKCONTACTLINKARRAY_H
26 // FORWARD DECLARATIONS
27 class MVPbkContactLink;
28 class MVPbkStreamable;
34 * Virtual Phonebook contact link array.
35 * This interface can be used to handle a read-only array of contact links.
37 class MVPbkContactLinkArray
43 virtual ~MVPbkContactLinkArray() { }
47 * Returns the number of links in this array.
48 * @return Number of links in this array.
50 virtual TInt Count() const =0;
53 * Returns a link in this array at aIndex.
54 * @return Link in this array at aIndex.
56 virtual const MVPbkContactLink& At(TInt aIndex) const =0;
59 * Conveniency wrapper for At().
60 * @param aindex Index to retrieve from the array.
61 * @return Read-only reference to a contact link.
63 inline const MVPbkContactLink& operator[](TInt aIndex) const
65 return this->At(aIndex);
69 * Searches this array for a link.
71 * @param aLink the link to search.
72 * @return The index where aLink was found or KErrNotFound.
74 virtual TInt Find(const MVPbkContactLink& aLink) const =0;
77 * Packs the contents of this link array for IPC transfer.
78 * @see MVPbkContactLink::PackLC
79 * @see CVPbkContactManager::CreateLinksLC
81 virtual HBufC8* PackLC() const =0;
84 * Returns persistent streaming interface for this link array,
85 * or NULL if persistent streaming is not supported.
87 virtual const MVPbkStreamable* Streamable() const =0;
90 * Returns an extension point for this interface or NULL.
92 virtual TAny* ContactLinkArrayExtension(
93 TUid /*aExtensionUid*/) { return NULL; }
97 #endif // MVPBKCONTACTLINKARRAY_H