upnp/upnpstack_plat/upnp_utils_api/inc/upnphttpheader.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 /** @file
       
     2 * Copyright (c) 2005-2006 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:  Declares HttpHeader class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CUPPNHTTPHEADER_H
       
    20 #define C_CUPPNHTTPHEADER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 	\brief A HTTPMessage header, which consists of Name-Value-pair.
       
    30 
       
    31 	This is HTTPMessage header name-value pair. HTTPMessage contains a list of these header rows.
       
    32 	*/
       
    33 class CUpnpHttpHeader : public CBase
       
    34 	{
       
    35 
       
    36 public:
       
    37 	/**
       
    38 	Constructor function of HTTPHeader object.
       
    39 	@param aName This is the name part of HTTP Header. 
       
    40 	@param aValue This is the value part of HTTP Header. 
       
    41 	@return A new CUpnpHttpHeader instance.
       
    42 	**/
       
    43 	static CUpnpHttpHeader* NewL(const TDesC8& aName, const TDesC8& aValue);
       
    44 	
       
    45 	/**
       
    46 	Destructor function.
       
    47 	**/
       
    48 	virtual ~CUpnpHttpHeader();
       
    49 
       
    50 	/**
       
    51 	Returns value of HTTPHeader.
       
    52 	@return A value of HTTPHeader.
       
    53 	**/
       
    54 	IMPORT_C TDesC8& Value();
       
    55 
       
    56 	/**
       
    57 	Returns name of HTTPHeader.
       
    58 	@return A name of HTTPHeader.
       
    59 	**/
       
    60 	IMPORT_C TDesC8& Name();
       
    61 	
       
    62 	/**
       
    63 	Set name of HTTPHeader.
       
    64 	@param aName New name for HTTPHeader. 
       
    65 	@return None.
       
    66 	**/
       
    67 	IMPORT_C void SetNameL(const TDesC8& aName);
       
    68 
       
    69 	/**
       
    70 	Set value of HTTPHeader.
       
    71 	@param aValue New value for HTTPHeader.
       
    72 	@return None. 
       
    73 	**/
       
    74 	IMPORT_C void SetValueL(const TDesC8& aValue);
       
    75 	
       
    76 private:
       
    77 
       
    78 	/**
       
    79 	First phase constructor.
       
    80 	**/
       
    81 	CUpnpHttpHeader();
       
    82 
       
    83 	/**
       
    84 	Second phase constructor.
       
    85 	**/
       
    86 	void ConstructL(const TDesC8& aName, const TDesC8& aValue);
       
    87 
       
    88 	/**
       
    89 	Name of header.
       
    90 	**/
       
    91 	HBufC8* iName;
       
    92 
       
    93 	/**
       
    94 	Value of header.
       
    95 	**/
       
    96 	HBufC8* iValue;
       
    97 	};
       
    98 
       
    99 #endif // C_CUPPNHTTPHEADER_H