webservices/wshttpchanneltransportplugin/inc/senresponseobserver.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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 interface class for receiving responses to the HTTP
       
    15 *                requests submitted.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 
       
    29 #ifndef SEN_RESPONSE_OBSERVER_H
       
    30 #define SEN_RESPONSE_OBSERVER_H
       
    31 
       
    32 #include "SenHttpTransportProperties.h"
       
    33 #include "SenServiceConnection.h"
       
    34 _LIT8(KDefaultContentType,              "text/xml; charset=UTF-8");
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40  * An interface class for receiving responses to the HTTP
       
    41  * requests submitted.
       
    42  *
       
    43  */
       
    44 
       
    45 class MSenResponseObserver
       
    46     {
       
    47     public:
       
    48     
       
    49         /**
       
    50          * Receive response to a request submitted. This method
       
    51          * takes the ownership of the heap buffer aContent.
       
    52          *
       
    53          * @param aId submit id which identifies the request.
       
    54          * @param aContentType incoming response content type.
       
    55          * @param aContent incoming response content.
       
    56          * @param aHttpProperties - properies of response(e.g.such as file names where BLOBs are saved) or NULL
       
    57          * @leave if aContent is NULL.
       
    58          */
       
    59         virtual void ResponseReceivedL(TInt aId,
       
    60                                        const TAny* aContentType,
       
    61                                        HBufC8* aContent,
       
    62                                        CSenHttpTransportProperties* aHttpProperties = NULL) = 0;
       
    63     
       
    64         /**
       
    65          * Error occurred while receiving response. Error code
       
    66          * is either system error code or own error code. 
       
    67          *
       
    68          * @param aId submit id which identifies the request.
       
    69          * @param aError error code.
       
    70          */
       
    71         virtual void ResponseErrorL(TInt aId,
       
    72                                    TInt aError,
       
    73                                    HBufC8* aErrorBody,
       
    74                                    CSenHttpTransportProperties* aHttpProperties = NULL) = 0;
       
    75 	    /**
       
    76 	     * State has changed 
       
    77 	     * 
       
    78 	     * @param aId submit id which identifies the request.
       
    79 	     * @param aState New State of the transaction.
       
    80 	     */
       
    81 		virtual void StateChanged(TInt aId, TInt aState) = 0;
       
    82         virtual void FileProgress(TInt aTxnId, TBool aIncoming, TBool aIsSoap,
       
    83                     const TDesC8& aSoapOrCid, TInt aProgress) = 0;
       
    84 		virtual void SetTrafficDetails(TSenDataTrafficDetails& aDetails) = 0; 
       
    85 
       
    86         virtual MSenProperties& PropertiesL() = 0;
       
    87 
       
    88     };
       
    89 
       
    90 
       
    91 
       
    92 #endif // SEN_RESPONSE_OBSERVER_H
       
    93 
       
    94 // End of File