Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:


Construction and destruction


TWspHeaderSegmenter(RStringPool,const TStringTable &,TPtrC8)

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

In - an opened RStringPool - owned by the caller

const TStringTable &aStringTable

In - the string table in the string pool to use

TPtrC8 aBuffer

In - the buffer containing the WSP header data - owned by the caller

[Top]


Member functions


NextL(TWspField &)

IMPORT_C TInt NextL(TWspField &aWspHeader);

Description

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

Parameters

TWspField &aWspHeader

Out - a TWspField containing the header <name,value> pair.

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()const

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.