2 * Copyright (c) 2005-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: Observer interfaces for asynchronous operations
19 #ifndef VPBKOPERATIONOBSERVER_H
20 #define VPBKOPERATIONOBSERVER_H
25 class MVPbkContactOperationBase;
29 * An observer for asynchronous operations that do not return anything.
31 class MVPbkOperationObserver
36 * The operation was completed succesfully.
38 * @param aOperation operation handle
40 virtual void VPbkOperationCompleted(
41 MVPbkContactOperationBase* aOperation ) = 0;
44 /* Destroying via this interface is not allowed */
45 ~MVPbkOperationObserver(){}
49 * An observer for asynchronous operations
50 * that return result of ResultType type.
52 template<typename ResultType>
53 class MVPbkOperationResultObserver
58 * The operation was completed succesfully.
60 * @param aOperation operation handle
61 * @param aOperationResult operation result
63 virtual void VPbkOperationResultCompleted(
64 MVPbkContactOperationBase* aOperation,
65 ResultType aOperationResult ) = 0;
68 /* Destroying via this interface is not allowed */
69 ~MVPbkOperationResultObserver(){}
73 * An observer for asynchronous operations
74 * to receive error notifications when an operation fails.
76 class MVPbkOperationErrorObserver
81 * An error occured in the operation that was requested.
83 * @param aOperation operation handle
84 * @param aError Operation error code.
86 virtual void VPbkOperationFailed(
87 MVPbkContactOperationBase* aOperation,
91 /* Destroying via this interface is not allowed */
92 ~MVPbkOperationErrorObserver(){}
95 #endif //VPBKOPERATIONOBSERVER_H