CHeaderFieldParam Class Reference

class CHeaderFieldParam : public CBase

Generalised representation of a single HTTP header parameter. The parameter has a name and takes a value using one of the three types supported in CHeaderFieldPart .

Special case:
  • an unnamed parameter with an assigned value

Examples of the use for this special case are:

        Cache-Control: max-stale [=delta-seconds]
	Expect: expectation1=value1; expectation2=value2
	Content-Range: bytes 0-1023/4096
       

Cache-Control's max-stale directive can take an optional value; hence the client should create a one-part header where the part is an enumeration value 'max-stale', and assign to that part an un-named parameter for the delta-seconds value if it is desired.

Expect's sets of expectation expressions should each be added by the client as a separate part, each of which is given an unnamed parameter that takes the expectation value.

Content-Range should have one part added containing the enumeration 'bytes'. Three parameters should be defined for that part: 'first', 'last' and 'total' which take the values in the byte-range. This is, of course, application-specific and similar guidelines might be adopted by the parser to represent other headers.

Inherits from

Constructor & Destructor Documentation

CHeaderFieldParam(RStringF, THTTPHdrVal)

CHeaderFieldParam ( RStringF aName,
THTTPHdrVal aVal
) [private, inline]

Default constructor.

c'tor

Parameters

RStringF aName
THTTPHdrVal aVal

~CHeaderFieldParam()

~CHeaderFieldParam ( ) [inline]

Member Functions Documentation

Name()

RStringF Name ( ) const [inline]

Obtain the name of the parameter, e.g. q Getter's

New(RStringF, THTTPHdrVal)

CHeaderFieldParam * New ( RStringF aParamName,
THTTPHdrVal aVal
) [static, inline]

Parameters

RStringF aParamName
THTTPHdrVal aVal

NewL(RStringF, THTTPHdrVal)

CHeaderFieldParam * NewL ( RStringF aParamName,
THTTPHdrVal aVal
) [static, inline]

Create a new header parameter that has a descriptor value.

Parameters

RStringF aParamName The name of the parameter, as a string table reference. Can be an empty string.
THTTPHdrVal aVal The HTTP value of the parameter. A copy is taken when storing.

SetValue(THTTPHdrVal)

void SetValue ( THTTPHdrVal aVal ) [inline]

Change the value held in this field parameter Setter's

Parameters

THTTPHdrVal aVal

Value()

THTTPHdrVal Value ( ) const [inline]

Obtain the value of the parameter. The caller must call Copy() on the returned THTTPHdrVal if it is going to be stored. This is needed in order to correctly maintain string references.

Member Data Documentation

RStringF iName

RStringF iName [private]

THTTPHdrVal iValue

THTTPHdrVal iValue [private]