TWspHeaderSegmenter Class Reference

class TWspHeaderSegmenter
TWspHeaderSegmenter segments a WSP buffer into WSP header/value pairs. It detects boundaries between header/values based on the WAP-WSP spec.
  • To construct, buffer and string pool is passed in

  • Call to NextL() to iterate through the buffer - this returns a TWspField

  • NextL() returns KErrNotFound when done

Constructor & Destructor Documentation

TWspHeaderSegmenter(RStringPool, const TStringTable &, TPtrC8)

TWspHeaderSegmenter(RStringPoolaPool,
const TStringTable &aStringTable,
TPtrC8aBuffer
)[inline]

Constructor

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

Parameters

RStringPool aPoolIn - an opened RStringPool - owned by the caller
const TStringTable & aStringTableIn - the string table in the string pool to use
TPtrC8 aBufferIn - the buffer containing the WSP header data - owned by the caller

Member Functions Documentation

NextL(TWspField &)

IMPORT_C TIntNextL(TWspField &aWspHeader)

Parameters

TWspField & aWspHeader

Offset()

TInt Offset()const [inline]

Offset returns the current offset into the buffer being parsed.

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.

Member Data Documentation

TPtrC8 iBuffer

TPtrC8 iBuffer[private]

Raw buffer that will be segmented - Not Owned

TInt iOffset

TInt iOffset[private]

Segment offset into the buffer.

RStringPool iPool

RStringPool iPool[private]

Opened string pool to use with the string table already loaded - Not Owned

const TStringTable & iStringTable

const TStringTable &iStringTable[private]

The string table to use in the string pool - Not Owned