Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Bluetooth Service Discovery Database overview


Purpose

Allows a local service to enter its properties into a local Bluetooth service database. Doing this enables remote Bluetooth services to discover that the service is available.

[Top]


Architectural relationships

The Service Discovery Database API is one of two APIs that allow you to use the Bluetooth Service Discovery Protocol. The other, the Bluetooth Service Discovery Agent, enables you to discover the Bluetooth services, and the attributes of those services, that are available on a remote device.

[Top]


Description


Service Discovery Database

A client must create and connect a session, RSdp, and a subsession, RSdpDatabase, to access the database. A subsession allows service records and their attributes to be added, deleted, and updated.


Service attributes

A service is described through a number of attributes, each of which can hold a specific type of value, such as an integer, boolean, string, etc.

The base class through which all attributes are manipulated is CSdpAttrValue.

A family of classes derived from CSdpAttrValue provide classes through which these types can be manipulated: CSdpAttrValueBoolean, CSdpAttrValueDEA, CSdpAttrValueDES, CSdpAttrValueInt, CSdpAttrValueNil, CSdpAttrValueString, CSdpAttrValueUint, CSdpAttrValueURL, and CSdpAttrValueUUID.

Two classes, CSdpAttrValueDEA and CSdpAttrValueDES, enable lists of attributes to be constructed. Both implement the MSdpElementBuilder interface that provides functions to accumlatively add attributes to a list.


Service record handle

The attributes for a service are stored in a service record. A record is referred to through an ID, known as a service record handle, stored in a TSdpServRecordHandle.