ncdengine/provider/server/inc/ncdoperationobserver.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_NCD_OPERATION_OBSERVER_H
       
    20 #define M_NCD_OPERATION_OBSERVER_H
       
    21 
       
    22 #include <e32cmn.h>
       
    23 
       
    24 class CNcdBaseOperation;
       
    25 class CNcdQuery;
       
    26 class CNcdExpiredNode;
       
    27 
       
    28 /**
       
    29  *  Server side observer interface for operations.
       
    30  *
       
    31  *  This interface offers child operations a way to inform their parent
       
    32  *  operations of progress and completion events. It is also used 
       
    33  *  to pass querys and expiration info to proxy side as sub-ops don't
       
    34  *  usually have proxys.
       
    35  *
       
    36  *  @since S60 v3.2
       
    37  */
       
    38 class MNcdOperationObserver
       
    39     {
       
    40     
       
    41 public:
       
    42 
       
    43     /**
       
    44      * Called when progress is made in the sub-op. 
       
    45      * Should be used only if the parent really needs the progress information
       
    46      * for e.g. forwarding it to the proxy.
       
    47      *
       
    48      * @param aOperation The calling sub-op.
       
    49      */
       
    50     virtual void Progress( CNcdBaseOperation& aOperation ) = 0;
       
    51     
       
    52     /**
       
    53      * Called when sub-op has received a query.
       
    54      *
       
    55      * @param aOperation The calling sub-op.
       
    56      * @param aQuery The query to forward.
       
    57      */
       
    58     virtual void QueryReceived( CNcdBaseOperation& aOperation,
       
    59                                 CNcdQuery* aQuery ) = 0;
       
    60 
       
    61     /**
       
    62      * Called when a sub-operation has been completed.
       
    63      *
       
    64      * @param aOperation The calling sub-op.
       
    65      * @param aOperation aError KErrNone if completed correctly otherwise
       
    66      *        system-wide error code.
       
    67      */
       
    68     virtual void OperationComplete( CNcdBaseOperation* aOperation,
       
    69                                     TInt aError ) = 0;
       
    70                                     
       
    71     /**
       
    72      * Called when a sub-op has expired nodes.
       
    73      *
       
    74      * @param aOperation The calling sub-op.
       
    75      * @param aOperation Expired nodes.
       
    76      */
       
    77     virtual void ExpirationInfoReceived( CNcdBaseOperation* aOperation,
       
    78         RPointerArray<CNcdExpiredNode>& aExpiredNodes ) = 0;
       
    79     };
       
    80     
       
    81 #endif //  M_NCD_OPERATION_OBSERVER_H