#include <wspdecoder.h>
class TWspPrimitiveDecoder |
Public Member Enumerations | |
---|---|
enum | TWspHeaderType { ENotSet, ELengthVal, EQuotedString, EString, E7BitVal } |
Public Member Functions | |
---|---|
TWspPrimitiveDecoder(TPtrC8) | |
IMPORT_C TInt | Date(TDateTime &) |
IMPORT_C TInt | Integer(TUint32 &) |
IMPORT_C TInt | LengthVal(TInt &) |
IMPORT_C TInt | LongInt(TUint32 &) |
IMPORT_C TInt | String(TPtrC8 &) |
IMPORT_C TInt | UintVar(TUint32 &) |
IMPORT_C TInt | Val7Bit(TUint8 &) |
IMPORT_C TWspHeaderType | VarType() |
IMPORT_C TInt | VersionL(RStringPool, RStringF &) |
Decoder for WSP Primitves - WAP-WSP Section 8.4.1 Deprecated
TWspHeaderType describe the types from WAP-WSP Section 8.4.1.2
Enumerator | Value | Description |
---|---|---|
ENotSet |
The type has not been set | |
ELengthVal |
0-31 - octet is a value length | |
EQuotedString |
34 - value is a quoted text string, terminated by a Null | |
EString |
32-127 - value is a text string, terminated by a Null | |
E7BitVal |
128-255 - encoded 7 bit value, this header has no more data |
TWspPrimitiveDecoder | ( | TPtrC8 | aBuffer | ) | [inline] |
Constructor
Parameters | |
---|---|
aBuffer | In - the buffer containing the value in its raw format |
Returns a TDateTime offset from January 1, 1970 - WAP WSP Section 8.4.2.3 Panics if the time val is greater then the maximum allowable integer size (32 bits).
Parameters | |
---|---|
aDateTime | Out - a WAP Date |
Returns an Integer - could be short or long.
Parameters | |
---|---|
aVal | Out - the long int |
Returns length of the data following this byte.
Parameters | |
---|---|
aVal | Out - the length encoded in this byte that indicates the size of the data that follows. |
Returns a long int the buffer is currently pointing at.
Parameters | |
---|---|
aVal | Out - the long int |
Returns a TPtrC holding the string the buffer currently points at without the NULL termination. If the String type is a quoted string then the quotes are not included in the returned buffer.
Parameters | |
---|---|
aString | Out - the string |
Returns a TUint32
Parameters | |
---|---|
aVal | Out - the TUint32 decoded |
Returns a token, a short int or an octet value with the top bit cleared
Parameters | |
---|---|
aVal | Out - the 7 bit value with top bit cleared |
IMPORT_C TWspHeaderType | VarType | ( | ) | const |
Looks at the byte currently pointed at in this buffer and returns the type.
IMPORT_C TInt | VersionL | ( | RStringPool | aPool, |
RStringF & | aVer | |||
) |
Returns a formatted version string
Parameters | |
---|---|
aPool | In - an opened string pool |
aVer | Out - a formatted version string. Caller must close this string. |