Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: thttphdrval.h
Link against: http.lib

Class THTTPHdrVal

class THTTPHdrVal;

Description

A representation of a value found in an HTTP header field. Three fundamental types are used in HTTP - integers, strings (which may be free text, 'enumeration values', URIs, etc. or date/times.

The class allows any of the three values to be held and the current value (as well as its type) to be determined.

THTTPHdrVal instances are used to assign values to header fields, their parts and their associated parameters.

Members

Defined in THTTPHdrVal:
Copy(), DateTime(), Int(), KDateVal, KNoType, KStrFVal, KStrVal, KTIntVal, SetDateTime(), SetInt(), SetStr(), SetStrF(), Str(), StrF(), THTTPHdrVal(), THTTPHdrVal(), THTTPHdrVal(), THTTPHdrVal(), THTTPHdrVal(), THTTPValType, TQConv, Type(), operator RString(), operator RStringF(), operator TDateTime(), operator TInt(), operator!=(), operator==()

See also:


Construction and destruction


THTTPHdrVal()

IMPORT_C THTTPHdrVal();

Description

Default constructor Used when constructing an empty header value that is to be filled in by a call to a function. e.g. RHTTPHeaders::GetField


THTTPHdrVal()

IMPORT_C THTTPHdrVal(TInt aIntVal);

Description

Constructor for an integer field value

Parameters

TInt aIntVal

The integer value


THTTPHdrVal()

IMPORT_C THTTPHdrVal(RStringF aStrVal);

Description

Constructor for an string value

Parameters

RStringF aStrVal

The string value


THTTPHdrVal()

IMPORT_C THTTPHdrVal(RString aStrVal);

Description

Constructor for an string value

Parameters

RString aStrVal

The string value


THTTPHdrVal()

IMPORT_C THTTPHdrVal(TDateTime aDateVal);

Description

Constructor for an date/time value

Parameters

TDateTime aDateVal

The date/time value

[Top]


Member functions


Copy()

IMPORT_C THTTPHdrVal Copy() const;

Description

Obtain a copy of this header value. This is critical when the header contains a string, since a new string reference must be created

Return value

THTTPHdrVal

The copied header value


Type()

IMPORT_C THTTPValType Type() const;

Description

Determine the type of this header field value

Return value

THTTPValType

A THTTPValType enumeration describing the value's type


Int()

IMPORT_C TInt Int() const;

Pre-Condition

Requires that the object was previously set to hold a TInt

Description

Obtain the (integer) value held within Panics if the value is of the wring type

Return value

TInt

An integer value


operator TInt()

inline operator TInt() const;

Pre-Condition

Requires that the object was previously set to hold a TInt

Description

Cast operator to obtain the HTTP value as an integer. Note this doesn't convert from a different form to integer! Panics if the value is of the wrong type

Return value


StrF()

IMPORT_C RStringF StrF() const;

Pre-Condition

Requires that the object was previously set to hold a string

Description

Obtain the (string) value held within Panics if the value is of the wring type

Return value

RStringF

A string


Str()

IMPORT_C RString Str() const;

Description

Return value

RString


operator RStringF()

inline operator RStringF() const;

Pre-Condition

Requires that the object was previously set to hold a string

Description

Cast operator to obtain the HTTP value as a string. Note this doesn't convert from a different form to string! Panics if the value is of the wring type

Return value


operator RString()

inline operator RString() const;

Pre-Condition

Requires that the object was previously set to hold a string

Description

Cast operator to obtain the HTTP value as a string. Note this doesn't convert from a different form to string! Panics if the value is of the wring type

Return value


DateTime()

IMPORT_C TDateTime DateTime() const;

Pre-Condition

Requires that the object was previously set to hold a TDateTime

Description

Obtain the (date/time) value held within. Panics if the value is of the wrong type

Return value

TDateTime

An date/time value


operator TDateTime()

inline operator TDateTime() const;

Pre-Condition

Requires that the object was previously set to hold a TDateTime

Description

Cast operator to obtain the HTTP value as an date/time. Note this doesn't convert from a different form to date! Panics if the value is of the wring type

Return value


SetInt()

IMPORT_C void SetInt(TInt aIntVal);

Description

Set the header value to be the supplied integer.

Parameters

TInt aIntVal

The integer value


SetStrF()

IMPORT_C void SetStrF(RStringF aStrVal);

Description

Set the header value to be the supplied string.

Parameters

RStringF aStrVal

The string value


SetStr()

IMPORT_C void SetStr(RString aStrVal);

Description

Set the header value to be the supplied string. Any previous value, or its type, are lost.

Parameters

RString aStrVal

The string value


SetDateTime()

IMPORT_C void SetDateTime(TDateTime aDateVal);

Description

Set the header value to be the supplied date/time. Any previous value, or its type, are lost.

Parameters

TDateTime aDateVal

The date/time value


operator==()

IMPORT_C TBool operator==(THTTPHdrVal aVal) const;

Description

Comparison operator. Does a comparison based on the current type.

Parameters

THTTPHdrVal aVal

The header value to compare.

Return value

TBool


operator!=()

IMPORT_C TBool operator!=(THTTPHdrVal aVal) const;

Description

Comparison operator. Does a comparison based on the current type.

Parameters

THTTPHdrVal aVal

The string to compare.

Return value

TBool

[Top]


Member classes


Class TQConv

class TQConv;

Description

Members

Defined in THTTPHdrVal::TQConv:
TQConv(), TQConv(), operator TInt(), operator TReal()

Construction and destruction


TQConv()

inline TQConv(TReal aQ);

Description

Construct from a real number representation of 'q'.

Parameters

TReal aQ


TQConv()

inline TQConv(TInt aQ);

Description

Construct from a fixed-point representation of 'q'.

Parameters

TInt aQ

Member functions


operator TInt()

inline operator TInt() const;

Description

Integer cast operator to get the fixed-point representation.

Return value


operator TReal()

inline operator TReal() const;

Description

TReal cast operator to get the real number representation.

Return value

[Top]


Member enumerations


Enum THTTPValType

THTTPValType

Description

KTIntVal

the value is an integer

KStrVal

the value is a case-sensitive string

KDateVal

the value is a date/time

KStrFVal

the value is a case-insensitive string

KNoType

no value has yet been set