williamr@4: /* williamr@4: * Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). williamr@4: * All rights reserved. williamr@4: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@4: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: * williamr@4: * Initial Contributors: williamr@4: * Nokia Corporation - initial contribution. williamr@4: * williamr@4: * Contributors: williamr@4: * williamr@4: * Description: Virtual Phonebook interface for contact link array. williamr@4: * williamr@4: */ williamr@4: williamr@4: williamr@4: #ifndef MVPBKCONTACTLINKARRAY_H williamr@4: #define MVPBKCONTACTLINKARRAY_H williamr@4: williamr@4: // INCLUDES williamr@4: #include williamr@4: #include williamr@4: williamr@4: // FORWARD DECLARATIONS williamr@4: class MVPbkContactLink; williamr@4: class MVPbkStreamable; williamr@4: williamr@4: williamr@4: // CLASS DECLARATIONS williamr@4: williamr@4: /** williamr@4: * Virtual Phonebook contact link array. williamr@4: * This interface can be used to handle a read-only array of contact links. williamr@4: */ williamr@4: class MVPbkContactLinkArray williamr@4: { williamr@4: public: // Destructor williamr@4: /** williamr@4: * Destructor. williamr@4: */ williamr@4: virtual ~MVPbkContactLinkArray() { } williamr@4: williamr@4: public: // Interface williamr@4: /** williamr@4: * Returns the number of links in this array. williamr@4: * @return Number of links in this array. williamr@4: */ williamr@4: virtual TInt Count() const =0; williamr@4: williamr@4: /** williamr@4: * Returns a link in this array at aIndex. williamr@4: * @return Link in this array at aIndex. williamr@4: */ williamr@4: virtual const MVPbkContactLink& At(TInt aIndex) const =0; williamr@4: williamr@4: /** williamr@4: * Conveniency wrapper for At(). williamr@4: * @param aindex Index to retrieve from the array. williamr@4: * @return Read-only reference to a contact link. williamr@4: */ williamr@4: inline const MVPbkContactLink& operator[](TInt aIndex) const williamr@4: { williamr@4: return this->At(aIndex); williamr@4: } williamr@4: williamr@4: /** williamr@4: * Searches this array for a link. williamr@4: * williamr@4: * @param aLink the link to search. williamr@4: * @return The index where aLink was found or KErrNotFound. williamr@4: */ williamr@4: virtual TInt Find(const MVPbkContactLink& aLink) const =0; williamr@4: williamr@4: /** williamr@4: * Packs the contents of this link array for IPC transfer. williamr@4: * @see MVPbkContactLink::PackLC williamr@4: * @see CVPbkContactManager::CreateLinksLC williamr@4: */ williamr@4: virtual HBufC8* PackLC() const =0; williamr@4: williamr@4: /** williamr@4: * Returns persistent streaming interface for this link array, williamr@4: * or NULL if persistent streaming is not supported. williamr@4: */ williamr@4: virtual const MVPbkStreamable* Streamable() const =0; williamr@4: williamr@4: /** williamr@4: * Returns an extension point for this interface or NULL. williamr@4: */ williamr@4: virtual TAny* ContactLinkArrayExtension( williamr@4: TUid /*aExtensionUid*/) { return NULL; } williamr@4: williamr@4: }; williamr@4: williamr@4: #endif // MVPBKCONTACTLINKARRAY_H williamr@4: williamr@4: // End of File