1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/app/MVPbkContactFindFromStoresObserver.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,90 @@
1.4 +/*
1.5 +* Copyright (c) 2006-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 observer API for finding contacts from
1.18 +* the stores.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef MVPBKCONTACTFINDFROMSTORESOBSERVER_H
1.24 +#define MVPBKCONTACTFINDFROMSTORESOBSERVER_H
1.25 +
1.26 +
1.27 +#include <e32def.h>
1.28 +// included here, instead of forward declared, so that clients
1.29 +// dont delete an incomplete class.
1.30 +#include <mvpbkcontactlinkarray.h>
1.31 +
1.32 +class MVPbkContactStore;
1.33 +
1.34 +/**
1.35 + * An observer interface for finding contacts from the stores.
1.36 + * This interface is used to signal find clients of the
1.37 + * operations progress.
1.38 + */
1.39 +class MVPbkContactFindFromStoresObserver
1.40 + {
1.41 + public: // Interface
1.42 + /**
1.43 + * This is called when one store completes its find. If this
1.44 + * leaves then FindFromStoreFailed is called. Client takes
1.45 + * the ownership of all results immediately!
1.46 + *
1.47 + * FindFromStoresOperationComplete is called after
1.48 + * all stores have called either this or FindFromStoreFailed.
1.49 + *
1.50 + * @param aStore The store whose find results are available
1.51 + * @param aResultsFromStore The find results from the store.
1.52 + * Client takes the ownership immediately!
1.53 + */
1.54 + virtual void FindFromStoreSucceededL( MVPbkContactStore& aStore,
1.55 + MVPbkContactLinkArray* aResultsFromStore ) = 0;
1.56 +
1.57 + /**
1.58 + * Called when a find operation of one store fails. Doesn't stop
1.59 + * the find from other stores in the case there are multiple stores.
1.60 + *
1.61 + * @param aStore The failed store.
1.62 + * @param aError A system wide error code from the
1.63 + * store implementation.
1.64 + */
1.65 + virtual void FindFromStoreFailed(
1.66 + MVPbkContactStore& aStore, TInt aError ) = 0;
1.67 +
1.68 + /**
1.69 + * This is called after all stores have called either
1.70 + * FindFromStoreSucceed or FindFromStoreFailed. It's called
1.71 + * also when there are no stores that offer find operation.
1.72 + */
1.73 + virtual void FindFromStoresOperationComplete() = 0;
1.74 +
1.75 + /**
1.76 + * Returns an extension point for this interface or NULL.
1.77 + * @param aExtensionUid Uid of extension.
1.78 + * @return Extension point or NULL.
1.79 + */
1.80 + virtual TAny* ContactFindFromStoresObserverExtension(
1.81 + TUid /*aExtensionUid*/) { return NULL; }
1.82 +
1.83 + protected:
1.84 + /**
1.85 + * Destructor.
1.86 + */
1.87 + virtual ~MVPbkContactFindFromStoresObserver() {}
1.88 +
1.89 + };
1.90 +
1.91 +#endif // MVPBKCONTACTFINDFROMSTORESOBSERVER_H
1.92 +
1.93 +// End of File