servicediscoveryandcontrol/pnp/test/upnp/upnpmessage/inc/CMessage.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 // Copyright (c) 2008-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 #ifndef __CMESSAGE_H__
       
    17 #define __CMESSAGE_H__
       
    18 
       
    19 // System includes
       
    20 #include <e32base.h>
       
    21 #include <http/mhttpdatasupplier.h>
       
    22 #include <http/framework/cheadercodec.h>
       
    23 #include <es_mbuf.h>
       
    24 #include <comms-infras/mbufchain.h>
       
    25 
       
    26 // Local includes
       
    27 #include "CHeaders.h"
       
    28 #include "rhttpheaders.h"
       
    29 
       
    30 /** Abstract base class for implementation of HTTP requests and responses
       
    31 */
       
    32 class CMessage : public CBase
       
    33 	{
       
    34 public:
       
    35 	/** Destructor.
       
    36 		(NB Although this method has an implementation - this class must be abstract)
       
    37 	*/
       
    38 	~CMessage() = 0;
       
    39 	
       
    40 	/** Specify the body data supplier for this HTTP message.
       
    41 		@see RHTTPMessage::AddBody
       
    42 	*/
       
    43 	inline void AddBody(MHTTPDataSupplier* aBody);
       
    44 
       
    45 	/** Determine whether this HTTP message has a body or not.
       
    46 		@see RHTTPMessage::HasBody
       
    47 	*/
       
    48 	inline TBool HasBody() const;
       
    49 
       
    50 	/** Obtain this HTTP message's body data supplier.
       
    51 		@see RHTTPMessage::GetBody
       
    52 	*/
       
    53 	inline MHTTPDataSupplier* Body() const;
       
    54 	
       
    55 protected:
       
    56 
       
    57 	/** Does base class 2 phase construction
       
    58 	*/
       
    59 	inline void ConstructL(CHeaderCodec& aCodec);
       
    60 
       
    61 private:
       
    62 
       
    63 	CHeaders* 				iHeaders;
       
    64 	MHTTPDataSupplier* 		iDataSupplier;
       
    65 	
       
    66 	friend class RUPnPMessage;
       
    67 	friend class RRequest;
       
    68 	friend class RResponse;
       
    69 	};
       
    70 
       
    71 #include "CMessage.inl"
       
    72 
       
    73 
       
    74 #endif // __CMESSAGE_H__