Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: btsdp.h
Link against: sdpdatabase.lib

Class RSdpDatabase

RSdpDatabase

Support

Supported from 6.1

Description

Subsession to the SDP through which service record and their attributes can be added, deleted, and updated.

Derivation

RSdpDatabaseSubsession to the SDP through which service record and their attributes can be added, deleted, and updated
RSdpSubSessionBase class used in the derivation of RSdpDatabase
RSubSessionBaseClient-side handle to a sub-session

Defined in RSdpDatabase:
Close(), CreateServiceRecordL(), DeleteAttributeL(), DeleteRecordL(), Open(), RSdpDatabase(), UpdateAttributeL()

Inherited from RSubSessionBase:
CloseSubSession(), CreateSubSession(), Send(), SendReceive(), SubSessionHandle(), operator=()


Subsession creation and closure


RSdpDatabase()

RSdpDatabase();

Description

Default constructor.


Open()

TInt Open(RSdp& aSession);

Description

Opens a SDP database subsession.

Parameters

RSdp& aSession

SDP database session

Return value

TInt

System-wide error code


Close()

void Close();

Description

Closes the SDP database subsession.

[Top]


Service records


CreateServiceRecordL()

void CreateServiceRecordL(const TUUID& aUUID, TSdpServRecordHandle& aHandle);

Description

Creates a new service record, with a single service class, in the SDP database.

Parameters

const TUUID& aUUID

The service class UUID for the service record

TSdpServRecordHandle& aHandle

On return, the service record handle of the new record


CreateServiceRecordL()

void CreateServiceRecordL(CSdpAttrValueDES& aUUIDList, TSdpServRecordHandle& aHandle);

Description

Creates a new service record, with multiple service classes, in the SDP database.

Parameters

CSdpAttrValueDES& aUUIDList

The service class attribute of the new record. This should consist of a list of UUIDs of the service classes to which the record belongs. The UUIDs should be ordered from the most derived service class to the base one.

TSdpServRecordHandle& aHandle

On return, the service record handle of the new record


DeleteRecordL()

void DeleteRecordL(TSdpServRecordHandle aHandle);

Description

Deletes a service record.

Parameters

TSdpServRecordHandle aHandle

Handle of the service record to delete

[Top]


Attributes


DeleteAttributeL()

void DeleteAttributeL(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID);

Description

Delete an attribute from a service record.

Parameters

TSdpServRecordHandle aHandle

The service record from which to delete the attribute

TSdpAttributeID aAttrID

The ID of the attribute


UpdateAttributeL()

void UpdateAttributeL(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, CSdpAttrValue& aAttrValue);

Description

Updates a service record attribute (value encapsulated in a CSdpAttrValue).

If the attribute does not exist, it is created. If it already exists, the current definition is removed and the new value inserted.

No check is made that the attribute value is suitable for the service class to which the record belongs. It is up to the user to ensure that the semantics of the attribute defined by the service class are respected.

Parameters

TSdpServRecordHandle aHandle

The service record handle to update

TSdpAttributeID aAttrID

The attribute ID to update

CSdpAttrValue& aAttrValue

The attribute value


UpdateAttributeL()

void UpdateAttributeL(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, TUint aUintValue);

Description

Updates a service record attribute (integer value).

If the attribute does not exist, it is created. If it already exists, the current definition is removed and the new value inserted.

No check is made that the attribute value is suitable for the service class to which the record belongs. It is up to the user to ensure that the semantics of the attribute defined by the service class are respected.

Parameters

TSdpServRecordHandle aHandle

The service record handle to update

TSdpAttributeID aAttrID

The attribute ID to update

TUint aUintValue

The attribute value


UpdateAttributeL()

void UpdateAttributeL(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, const TDesC16& aDesCValue);

Description

Updates a service record attribute (wide descriptor value).

If the attribute does not exist, it is created. If it already exists, the current definition is removed and the new value inserted.

No check is made that the attribute value is suitable for the service class to which the record belongs. It is up to the user to ensure that the semantics of the attribute defined by the service class are respected.

Parameters

TSdpServRecordHandle aHandle

The service record handle to update

TSdpAttributeID aAttrID

The attribute ID to update

const TDesC16& aDesCValue

The attribute value


UpdateAttributeL()

void UpdateAttributeL(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, const TDesC8& aDesCValue);

Description

Updates a service record attribute (narrow descriptor value).

If the attribute does not exist, it is created. If it already exists, the current definition is removed and the new value inserted.

No check is made that the attribute value is suitable for the service class to which the record belongs. It is up to the user to ensure that the semantics of the attribute defined by the service class are respected.

Parameters

TSdpServRecordHandle aHandle

The service record handle to update

TSdpAttributeID aAttrID

The attribute ID to update

const TDesC8& aDesCValue

The attribute value