williamr@2: /*
williamr@2: * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2: * All rights reserved.
williamr@2: * This component and the accompanying materials are made available
williamr@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2: * which accompanies this distribution, and is available
williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2: *
williamr@2: * Initial Contributors:
williamr@2: * Nokia Corporation - initial contribution.
williamr@2: *
williamr@2: * Contributors:
williamr@2: *
williamr@2: * Description: Hostlet response call back interface        
williamr@2: *
williamr@2: */
williamr@2: 
williamr@2: 
williamr@2: #ifndef MSEN_HOSTLET_RESPONSE_H
williamr@2: #define MSEN_HOSTLET_RESPONSE_H
williamr@2: 
williamr@2: #include <e32base.h>
williamr@2: 
williamr@2: // FORWARD DECLARE
williamr@2: class MSenProperties;
williamr@2: class MSenMessage;
williamr@2: 
williamr@2: 
williamr@2: class MSenHostletResponse
williamr@2:     {
williamr@2:     public:
williamr@2:         /**
williamr@2:         *  Set the response
williamr@2:         * @param aResponseUtf8 is the response that this hostlet is providing
williamr@2:         * @param aCode can be set to error code, in case that request is not
williamr@2:         * accepted by this hostlet.
williamr@2:         * @param aResponseProperties may be provided in order to pass (transport)
williamr@2:         * properties with the response.
williamr@2:         * @param aResponseMessage may be provided in order to pass concrete
williamr@2:         * message object with the response (like libxml2 based SOAP-ENV,
williamr@2:         * CSenSoapEnvelope2)
williamr@2:         */
williamr@2:         virtual void SetResponseUtf8L(const TDesC8& aResponseUtf8, 
williamr@2:                                       const TInt aResponseCode = KErrNone, 
williamr@2:                                       MSenProperties* aResponseProperties = NULL,
williamr@2:                                       MSenMessage* apMessage = NULL) = 0;
williamr@2:         
williamr@2:         /**
williamr@2:         * Getter for request (transaction) ID
williamr@2:         * @return the id of the request to which this is a response for
williamr@2:         */ 
williamr@2:         virtual TInt RequestId() const = 0;
williamr@2:         
williamr@2:         /**
williamr@2:         * Getter for response data
williamr@2:         * @return the set response as UTF-8 descriptor
williamr@2:         */
williamr@2:         virtual TPtrC8 ResponseUtf8() = 0;
williamr@2: 
williamr@2:         /**
williamr@2:         * Getter for response code
williamr@2:         * @return the response code (KErrNone or some error) that hostlet has provided
williamr@2:         */
williamr@2:         virtual TInt ResponseCode() const = 0;
williamr@2:         
williamr@2:         /**
williamr@2:         * Getter for response properties
williamr@2:         */
williamr@2:         virtual MSenProperties* ResponseProperties() = 0;
williamr@2:     };
williamr@2: 
williamr@2: #endif // MSEN_HOSTLET_RESPONSE_H