MSdpElementBuilder Class Reference

#include <btsdp.h>

Link against: sdpdatabase.lib

class MSdpElementBuilder
Public Member Functions
virtual IMPORT_C MSdpElementBuilder *BuildBooleanL(TBool)
virtual IMPORT_C MSdpElementBuilder *BuildDEAL()
virtual IMPORT_C MSdpElementBuilder *BuildDESL()
virtual IMPORT_C MSdpElementBuilder *BuildIntL(const TDesC8 &)
virtual IMPORT_C MSdpElementBuilder *BuildNilL()
virtual IMPORT_C MSdpElementBuilder *BuildStringL(const TDesC8 &)
virtual IMPORT_C MSdpElementBuilder *BuildURLL(const TDesC8 &)
virtual IMPORT_C MSdpElementBuilder *BuildUUIDL(const TUUID &)
virtual IMPORT_C MSdpElementBuilder *BuildUintL(const TDesC8 &)
virtual IMPORT_C MSdpElementBuilder *BuildUnknownL(TUint8, TUint8, const TDesC8 &)
virtual IMPORT_C MSdpElementBuilder *EndListL()
IMPORT_C voidMSEB_ExtensionInterfaceL(TUid, void *&)
virtual IMPORT_C MSdpElementBuilder *StartListL()

Detailed Description

Constructs an attribute value, or a set of attributes, from multiple data elements.

The builder interface is used for building single attribute values, and sets of attribute value, attribute ID pairs, as for example in a service record.

In particular, the builder interface can be implemented to receive the results from CSdpAgent attribute queries.

Each member function itself returns an MSdpElementBuilder interface that can then be used to add further elements.

For more on the format of attribute values, see [BS1 Service Discovery Protocol 3].

Note that the interface defines each function to leave with the error KErrGeneral.

See also: CSdpAgent::AttributeRequestL()

Member Function Documentation

BuildBooleanL ( TBool )

IMPORT_C MSdpElementBuilder *BuildBooleanL(TBoolaBool)[virtual]

Adds a Boolean element.

Parameters
aBoolElement to add
Return Value
Builder with added element

BuildDEAL ( )

IMPORT_C MSdpElementBuilder *BuildDEAL()[virtual]

Adds a (header for a) Data element alternative (DEA), a data element whose data field is a sequence of data elements from which one data element is to be selected.

This should be followed by a call to StartListL(), and then calls to add elements to the list.

Return Value
Attribute value with added element

BuildDESL ( )

IMPORT_C MSdpElementBuilder *BuildDESL()[virtual]

Adds a (header for a) Data element sequence (DES), a data element whose data field is a sequence of data elements.

This should be followed by a call to StartListL(), and then calls to add elements to the list.

Return Value
Attribute value with added element

BuildIntL ( const TDesC8 & )

IMPORT_C MSdpElementBuilder *BuildIntL(const TDesC8 &aInt)[virtual]

Adds a signed integer element.

Parameters
aIntElement to add
Return Value
Builder with added element

BuildNilL ( )

IMPORT_C MSdpElementBuilder *BuildNilL()[virtual]

Adds a null element.

Return Value
Builder with added element

BuildStringL ( const TDesC8 & )

IMPORT_C MSdpElementBuilder *BuildStringL(const TDesC8 &aString)[virtual]

Adds a Text String element.

Parameters
aStringElement to add
Return Value
Builder with added element

BuildURLL ( const TDesC8 & )

IMPORT_C MSdpElementBuilder *BuildURLL(const TDesC8 &aURL)[virtual]

Adds a URL element.

Parameters
aURLElement to add
Return Value
Builder with added element

BuildUUIDL ( const TUUID & )

IMPORT_C MSdpElementBuilder *BuildUUIDL(const TUUID &aUUID)[virtual]

Adds a UUID element.

Parameters
aUUIDElement to add
Return Value
Builder with added element

BuildUintL ( const TDesC8 & )

IMPORT_C MSdpElementBuilder *BuildUintL(const TDesC8 &aUint)[virtual]

Adds an unsigned integer element.

Parameters
aUintElement to add
Return Value
Builder with added element

BuildUnknownL ( TUint8, TUint8, const TDesC8 & )

IMPORT_C MSdpElementBuilder *BuildUnknownL(TUint8aType,
TUint8aSizeDesc,
const TDesC8 &aData
)[virtual]

Adds an element of any type.

Parameters
aTypeType descriptor
aSizeDescSize descriptor
aDataData field
Return Value
Builder with added element

EndListL ( )

IMPORT_C MSdpElementBuilder *EndListL()[virtual]

Indicates that subsequent elements no longer belong to current DES or DEA

Building of current DES or DEA is terminated.

Return Value
Builder

MSEB_ExtensionInterfaceL ( TUid, void *& )

IMPORT_C voidMSEB_ExtensionInterfaceL(TUidaInterface,
void *&aObject
)

Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is. This virtual function allows the M- classes to be extended in future in a binary compatible way by providing a method that clients can override in future to allow extra callbacks to be made via aObject.

Parameters
aInterfaceUID of the interface to return
aObjectthe container for another interface as specified by aInterface

StartListL ( )

IMPORT_C MSdpElementBuilder *StartListL()[virtual]

Tell builder you are about to start a list

The end of the list should be indicated by a call to EndList().

Return Value
Builder Indicates that subsequent elements added belong to a DES or DEA.Builder