epoc32/include/mw/http/framework/rheaderfield.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 RHeaderField.h
    18  @warning : This file contains Rose Model ID comments - please do not delete
    19 */
    20 
    21 #ifndef __RHEADERFIELD_H__
    22 #define __RHEADERFIELD_H__
    23 
    24 // System includes
    25 #include <e32base.h>
    26 #include <http/thttphdrval.h>
    27 #include <http/rhttppropertyset.h>
    28 #include <http/rhttpheaders.h>
    29 
    30 // Forward declarations
    31 class CHeaderField;
    32 class THeaderFieldPartIter;
    33 
    34 
    35 /**
    36 The default chunk size for Raw data should be set to the average length of a header field when encoded in
    37 plaintext.
    38 @publishedAll
    39 @released
    40 */
    41 const TInt KDefaultRawChunkSize= 32;
    42 
    43 
    44 //##ModelId=3B1E52A50396
    45 class RHeaderField
    46 /**
    47 An proxy object for a single field in an HTTP header.  The class is used by
    48 implementations of CHeaderCodec in order to manipulate the header at the part and
    49 parameter level, or to obtain raw data, during a header encode/decode operation.
    50 @publishedAll
    51 @released
    52 */
    53 	{
    54 public: // methods
    55 
    56 	//##ModelId=3BA6004002BC
    57 	RHeaderField(CHeaderField& aHeaderField);
    58 
    59 	IMPORT_C
    60 	//##ModelId=3B1E52A503C0
    61 	RStringF Name() const;
    62 
    63 	IMPORT_C
    64 	//##ModelId=3B1E52A503BF
    65 	THeaderFieldPartIter PartsL();
    66 
    67 	IMPORT_C
    68 	//##ModelId=3B1E52A503B9
    69 	void RawDataL(TPtrC8& aRawData);
    70 
    71 	IMPORT_C
    72 	//##ModelId=3BA6004002B2
    73 	RHTTPHeaders Collection();
    74 
    75 	IMPORT_C
    76 	//##ModelId=3B1E52A503B6
    77 	void SetPartL(CHeaderFieldPart* aPart, TInt aIndex);
    78 
    79 	IMPORT_C
    80 	//##ModelId=3B1E52A503B4
    81 	void BeginRawDataL(TInt aChunkSize = KDefaultRawChunkSize);
    82 
    83 	IMPORT_C
    84 	//##ModelId=3B1E52A503AB
    85 	void WriteRawDataL(const TDesC8& aData);
    86 
    87 	IMPORT_C
    88 	//##ModelId=3B1E52A503AD
    89 	void WriteRawDataL(TChar aData);
    90 
    91 	IMPORT_C
    92 	//##ModelId=3B1E52A503AA
    93 	void CommitRawData();
    94 
    95 private: // attributes
    96 
    97 	/** The internal representation of this header field
    98 	*/
    99 	//##ModelId=3B1E52A503A2
   100 	CHeaderField& iHeaderField;
   101 };
   102 
   103 inline RHeaderField::RHeaderField(CHeaderField& aHeaderField)
   104 	: iHeaderField(aHeaderField)
   105 	{
   106 	}
   107 
   108 #endif // __CHEADERFIELD_H__