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 batch operations.
20 #ifndef MVPBKBATCHOPERATIONOBSERVER_H
21 #define MVPBKBATCHOPERATIONOBSERVER_H
26 // FORWARD DECLARATIONS
27 class MVPbkContactOperationBase;
28 class MVPbkStoreContact;
33 * Virtual Phonebook asynchronous multi contact operation observer interface.
34 * This observer interface is used to signal the client during a
35 * batch operation, which involves operations to e.g. multiple contacts.
36 * The client is signaled during the operations steps and then signaled
37 * of the completion of the whole operation.
39 class MVPbkBatchOperationObserver
43 * Called when one step of the operation is completed.
45 * @param aOperation Operation whose step has completed
46 * @param aStepSize Size of the performed step
48 virtual void StepComplete(
49 MVPbkContactOperationBase& aOperation,
53 * Called when one step of the operation fails.
55 * @param aOperation Operation whose step has failed
56 * @param aStepSize Size of the performed step
57 * @param aError Error that occured
58 * @return ETrue if the batch operation should continue,
60 * NOTE! If returning ETrue the operation can NOT be deleted.
61 * Operation should be deleted in OperationCompleted()
63 * If returning EFalse the operation can be deleted
66 virtual TBool StepFailed(
67 MVPbkContactOperationBase& aOperation,
68 TInt aStepSize, TInt aError ) = 0;
71 * Called when operation is completed.
72 * This is called when all steps are executed. If EFalse is returned
73 * in StepFailed() call this function is NOT called.
75 * @param aOperation the completed operation
77 virtual void OperationComplete(
78 MVPbkContactOperationBase& aOperation ) = 0;
81 * Returns an extension point for this interface or NULL.
82 * @param aExtensionUid Uid of extension
83 * @return Extension point or NULL
85 virtual TAny* BatchOperationObserverExtension(
86 TUid /*aExtensionUid*/ ) { return NULL; }
88 protected: // Destructor
92 virtual ~MVPbkBatchOperationObserver() { }
96 #endif // MVPBKBATCHOPERATIONOBSERVER_H