Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <btsdp.h>
Link against: sdpdatabase.lib

Class CElementParser

class CElementParser : public CBase;

Description

Parser for SDP attribute values.

The class parses an input buffer containing an attribute value into its constituent data elements. It calls an MSdpElementBuilder object each time a data element is decoded.

This parser can parse incrementally, and be fed new data as it arrives.

Derivation

Members

Defined in CElementParser:

Inherited from CBase:

See also:


Construction and destruction


NewL(MSdpElementBuilder *)

IMPORT_C static CElementParser* NewL(MSdpElementBuilder *aBuilder);

Description

Allocates and constructs a new CElementParser object.

Parameters

MSdpElementBuilder *aBuilder

Object into which to build data element

Return value

CElementParser *

New CElementParser object


~CElementParser()

IMPORT_C ~CElementParser();

Description

Destructor.

[Top]


Member functions


ParseElementsL(const TDesC8 &)

IMPORT_C TInt ParseElementsL(const TDesC8 &aData);

Description

Parses a data buffer into the currently set MSdpElementBuilder interface.

If a whole number of data elements can not be parsed out of aData, the number of bytes left unparsed is returned. Those bytes should be prepended to the buffer when the function is next called.

Parameters

const TDesC8 &aData

Buffer to parse

Return value

TInt

Number of bytes not consumed


BufferedParseL(const TDesC8 &)

IMPORT_C TBool BufferedParseL(const TDesC8 &aData);

Description

Parse out some encoded data, with transparent buffering of unparsed data between calls.

The function stores any incompletely parsed data from a previous call, and automatically prepends to the data buffer when it is next called.

If the function leaves, the unparsed data will be deleted. This means it will not be possible to continue with this data stream; CElementParser::Reset() should be called before the next call to this function.

Parameters

const TDesC8 &aData

Buffer to parse

Return value

TBool

True if a whole number of data elements have not been parsed, so more data is expected. False if a whole number has been parsed.


Reset()

IMPORT_C void Reset();

Description

Resets the parser's buffers to be empty.


Reset(MSdpElementBuilder *)

IMPORT_C void Reset(MSdpElementBuilder *aBuilder);

Description

Resets the parser's buffers to be empty, and resets the element builder object used.

Parameters

MSdpElementBuilder *aBuilder

Element builder object to use


SetBuilder(MSdpElementBuilder *)

IMPORT_C void SetBuilder(MSdpElementBuilder *aBuilder);

Description

Parameters

MSdpElementBuilder *aBuilder


Builder()

IMPORT_C MSdpElementBuilder* Builder();

Description

Return value

MSdpElementBuilder *

[Top]


Member classes


Class CLinearBuf

class CLinearBuf : public CBase;

Description

Derivation

Members

Defined in CElementParser::CLinearBuf:

Inherited from CBase:

Member functions


Size()const

inline TInt Size() const;

Description

Return value

TInt