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