epoc32/include/app/MVPbkSingleContactOperationObserver.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  An observer interface for asynchronous single contact 
    15 *                operations
    16 *
    17 */
    18 
    19 
    20 #ifndef MVPBKSINGLECONTACTOPERATIONOBSERVER_H
    21 #define MVPBKSINGLECONTACTOPERATIONOBSERVER_H
    22 
    23 // INCLUDES
    24 #include <e32cmn.h>
    25 
    26 // FORWARD DECLARATIONS
    27 class MVPbkContactOperationBase;
    28 class MVPbkStoreContact;
    29 
    30 // CLASS DECLARATIONS
    31 
    32 /**
    33  * An observer interface for asynchronous single contact operations.
    34  * 
    35  * The interface is used in asynchronous operations that are related
    36  * to one contact.
    37  */
    38 class MVPbkSingleContactOperationObserver
    39     {
    40     public:  // Interface
    41         /**
    42          * Called when the operation is completed.
    43          *
    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.
    48          *
    49          * @param aOperation The completed operation.
    50          * @param aContact The contact returned by the operation.
    51          *                 A client must take the ownership immediately.
    52          *
    53          *                  NOTE:
    54          *                  If you use CleanupStack for MVPbkStoreContact
    55          *                  Use MVPbkStoreContact::PushL or
    56          *                  CleanupDeletePushL from e32base.h.
    57          *                  (Do Not Use CleanupStack::PushL(TAny*) because
    58          *                  then the virtual destructor of the M-class
    59          *                  won't be called when the object is deleted).
    60          */
    61         virtual void VPbkSingleContactOperationComplete(
    62                 MVPbkContactOperationBase& aOperation,
    63                 MVPbkStoreContact* aContact ) = 0;
    64 
    65         /**
    66          * Called if the operation fails.
    67          *
    68          * A client has the operation as a member and it can delete the operation
    69          * instance in this function call. If the implementation of the store
    70          * calls the function from the operation instance it must not handle
    71          * any member data after calling it.
    72          *
    73          * @param aOperation The failed operation.
    74          * @param aError An error code of the failure.
    75          */
    76         virtual void VPbkSingleContactOperationFailed(
    77                 MVPbkContactOperationBase& aOperation, 
    78                 TInt aError ) = 0;
    79 
    80         /**
    81          * Returns an extension point for this interface or NULL.
    82          *
    83          * @param aExtensionUid no extensions defined currently.
    84          * @return An extension point for this interface or NULL.
    85          */
    86         virtual TAny* SingleContactOperationObserverExtension( 
    87                 TUid /*aExtensionUid*/ ) { return NULL; }
    88 
    89     protected:  // Destructor
    90         virtual ~MVPbkSingleContactOperationObserver() { }
    91 
    92     };
    93 
    94 #endif // MVPBKSINGLECONTACTOPERATIONOBSERVER_H
    95 
    96 //End of file
    97