Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: WSPDecoder.h
Link against: inetprotutil.lib

Class TWspHeaderSegmenter

class TWspHeaderSegmenter;

Description

TWspHeaderSegmenter segments a WSP buffer into WSP header/value pairs. It detects boundaries between header/values based on the WAP-WSP spec.

Members

Defined in TWspHeaderSegmenter:
NextL(), Offset(), TWspHeaderSegmenter()


Construction and destruction


TWspHeaderSegmenter()

inline TWspHeaderSegmenter(RStringPool aPool, const TStringTable &aStringTable, TPtrC8 aBuffer);

Pre-Condition

The string table must be opened with the WSP Sting constants table

Description

Constructor

Parameters

RStringPool aPool

const TStringTable &aStringTable

TPtrC8 aBuffer

[Top]


Member functions


NextL()

IMPORT_C TInt NextL(TWspField &aWspHeader);

Description

NextL iterates through the buffer. Each call returns a TWspField in the paramater.

Parameters

TWspField &aWspHeader

Return value

TInt

KErrNone if next field is returned KErrNotFound at the end of the buffer - no TWspField param returned KErrCorrupt if segmenting does not parse correctly

Leave codes

RStringPool::OpenFStringL

StringPool leave code if opening string fails.


Offset()

inline TInt Offset() const;

Description

Offset returns the current offset into the buffer being parsed.

Return value

TInt

TInt offset value. It will point to beginning of next segmented field. If NextL has not been called it will be set to 0. The beginning of the buffer. If buffer has been completely parsed, will return KErrNotFound.