2 * Copyright (c) 2004-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: An observer interface for asynchronous single contact link
20 #ifndef MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
21 #define MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
26 // FORWARD DECLARATIONS
27 class MVPbkContactOperationBase;
28 class MVPbkContactLink;
33 * An observer interface for asynchronous single contact link operations.
35 * The interface is used in asynchronous operations that are related
36 * to one contact link.
38 class MVPbkSingleContactLinkOperationObserver
42 * Called when the operation is completed.
44 * A client has the operation as a member and it can delete the operation
45 * instance in this function call. If the implementation of the store
46 * calls the function from the operation instance it must not handle
47 * any member data after calling it.
49 * @param aOperation The completed operation.
50 * @param aLink The contact link returned by the operation.
51 * A client must take the ownership immediately.
54 * If you use CleanupStack for MVPbkContactLink
55 * Use CleanupDeletePushL from e32base.h.
56 * (Do Not Use CleanupStack::PushL(TAny*) because
57 * then the virtual destructor of the M-class
58 * won't be called when the object is deleted).
60 virtual void VPbkSingleContactLinkOperationComplete(
61 MVPbkContactOperationBase& aOperation,
62 MVPbkContactLink* aLink ) = 0;
65 * Called if the operation fails.
67 * A client has the operation as a member and it can delete the operation
68 * instance in this function call. If the implementation of the store
69 * calls the function from the operation instance it must not handle
70 * any member data after calling it.
72 * @param aOperation The failed operation.
73 * @param aError An error code of the failure.
75 virtual void VPbkSingleContactLinkOperationFailed(
76 MVPbkContactOperationBase& aOperation,
80 * Returns an extension point for this interface or NULL.
82 * @param aExtensionUid no extensions defined currently.
83 * @return An extension point for this interface or NULL.
85 virtual TAny* SingleContactLinkOperationObserverExtension(
86 TUid /*aExtensionUid*/ ) { return NULL; }
88 protected: // Destructor
89 virtual ~MVPbkSingleContactLinkOperationObserver() { }
93 #endif // MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H