epoc32/include/mw/http/rhttpmessage.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @warning : This file contains Rose Model ID comments - please do not delete
    19 */
    20 
    21 #ifndef __RHTTPMESSAGE_H__
    22 #define __RHTTPMESSAGE_H__
    23 
    24 // Forward declarations
    25 class RHTTPHeaders;
    26 class MHTTPDataSupplier;
    27 class CMessage;
    28 
    29 
    30 //##ModelId=3A375D1F0377
    31 class RHTTPMessage 
    32 /** 
    33 An abstract HTTP message. In RFC2616, an HTTP message is defined as having a
    34 header and an optional body.  This class is specialised for HTTP requests and
    35 responses.
    36 @publishedAll
    37 @released
    38 */
    39 	{
    40  public:
    41 	// Default (uninitialised) constructor.
    42 	//##ModelId=3A375DD60140
    43 	inline RHTTPMessage();
    44 
    45 	/** Returns the header collection for the message */
    46 	//##ModelId=3A375DDE0368
    47 	IMPORT_C RHTTPHeaders GetHeaderCollection();
    48 
    49 	/** Sets the messages body, replacing any existing body. The body
    50         is supplied as a MHTTPDataSupplier, which will then return the
    51         data in 1 or more chunks on request.  
    52 		@param aBody The data supplier that will supply the body.  */
    53 	//##ModelId=3A375DE0019E
    54 	IMPORT_C void SetBody(MHTTPDataSupplier& aBody);
    55 
    56 	/** Removes the body */
    57 	//##ModelId=3B1E66FF004E
    58 	IMPORT_C void RemoveBody();
    59 
    60 	/** Determine whether this message has any associated body data.
    61 		@return ETrue if there is some body data, EFalse if not.
    62 	*/
    63 	//##ModelId=3A914DFF01E5
    64 	IMPORT_C TBool HasBody() const;
    65 
    66 	/** Gets the body. The body is supplied as a MHTTPDataSupplier,
    67         which can be used to return the current data chunk, and to
    68         acknowledge when that chunk has been consumed by the client.
    69 
    70 		Note that the client can assume the body object will remain
    71 		unchanged from when it receives the first data until the end
    72 		of the transaction.
    73 
    74 		@return A data supplier that provides access to a body
    75 		data chunk. NULL if the body has not been set, or has been removed */
    76 	//##ModelId=3A375DE40190
    77 	IMPORT_C MHTTPDataSupplier* Body() const;
    78 
    79  protected:
    80 	//##ModelId=3A914DFF01C7
    81 	CMessage* iImplementation;
    82 };
    83 
    84 
    85 inline RHTTPMessage::RHTTPMessage()
    86 		: iImplementation(NULL)
    87 	{
    88 	};
    89 
    90 
    91 #endif // __RHTTPMESSAGE_H__