#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
| TWspPrimitiveDecoder | ( | TPtrC8 | aBuffer | ) | [inline] |
Constructor
| Parameter | Description |
|---|---|
| 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).
| Parameter | Description |
|---|---|
| aDateTime | Out - a WAP Date |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.
Returns an Integer - could be short or long.
| Parameter | Description |
|---|---|
| aVal | Out - the long int |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.
Returns length of the data following this byte.
| Parameter | Description |
|---|---|
| aVal | Out - the length encoded in this byte that indicates the size of the data that follows. |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.
Returns a long int the buffer is currently pointing at.
| Parameter | Description |
|---|---|
| aVal | Out - the long int |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.
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.
| Parameter | Description |
|---|---|
| aString | Out - the string |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.
Returns a TUint32
| Parameter | Description |
|---|---|
| aVal | Out - the TUint32 decoded |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.
Returns a token, a short int or an octet value with the top bit cleared
| Parameter | Description |
|---|---|
| aVal | Out - the 7 bit value with top bit cleared |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.
| IMPORT_C TWspHeaderType | VarType | ( | ) | const |
Looks at the byte currently pointed at in this buffer and returns the type.
Returns: TWspHeaderType - the type of this data octet
| IMPORT_C TInt | VersionL | ( | RStringPool | aPool, |
| RStringF & | aVer | |||
| ) | ||||
Returns a formatted version string
| Parameter | Description |
|---|---|
| aPool | In - an opened string pool |
| aVer | Out - a formatted version string. Caller must close this string. |
Returns: postive number indicating the number of bytes read from the buffer KErrCorrupt if data is not formatted correctly.