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