epoc32/include/app/MVPbkSingleContactLinkOperationObserver.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 link
    15 *                operations
    16 *
    17 */
    18 
    19 
    20 #ifndef MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
    21 #define MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
    22 
    23 // INCLUDES
    24 #include <e32cmn.h>
    25 
    26 // FORWARD DECLARATIONS
    27 class MVPbkContactOperationBase;
    28 class MVPbkContactLink;
    29 
    30 // CLASS DECLARATIONS
    31 
    32 /**
    33  * An observer interface for asynchronous single contact link operations.
    34  * 
    35  * The interface is used in asynchronous operations that are related
    36  * to one contact link.
    37  */
    38 class MVPbkSingleContactLinkOperationObserver
    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 aLink    The contact link returned by the operation.
    51          *                 A client must take the ownership immediately.
    52          *
    53          *                  NOTE:
    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).
    59          */
    60         virtual void VPbkSingleContactLinkOperationComplete(
    61                 MVPbkContactOperationBase& aOperation,
    62                 MVPbkContactLink* aLink ) = 0;
    63 
    64         /**
    65          * Called if the operation fails.
    66          *
    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.
    71          *
    72          * @param aOperation The failed operation.
    73          * @param aError An error code of the failure.
    74          */
    75         virtual void VPbkSingleContactLinkOperationFailed(
    76                 MVPbkContactOperationBase& aOperation, 
    77                 TInt aError ) = 0;
    78 
    79         /**
    80          * Returns an extension point for this interface or NULL.
    81          *
    82          * @param aExtensionUid no extensions defined currently.
    83          * @return An extension point for this interface or NULL.
    84          */
    85         virtual TAny* SingleContactLinkOperationObserverExtension( 
    86                 TUid /*aExtensionUid*/ ) { return NULL; }
    87 
    88     protected:  // Destructor
    89         virtual ~MVPbkSingleContactLinkOperationObserver() { }
    90 
    91     };
    92 
    93 #endif // MVPBKSINGLECONTACTLINKOPERATIONOBSERVER_H
    94 
    95 //End of file
    96