CHeaderCodec Class Reference
class CHeaderCodec : public CBase |
An abstract HTTP header codec.
Each instance of a concrete subclass of CHeaderCodec is associated with, and owned by, a specific CProtocolHandler. It provides on-demand encoding/decoding of HTTP header data, between the generic format used by clients/filters to formulate requests and interpret responses, and the raw format used by the transport handlers (and origin servers/gateways/etc.)
The CHeaderCodec has an associated instance of a sub-class of each of CHeaderReader and CHeaderWriter. It delegates the actual encoding and decoding function to these instances.
Header codecs provide a mechanism for extensibility whereby if one codec can't decode (or encode) a given header, it locates a codec that can, and then delegates the task to that codec instead.
Constructor & Destructor Documentation
CHeaderCodec()
IMPORT_C | CHeaderCodec | ( | ) | [protected] |
~CHeaderCodec()
IMPORT_C | ~CHeaderCodec | ( | ) | [virtual] |
Intended Usage: Destructor - cleans up and releases resources to the system.
Member Functions Documentation
CanDecode(RStringF)
Intended Usage: Concrete header codec classes must implement this method to indicate to the framework whether their concrete CHeaderReader is capable of decoding the named header field.
Parameters
RStringF aHeaderField | (in) A proxy for the header field to be encoded |
CanEncode(RStringF)
Intended Usage: Concrete header codec classes must implement this method to indicate to the framework whether their concrete CHeaderWriter is capable of encoding the named header field.
Parameters
RStringF aHeaderField | (in) A proxy for the header field to be encoded |
ConstructL()
IMPORT_C void | ConstructL | ( | ) | [protected] |
Second phase construction in which any necessary allocation is done Implementations of this interface may leave with standard erros like KErrNoMemory if there is insufficient memory for allocation in the second phase.
DecodeHeaderL(RHeaderField &)
Decode the supplied header field. This method uses the associated concrete CHeaderReader object to do a conversion of the field into the generic internal representation from the raw form.
-
leave
- KErrNotSupported if a codec that supports decoding this header cannot be found
Parameters
RHeaderField & aHeader | (in) A proxy for the header field to be decoded |
EncodeHeaderL(RHeaderField &)
Encode the supplied header field. This method uses the associated concrete CHeaderWriter object to do a conversion of the field into raw form from the generic internal representation.
-
leave
- KErrNotSupported if a codec that supports encoding this header cannot be found
Parameters
RHeaderField & aHeader | (in) A proxy for the header field to be encoded |
FindDelegateCodecL(RStringF)
Intended Usage: Concrete header codecs must be implement this method if they wish to delegate the encoding/decoding of particular header fields to a different codec. This would be done if the codec doesn't have the ability itself to do the encode/decode but can locate an alternative that does. This function may leave with a Standard Symbian OS error code. eg. KErrNoMemory
The caller takes ownership of the returned codec.
- leave
- KErrNoMemory, Not enough memory to create object.
Parameters
RStringF aHeaderField | (in) A proxy for the header field to be encoded |
Reserved1()
void | Reserved1 | ( | ) | [private, inline, virtual] |
Intended Usage: Reserve a slot in the v-table to preserve future BC
Reserved2()
void | Reserved2 | ( | ) | [private, inline, virtual] |
Intended Usage: Reserve a slot in the v-table to preserve future BC
Member Data Documentation
CHeaderCodec * iDelegateCodec
The most recently-obtained delegate codec
CHeaderReader * iReader
The owned header reader object that does actual decoding of header fields.
CHeaderWriter * iWriter
The owned header writer object that does actual encoding of header fields.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.