1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/app/MVPbkSingleContactLinkOperationObserver.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,96 @@
1.4 +/*
1.5 +* Copyright (c) 2004-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: An observer interface for asynchronous single contact link
1.18 +* operations
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
1.24 +#define MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
1.25 +
1.26 +// INCLUDES
1.27 +#include <e32cmn.h>
1.28 +
1.29 +// FORWARD DECLARATIONS
1.30 +class MVPbkContactOperationBase;
1.31 +class MVPbkContactLink;
1.32 +
1.33 +// CLASS DECLARATIONS
1.34 +
1.35 +/**
1.36 + * An observer interface for asynchronous single contact link operations.
1.37 + *
1.38 + * The interface is used in asynchronous operations that are related
1.39 + * to one contact link.
1.40 + */
1.41 +class MVPbkSingleContactLinkOperationObserver
1.42 + {
1.43 + public: // Interface
1.44 + /**
1.45 + * Called when the operation is completed.
1.46 + *
1.47 + * A client has the operation as a member and it can delete the operation
1.48 + * instance in this function call. If the implementation of the store
1.49 + * calls the function from the operation instance it must not handle
1.50 + * any member data after calling it.
1.51 + *
1.52 + * @param aOperation The completed operation.
1.53 + * @param aLink The contact link returned by the operation.
1.54 + * A client must take the ownership immediately.
1.55 + *
1.56 + * NOTE:
1.57 + * If you use CleanupStack for MVPbkContactLink
1.58 + * Use CleanupDeletePushL from e32base.h.
1.59 + * (Do Not Use CleanupStack::PushL(TAny*) because
1.60 + * then the virtual destructor of the M-class
1.61 + * won't be called when the object is deleted).
1.62 + */
1.63 + virtual void VPbkSingleContactLinkOperationComplete(
1.64 + MVPbkContactOperationBase& aOperation,
1.65 + MVPbkContactLink* aLink ) = 0;
1.66 +
1.67 + /**
1.68 + * Called if the operation fails.
1.69 + *
1.70 + * A client has the operation as a member and it can delete the operation
1.71 + * instance in this function call. If the implementation of the store
1.72 + * calls the function from the operation instance it must not handle
1.73 + * any member data after calling it.
1.74 + *
1.75 + * @param aOperation The failed operation.
1.76 + * @param aError An error code of the failure.
1.77 + */
1.78 + virtual void VPbkSingleContactLinkOperationFailed(
1.79 + MVPbkContactOperationBase& aOperation,
1.80 + TInt aError ) = 0;
1.81 +
1.82 + /**
1.83 + * Returns an extension point for this interface or NULL.
1.84 + *
1.85 + * @param aExtensionUid no extensions defined currently.
1.86 + * @return An extension point for this interface or NULL.
1.87 + */
1.88 + virtual TAny* SingleContactLinkOperationObserverExtension(
1.89 + TUid /*aExtensionUid*/ ) { return NULL; }
1.90 +
1.91 + protected: // Destructor
1.92 + virtual ~MVPbkSingleContactLinkOperationObserver() { }
1.93 +
1.94 + };
1.95 +
1.96 +#endif // MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
1.97 +
1.98 +//End of file
1.99 +