Location:
thttphdrval.h
Link against: http.lib
class THTTPHdrVal;
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.
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==()
IMPORT_C THTTPHdrVal();
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
IMPORT_C THTTPHdrVal(TInt aIntVal);
Constructor for an integer field value
|
IMPORT_C THTTPHdrVal(RStringF aStrVal);
Constructor for an string value
|
IMPORT_C THTTPHdrVal(RString aStrVal);
Constructor for an string value
|
IMPORT_C THTTPHdrVal(TDateTime aDateVal);
Constructor for an date/time value
|
IMPORT_C THTTPHdrVal Copy() const;
Obtain a copy of this header value. This is critical when the header contains a string, since a new string reference must be created
|
IMPORT_C THTTPValType Type() const;
Determine the type of this header field value
|
IMPORT_C TInt Int() const;
Requires that the object was previously set to hold a TInt
Obtain the (integer) value held within Panics if the value is of the wring type
|
inline operator TInt() const;
Requires that the object was previously set to hold a TInt
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
|
IMPORT_C RStringF StrF() const;
Requires that the object was previously set to hold a string
Obtain the (string) value held within Panics if the value is of the wring type
|
inline operator RStringF() const;
Requires that the object was previously set to hold a string
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
|
inline operator RString() const;
Requires that the object was previously set to hold a string
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
|
IMPORT_C TDateTime DateTime() const;
Requires that the object was previously set to hold a TDateTime
Obtain the (date/time) value held within. Panics if the value is of the wrong type
|
inline operator TDateTime() const;
Requires that the object was previously set to hold a TDateTime
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
|
IMPORT_C void SetInt(TInt aIntVal);
Set the header value to be the supplied integer.
|
IMPORT_C void SetStrF(RStringF aStrVal);
Set the header value to be the supplied string.
|
IMPORT_C void SetStr(RString aStrVal);
Set the header value to be the supplied string. Any previous value, or its type, are lost.
|
IMPORT_C void SetDateTime(TDateTime aDateVal);
Set the header value to be the supplied date/time. Any previous value, or its type, are lost.
|
IMPORT_C TBool operator==(THTTPHdrVal aVal) const;
Comparison operator. Does a comparison based on the current type.
|
|
IMPORT_C TBool operator!=(THTTPHdrVal aVal) const;
Comparison operator. Does a comparison based on the current type.
|
|
class TQConv;
Defined in THTTPHdrVal::TQConv
:
TQConv()
, TQConv()
, operator TInt()
, operator TReal()
TQConv()
inline TQConv(TReal aQ);
Construct from a real number representation of 'q'.
|
TQConv()
inline TQConv(TInt aQ);
Construct from a fixed-point representation of 'q'.
|
operator TInt()
inline operator TInt() const;
Integer cast operator to get the fixed-point representation.
|
operator TReal()
inline operator TReal() const;
TReal cast operator to get the real number representation.
|