TWspPrimitiveDecoder Class Reference
class TWspPrimitiveDecoder |
Decoder for WSP Primitves - WAP-WSP Section 8.4.1
Constructor & Destructor Documentation
TWspPrimitiveDecoder(TPtrC8)
TWspPrimitiveDecoder | ( | TPtrC8 | aBuffer | ) | [inline] |
Parameters
TPtrC8 aBuffer | In - the buffer containing the value in its raw format |
Member Functions Documentation
Date(TDateTime &)
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).
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspHeaderType::ELengthVal
- Post-condition
- internal offset gets updated to move past this primitive
Integer(TUint32 &)
Returns an Integer - could be short or long.
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspHeaderType::ELengthVal or VarType() == TWspHeaderType::E7BitVal
- Post-condition
- internal offset gets updated to move past this primitive
LengthVal(TInt &)
Returns length of the data following this byte.
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspHeaderType::ELengthVal
- Post-condition
- internal offset gets updated to move past this primitive
Parameters
TInt & aVal | Out - the length encoded in this byte that indicates the size of the data that follows. |
LongInt(TUint32 &)
Returns a long int the buffer is currently pointing at.
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspHeaderType::ELengthVal
- Post-condition
- internal offset gets updated to move past this primitive
String(TPtrC8 &)
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.
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspType::EString
- Post-condition
- internal offset gets updated to move past this primitive
Parameters
TPtrC8 & aString | Out - the string |
UintVar(TUint32 &)
Returns a TUint32
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspHeaderType::ELengthVal or VarType() == TWspHeaderType::E7BitVal
- Post-condition
- internal offset gets updated to move past this primitive
Parameters
TUint32 & aVal | Out - the TUint32 decoded |
Val7Bit(TUint8 &)
Returns a token, a short int or an octet value with the top bit cleared
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspHeaderType::E7BitVal
- Post-condition
- internal offset gets updated to move past this primitive
Parameters
TUint8 & aVal | Out - the 7 bit value with top bit cleared |
VarType()
Looks at the byte currently pointed at in this buffer and returns the type.
VersionL(RStringPool, RStringF &)
Returns a formatted version string
- Pre-condition
- iBuffer[iOffset] must be valid, VarType() == TWspHeaderType::ELengthVal
- Post-condition
- internal offset gets updated to move past this primitive
Parameters
RStringPool aPool | In - an opened string pool |
RStringF & aVer | Out - a formatted version string. Caller must close this string. |
Member Enumerations Documentation
Enum TWspHeaderType
TWspHeaderType describe the types from WAP-WSP Section 8.4.1.2
Enumerators
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
|
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.