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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 @warning : This file contains Rose Model ID comments - please do not delete
21 #ifndef __RHEADERFIELD_H__
22 #define __RHEADERFIELD_H__
26 #include <http/thttphdrval.h>
27 #include <http/rhttppropertyset.h>
28 #include <http/rhttpheaders.h>
30 // Forward declarations
32 class THeaderFieldPartIter;
36 The default chunk size for Raw data should be set to the average length of a header field when encoded in
41 const TInt KDefaultRawChunkSize= 32;
44 //##ModelId=3B1E52A50396
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.
56 //##ModelId=3BA6004002BC
57 RHeaderField(CHeaderField& aHeaderField);
60 //##ModelId=3B1E52A503C0
61 RStringF Name() const;
64 //##ModelId=3B1E52A503BF
65 THeaderFieldPartIter PartsL();
68 //##ModelId=3B1E52A503B9
69 void RawDataL(TPtrC8& aRawData);
72 //##ModelId=3BA6004002B2
73 RHTTPHeaders Collection();
76 //##ModelId=3B1E52A503B6
77 void SetPartL(CHeaderFieldPart* aPart, TInt aIndex);
80 //##ModelId=3B1E52A503B4
81 void BeginRawDataL(TInt aChunkSize = KDefaultRawChunkSize);
84 //##ModelId=3B1E52A503AB
85 void WriteRawDataL(const TDesC8& aData);
88 //##ModelId=3B1E52A503AD
89 void WriteRawDataL(TChar aData);
92 //##ModelId=3B1E52A503AA
95 private: // attributes
97 /** The internal representation of this header field
99 //##ModelId=3B1E52A503A2
100 CHeaderField& iHeaderField;
103 inline RHeaderField::RHeaderField(CHeaderField& aHeaderField)
104 : iHeaderField(aHeaderField)
108 #endif // __CHEADERFIELD_H__