1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/app/MVPbkContactLinkArray.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,99 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Virtual Phonebook interface for contact link array.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef MVPBKCONTACTLINKARRAY_H
1.23 +#define MVPBKCONTACTLINKARRAY_H
1.24 +
1.25 +// INCLUDES
1.26 +#include <e32cmn.h>
1.27 +#include <e32std.h>
1.28 +
1.29 +// FORWARD DECLARATIONS
1.30 +class MVPbkContactLink;
1.31 +class MVPbkStreamable;
1.32 +
1.33 +
1.34 +// CLASS DECLARATIONS
1.35 +
1.36 +/**
1.37 + * Virtual Phonebook contact link array.
1.38 + * This interface can be used to handle a read-only array of contact links.
1.39 + */
1.40 +class MVPbkContactLinkArray
1.41 + {
1.42 + public: // Destructor
1.43 + /**
1.44 + * Destructor.
1.45 + */
1.46 + virtual ~MVPbkContactLinkArray() { }
1.47 +
1.48 + public: // Interface
1.49 + /**
1.50 + * Returns the number of links in this array.
1.51 + * @return Number of links in this array.
1.52 + */
1.53 + virtual TInt Count() const =0;
1.54 +
1.55 + /**
1.56 + * Returns a link in this array at aIndex.
1.57 + * @return Link in this array at aIndex.
1.58 + */
1.59 + virtual const MVPbkContactLink& At(TInt aIndex) const =0;
1.60 +
1.61 + /**
1.62 + * Conveniency wrapper for At().
1.63 + * @param aindex Index to retrieve from the array.
1.64 + * @return Read-only reference to a contact link.
1.65 + */
1.66 + inline const MVPbkContactLink& operator[](TInt aIndex) const
1.67 + {
1.68 + return this->At(aIndex);
1.69 + }
1.70 +
1.71 + /**
1.72 + * Searches this array for a link.
1.73 + *
1.74 + * @param aLink the link to search.
1.75 + * @return The index where aLink was found or KErrNotFound.
1.76 + */
1.77 + virtual TInt Find(const MVPbkContactLink& aLink) const =0;
1.78 +
1.79 + /**
1.80 + * Packs the contents of this link array for IPC transfer.
1.81 + * @see MVPbkContactLink::PackLC
1.82 + * @see CVPbkContactManager::CreateLinksLC
1.83 + */
1.84 + virtual HBufC8* PackLC() const =0;
1.85 +
1.86 + /**
1.87 + * Returns persistent streaming interface for this link array,
1.88 + * or NULL if persistent streaming is not supported.
1.89 + */
1.90 + virtual const MVPbkStreamable* Streamable() const =0;
1.91 +
1.92 + /**
1.93 + * Returns an extension point for this interface or NULL.
1.94 + */
1.95 + virtual TAny* ContactLinkArrayExtension(
1.96 + TUid /*aExtensionUid*/) { return NULL; }
1.97 +
1.98 + };
1.99 +
1.100 +#endif // MVPBKCONTACTLINKARRAY_H
1.101 +
1.102 +// End of File