epoc32/include/app/MVPbkBatchOperationObserver.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) 2002-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:  Virtual Phonebook observer interface for batch operations.
    15 *
    16 */
    17 
    18 
    19 
    20 #ifndef MVPBKBATCHOPERATIONOBSERVER_H
    21 #define MVPBKBATCHOPERATIONOBSERVER_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  * Virtual Phonebook asynchronous multi contact operation observer interface.
    34  * This observer interface is used to signal the client during a 
    35  * batch operation, which involves operations to e.g. multiple contacts.
    36  * The client is signaled during the operations steps and then signaled
    37  * of the completion of the whole operation.
    38  */
    39 class MVPbkBatchOperationObserver
    40     {
    41     public:  // Interface
    42         /**
    43          * Called when one step of the operation is completed.
    44          *
    45          * @param aOperation Operation whose step has completed
    46          * @param aStepSize Size of the performed step
    47          */
    48         virtual void StepComplete( 
    49                 MVPbkContactOperationBase& aOperation,
    50                 TInt aStepSize ) = 0;
    51 
    52         /**
    53          * Called when one step of the operation fails.
    54          *
    55          * @param aOperation Operation whose step has failed
    56          * @param aStepSize Size of the performed step
    57          * @param aError Error that occured
    58          * @return ETrue if the batch operation should continue, 
    59          *               EFalse otherwise
    60          *         NOTE! If returning ETrue the operation can NOT be deleted.
    61          *               Operation should be deleted in OperationCompleted() 
    62          *               function.
    63          *               If returning EFalse the operation can be deleted
    64          *               safely.
    65          */
    66         virtual TBool StepFailed(
    67                 MVPbkContactOperationBase& aOperation,
    68                 TInt aStepSize, TInt aError ) = 0;
    69 
    70         /**
    71          * Called when operation is completed.
    72          * This is called when all steps are executed. If EFalse is returned
    73          * in StepFailed() call this function is NOT called.
    74          *
    75          * @param aOperation    the completed operation
    76          */
    77         virtual void OperationComplete( 
    78                 MVPbkContactOperationBase& aOperation ) = 0;
    79 
    80         /**
    81          * Returns an extension point for this interface or NULL.
    82          * @param aExtensionUid Uid of extension
    83          * @return Extension point or NULL
    84          */
    85         virtual TAny* BatchOperationObserverExtension( 
    86                 TUid /*aExtensionUid*/ ) { return NULL; }
    87 
    88     protected:  // Destructor
    89         /**
    90          * Destructor.
    91          */
    92         virtual ~MVPbkBatchOperationObserver() { }
    93 
    94     };
    95 
    96 #endif // MVPBKBATCHOPERATIONOBSERVER_H
    97 
    98 // End of file