TWspPrimitiveDecoder 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);