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