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 observer interface for find operation.
19 #ifndef MVPBKCONTACTFINDOBSERVER_H
20 #define MVPBKCONTACTFINDOBSERVER_H
25 // included here, instead of forward declared, so that clients
26 // don't delete an incomplete class.
27 #include <mvpbkcontactlinkarray.h>
31 * Virtual Phonebook Find observer.
32 * This interface is used to signal find clients of the operation
33 * progress and give the find results to the client.
35 class MVPbkContactFindObserver
39 * Called when find is complete. Caller takes ownership of the results
40 * In case of an error during find, the aResults may contain only
41 * partial results of the find
43 * @param aResults Array of contact links that matched the find
44 * Callee must take ownership of this object in
45 * the start of the function, ie. in case the
46 * function leaves the results must be destroyed.
47 * The find operation can be destroyed at the end
50 virtual void FindCompleteL( MVPbkContactLinkArray* aResults ) = 0;
53 * Called in case the find fails for some reason. The find operation
54 * can be destroyed at the end of this callback.
56 * @param aError One of the system wide error codes.
57 * KErrNotReady if store is not ready (not open or unavailable)
59 virtual void FindFailed( TInt aError ) = 0;
62 * Returns an extension point for this interface or NULL.
63 * @param aExtensionUid Uid of extension.
64 * @return Extension point or NULL.
66 virtual TAny* ContactFindObserverExtension(
67 TUid /*aExtensionUid*/ ) { return NULL; }
69 protected: // Destructor
73 virtual ~MVPbkContactFindObserver() { }
77 #endif // MVPBKCONTACTFINDOBSERVER_H