epoc32/include/http/rhttpmessage.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/http/rhttpmessage.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/http/rhttpmessage.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,93 @@
     1.4 -rhttpmessage.h
     1.5 +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file RHTTPMessage.h
    1.24 + @warning : This file contains Rose Model ID comments - please do not delete
    1.25 +*/
    1.26 +
    1.27 +#ifndef __RHTTPMESSAGE_H__
    1.28 +#define __RHTTPMESSAGE_H__
    1.29 +
    1.30 +// Forward declarations
    1.31 +class RHTTPHeaders;
    1.32 +class MHTTPDataSupplier;
    1.33 +class CMessage;
    1.34 +
    1.35 +
    1.36 +//##ModelId=3A375D1F0377
    1.37 +class RHTTPMessage 
    1.38 +/** 
    1.39 +An abstract HTTP message. In RFC2616, an HTTP message is defined as having a
    1.40 +header and an optional body.  This class is specialised for HTTP requests and
    1.41 +responses.
    1.42 +@publishedAll
    1.43 +@released
    1.44 +*/
    1.45 +	{
    1.46 + public:
    1.47 +	/// Default (uninitialised) constructor.
    1.48 +	//##ModelId=3A375DD60140
    1.49 +	inline RHTTPMessage();
    1.50 +
    1.51 +	/** Returns the header collection for the message */
    1.52 +	//##ModelId=3A375DDE0368
    1.53 +	IMPORT_C RHTTPHeaders GetHeaderCollection();
    1.54 +
    1.55 +	/** Sets the messages body, replacing any existing body. The body
    1.56 +        is supplied as a MHTTPDataSupplier, which will then return the
    1.57 +        data in 1 or more chunks on request.  
    1.58 +		@param aBody The data supplier that will supply the body.  */
    1.59 +	//##ModelId=3A375DE0019E
    1.60 +	IMPORT_C void SetBody(MHTTPDataSupplier& aBody);
    1.61 +
    1.62 +	/** Removes the body */
    1.63 +	//##ModelId=3B1E66FF004E
    1.64 +	IMPORT_C void RemoveBody();
    1.65 +
    1.66 +	/** Determine whether this message has any associated body data.
    1.67 +		@return ETrue if there is some body data, EFalse if not.
    1.68 +	*/
    1.69 +	//##ModelId=3A914DFF01E5
    1.70 +	IMPORT_C TBool HasBody() const;
    1.71 +
    1.72 +	/** Gets the body. The body is supplied as a MHTTPDataSupplier,
    1.73 +        which can be used to return the current data chunk, and to
    1.74 +        acknowledge when that chunk has been consumed by the client.
    1.75 +
    1.76 +		Note that the client can assume the body object will remain
    1.77 +		unchanged from when it receives the first data until the end
    1.78 +		of the transaction.
    1.79 +
    1.80 +		@return A data supplier that provides access to a body
    1.81 +		data chunk. NULL if the body has not been set, or has been removed */
    1.82 +	//##ModelId=3A375DE40190
    1.83 +	IMPORT_C MHTTPDataSupplier* Body() const;
    1.84 +
    1.85 + protected:
    1.86 +	//##ModelId=3A914DFF01C7
    1.87 +	CMessage* iImplementation;
    1.88 +};
    1.89 +
    1.90 +
    1.91 +inline RHTTPMessage::RHTTPMessage()
    1.92 +		: iImplementation(NULL)
    1.93 +	{
    1.94 +	};
    1.95 +
    1.96 +
    1.97 +#endif // __RHTTPMESSAGE_H__