2 * Copyright (c) 2006-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 API for finding contacts from
20 #ifndef MVPBKCONTACTFINDFROMSTORESOBSERVER_H
21 #define MVPBKCONTACTFINDFROMSTORESOBSERVER_H
25 // included here, instead of forward declared, so that clients
26 // dont delete an incomplete class.
27 #include <mvpbkcontactlinkarray.h>
29 class MVPbkContactStore;
32 * An observer interface for finding contacts from the stores.
33 * This interface is used to signal find clients of the
34 * operations progress.
36 class MVPbkContactFindFromStoresObserver
40 * This is called when one store completes its find. If this
41 * leaves then FindFromStoreFailed is called. Client takes
42 * the ownership of all results immediately!
44 * FindFromStoresOperationComplete is called after
45 * all stores have called either this or FindFromStoreFailed.
47 * @param aStore The store whose find results are available
48 * @param aResultsFromStore The find results from the store.
49 * Client takes the ownership immediately!
51 virtual void FindFromStoreSucceededL( MVPbkContactStore& aStore,
52 MVPbkContactLinkArray* aResultsFromStore ) = 0;
55 * Called when a find operation of one store fails. Doesn't stop
56 * the find from other stores in the case there are multiple stores.
58 * @param aStore The failed store.
59 * @param aError A system wide error code from the
60 * store implementation.
62 virtual void FindFromStoreFailed(
63 MVPbkContactStore& aStore, TInt aError ) = 0;
66 * This is called after all stores have called either
67 * FindFromStoreSucceed or FindFromStoreFailed. It's called
68 * also when there are no stores that offer find operation.
70 virtual void FindFromStoresOperationComplete() = 0;
73 * Returns an extension point for this interface or NULL.
74 * @param aExtensionUid Uid of extension.
75 * @return Extension point or NULL.
77 virtual TAny* ContactFindFromStoresObserverExtension(
78 TUid /*aExtensionUid*/) { return NULL; }
84 virtual ~MVPbkContactFindFromStoresObserver() {}
88 #endif // MVPBKCONTACTFINDFROMSTORESOBSERVER_H