epoc32/include/mw/http/framework/rheaderfield.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/http/framework/rheaderfield.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 
    18 /**
    19  @file RHeaderField.h
    20  @warning : This file contains Rose Model ID comments - please do not delete
    21 */
    22 
    23 #ifndef __RHEADERFIELD_H__
    24 #define __RHEADERFIELD_H__
    25 
    26 // System includes
    27 #include <e32base.h>
    28 #include <http/thttphdrval.h>
    29 #include <http/rhttppropertyset.h>
    30 #include <http/rhttpheaders.h>
    31 
    32 // Forward declarations
    33 class CHeaderField;
    34 class THeaderFieldPartIter;
    35 
    36 
    37 /**
    38 The default chunk size for Raw data should be set to the average length of a header field when encoded in
    39 plaintext.
    40 @publishedAll
    41 @released
    42 */
    43 const TInt KDefaultRawChunkSize= 32;
    44 
    45 
    46 //##ModelId=3B1E52A50396
    47 class RHeaderField
    48 /**
    49 An proxy object for a single field in an HTTP header.  The class is used by
    50 implementations of CHeaderCodec in order to manipulate the header at the part and
    51 parameter level, or to obtain raw data, during a header encode/decode operation.
    52 @publishedAll
    53 @released
    54 */
    55 	{
    56 public: // methods
    57 
    58 	//##ModelId=3BA6004002BC
    59 	RHeaderField(CHeaderField& aHeaderField);
    60 
    61 	IMPORT_C
    62 	//##ModelId=3B1E52A503C0
    63 	RStringF Name() const;
    64 
    65 	IMPORT_C
    66 	//##ModelId=3B1E52A503BF
    67 	THeaderFieldPartIter PartsL();
    68 
    69 	IMPORT_C
    70 	//##ModelId=3B1E52A503B9
    71 	void RawDataL(TPtrC8& aRawData);
    72 
    73 	IMPORT_C
    74 	//##ModelId=3BA6004002B2
    75 	RHTTPHeaders Collection();
    76 
    77 	IMPORT_C
    78 	//##ModelId=3B1E52A503B6
    79 	void SetPartL(CHeaderFieldPart* aPart, TInt aIndex);
    80 
    81 	IMPORT_C
    82 	//##ModelId=3B1E52A503B4
    83 	void BeginRawDataL(TInt aChunkSize = KDefaultRawChunkSize);
    84 
    85 	IMPORT_C
    86 	//##ModelId=3B1E52A503AB
    87 	void WriteRawDataL(const TDesC8& aData);
    88 
    89 	IMPORT_C
    90 	//##ModelId=3B1E52A503AD
    91 	void WriteRawDataL(TChar aData);
    92 
    93 	IMPORT_C
    94 	//##ModelId=3B1E52A503AA
    95 	void CommitRawData();
    96 
    97 private: // attributes
    98 
    99 	/** The internal representation of this header field
   100 	*/
   101 	//##ModelId=3B1E52A503A2
   102 	CHeaderField& iHeaderField;
   103 };
   104 
   105 inline RHeaderField::RHeaderField(CHeaderField& aHeaderField)
   106 	: iHeaderField(aHeaderField)
   107 	{
   108 	}
   109 
   110 #endif // __CHEADERFIELD_H__