diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-101A11B5-E9A2-4E6D-9D81-9BF76312521D.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-101A11B5-E9A2-4E6D-9D81-9BF76312521D.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,56 @@ + + + + + +WSP +Header Primitive DecodingTWspPrimitiveDecoder allows decoding the primitive +values of the header. This allows interpreting the encoded header. + + +

Call String(), Val7Bit(), LongInt(), Integer(), UIntVar(), LengthVal(), Date() as appropriate to +get the required byte to which the buffer is currently pointing. Before calling +these functions, check if the data type that is passed to the functions is +one of the type supported by TWspHeaderType. To get the +type of the variable, call VarType(), which returns either ELengthVal, EQuotedString, EString or E7BitVal of TWspHeaderType as +appropriate. If no data type is set to the data it points, the function returns ENotSet.

+TPtrC8 aBuf; +TWspPrimitiveDecoder dec(aBuf); +TInt length; +// get length in bytes of data +TInt int = dec.LengthVal(length); + + +

Decode the string value of the header using String().

+TPtrC8 aBuf; +TWspPrimitiveDecoder dec(aBuf); +TPtrC8 str; +//get the string that the buffer is pointing to +TInt int = dec.String(str); +
+ +

Decode the integer value of the header using Integer().

+TPtrC8 aBuf; +TWspPrimitiveDecoder dec(aBuf); +TUint32 val; +// get the integer that the buffer is pointing to +TInt int = dec.Integer(val); +
+ +

Decode the integer value of the header using UIntVar().

+TPtrC8 aBuf; +TWspPrimitiveDecoder dec(aBuf); +TUint32 val; +//get the TUint32 value of the header +TUint32 uInt =dec.UintVar(val); +
+
+
+
+
\ No newline at end of file