CElementParser Class Reference

#include <btsdp.h>

Link against: sdpdatabase.lib

class CElementParser : public CBase

Inherits from

  • CElementParser

    Nested Classes and Structures

    Detailed 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.

    See also: MSdpElementBuilder

    Constructor & Destructor Documentation

    ~CElementParser ( )

    IMPORT_C~CElementParser()

    Destructor.

    Member Function Documentation

    BufferedParseL ( const TDesC8 & )

    IMPORT_C TBoolBufferedParseL(const TDesC8 &aData)

    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; Reset() should be called before the next call to this function.

    ParameterDescription
    aDataBuffer to parse

    Returns: 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.

    Builder ( )

    IMPORT_C MSdpElementBuilder *Builder()

    NewL ( MSdpElementBuilder * )

    IMPORT_C CElementParser *NewL(MSdpElementBuilder *aBuilder)[static]

    Allocates and constructs a new CElementParser object.

    ParameterDescription
    aBuilderObject into which to build data element

    Returns: New CElementParser object

    ParseElementsL ( const TDesC8 & )

    IMPORT_C TIntParseElementsL(const TDesC8 &aData)

    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.

    ParameterDescription
    aDataBuffer to parse

    Returns: Number of bytes not consumed

    Reset ( )

    IMPORT_C voidReset()

    Resets the parser's buffers to be empty.

    Reset ( MSdpElementBuilder * )

    IMPORT_C voidReset(MSdpElementBuilder *aBuilder)

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

    ParameterDescription
    aBuilderElement builder object to use

    SetBuilder ( MSdpElementBuilder * )

    IMPORT_C voidSetBuilder(MSdpElementBuilder *aBuilder)