ncdengine/inc/ncdpurchaseoperationobserver.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 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:   ?Description
       
    15 *
       
    16 */
       
    17 	
       
    18 
       
    19 #ifndef M_NCDPURCHASEOPERATIONOBSERVER_H
       
    20 #define M_NCDPURCHASEOPERATIONOBSERVER_H
       
    21 
       
    22 #include <e32cmn.h>
       
    23 
       
    24 #include "catalogsarray.h"
       
    25 
       
    26 class MNcdPurchaseOperation;
       
    27 class TNcdProgress;
       
    28 class MNcdQuery;
       
    29 
       
    30 /**
       
    31  *  Observer interface for purchase operations
       
    32  *
       
    33  *  Purchase operation users should implement this interface to be able to
       
    34  *  receive purchase operation callbacks.
       
    35  *
       
    36  *  
       
    37  *  @see MNcdPurchaseOperation
       
    38  */
       
    39 class MNcdPurchaseOperationObserver
       
    40     {
       
    41     
       
    42 public:
       
    43 
       
    44     /**
       
    45      * Called when a purchase operation has progressed.
       
    46      *
       
    47      * 
       
    48      * @param aOperation The operation that sent the event.
       
    49      * @param aProgress Progress of the operation.
       
    50      */
       
    51     virtual void PurchaseProgress( MNcdPurchaseOperation& aOperation,
       
    52         TNcdProgress aProgress ) = 0;
       
    53 
       
    54 
       
    55     /**
       
    56      * Called when a query has been received for an operation.
       
    57      *
       
    58      * @note Querys need to be completed with MNcdOperation::CompleteQueryL()
       
    59      *       to continue the operation! Alternatively, the operation must be
       
    60      *       cancelled.
       
    61      *
       
    62      * 
       
    63      * @param aOperation Uncounted reference to the operation that sent
       
    64      *        the event.
       
    65      * @param aQuery Pointer to the query object that needs to be
       
    66      *        completed. Counted, Release() must be called after use.
       
    67      * @see MNcdOperation::CompleteQueryL()
       
    68      */
       
    69     virtual void QueryReceived( MNcdPurchaseOperation& aOperation,
       
    70         MNcdQuery* aQuery ) = 0;
       
    71     
       
    72 
       
    73     /**
       
    74      * Called when an operation has been completed.
       
    75      *
       
    76      * 
       
    77      * @param aOperation The operation that sent the event.
       
    78      * @param aError Error code for operation completion. 
       
    79      *               KErrNone for successful completion, otherwise a system
       
    80      *               wide error code.
       
    81      */
       
    82     virtual void OperationComplete( MNcdPurchaseOperation& aOperation,
       
    83         TInt aError ) = 0;
       
    84     };
       
    85     
       
    86 #endif //  M_NCDPURCHASEOPERATIONOBSERVER_H