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