Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-E5893C4A-024A-53A7-805F-68989382DC3F"><title>Bluetooth Service Discovery Database Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody><section><title>Purpose</title> <p>Allows a local service to register itself to a local Bluetooth service database. This enables remote Bluetooth devices to discover the service doing an SDP Agent search. </p> </section> <section><title>Architectural relationships</title> <p>The Service Discovery Database API is one of two APIs that allow you to use the Bluetooth Service Discovery Protocol. The other, the <xref href="GUID-8D5E17DA-8EF1-52B4-9706-9836B8D6CE43.dita">Bluetooth Service Discovery Agent</xref>, enables you to discover the Bluetooth services, and the attributes of those services, that are available on a remote device. </p> </section> <section><title>Description</title> <p><b>Service Discovery Database</b> </p> <p>A client must create and connect a session, <xref href="GUID-0879B4D7-A6FA-382F-A124-0234BA89D33D.dita"><apiname>RSdp</apiname></xref>, and a subsession, <xref href="GUID-FC133F0F-C9E8-30CB-B2FE-8AC9F7F802AC.dita"><apiname>RSdpDatabase</apiname></xref>, to access the database. A subsession allows service records and their attributes to be added, updated, and deleted. </p> <p><b>Service attributes</b> </p> <p>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. </p> <p>The base class through which all attributes are manipulated is <xref href="GUID-5528763A-0A50-3029-BEAB-CEC3BA08ABF1.dita"><apiname>CSdpAttrValue</apiname></xref>. </p> <p>A family of classes derived from <xref href="GUID-5528763A-0A50-3029-BEAB-CEC3BA08ABF1.dita"><apiname>CSdpAttrValue</apiname></xref> provide classes through which these types can be manipulated: <xref href="GUID-B1D56FE2-29E4-3EB3-B638-04336A84F80B.dita"><apiname>CSdpAttrValueBoolean</apiname></xref>, <xref href="GUID-74C4154F-9C20-3C23-86EB-D4B602E79DC1.dita"><apiname>CSdpAttrValueDEA</apiname></xref>, <xref href="GUID-7AF08589-F6E5-36A1-AD2C-84D3CB877451.dita"><apiname>CSdpAttrValueDES</apiname></xref>, <xref href="GUID-31EE0888-4D8D-3668-8658-62A1ACFA9E4C.dita"><apiname>CSdpAttrValueInt</apiname></xref>, <xref href="GUID-63EDF468-719A-3EDF-A7F3-53F837AC762B.dita"><apiname>CSdpAttrValueNil</apiname></xref>, <xref href="GUID-3E049232-901E-3C1A-BA7B-8D1F8B90B85C.dita"><apiname>CSdpAttrValueString</apiname></xref>, <xref href="GUID-127DA8BE-A9F2-3536-97EA-A4BCCD51A0E3.dita"><apiname>CSdpAttrValueUint</apiname></xref>, <xref href="GUID-B55A8C55-D7DB-3A96-935A-D09161DE848E.dita"><apiname>CSdpAttrValueURL</apiname></xref>, and <xref href="GUID-CE08D370-E599-37F4-B0CC-D889C1E04B30.dita"><apiname>CSdpAttrValueUUID</apiname></xref>. </p> <p>Two classes, <codeph>CSdpAttrValueDEA</codeph> and <codeph>CSdpAttrValueDES</codeph>, enable lists of attributes to be constructed. Both implement the <xref href="GUID-3DC9CB25-E55D-38E6-8940-B3320EF7E9DD.dita"><apiname>MSdpElementBuilder</apiname></xref> interface that provides functions to accumlatively add attributes to a list. </p> <p><b>Service record handle</b> </p> <p>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 <xref href="GUID-9DDF886B-1556-30A2-A417-1919BA6D255A.dita"><apiname>TSdpServRecordHandle</apiname></xref>. </p> </section> <section><title>Typical Uses</title> <p>Start with the <xref href="GUID-ED342E6B-A4A3-576B-8934-7E7C049837F0.dita">Service Records and Attributes</xref> guide. </p> <p>The following tutorials explain how to get started using the service discovery database. </p> <ul><li id="GUID-D4C358CB-BBFB-5E9E-A740-5A7D083EBA9D"><p> <xref href="GUID-B75BD3DE-9C2E-5429-B55B-891462B92795.dita">How to connect to the service discovery database</xref> </p> </li> <li id="GUID-CECC7C78-8443-5DC1-B8EE-7DE1ED310764"><p> <xref href="GUID-E2A2FA2A-5D9A-56FE-B7E5-69CCBC656BB9.dita">How to create and manipulate attributes</xref> </p> </li> <li id="GUID-EBC35812-6794-5311-A34C-99FDDA0F734B"><p> <xref href="GUID-2373A158-C18A-51B5-BE9A-6B8F7FC63A35.dita">How to register a service in the database</xref> </p> </li> <li id="GUID-89330B93-857F-5E50-8ECC-E1877D81035E"><p> <xref href="GUID-33210C48-3198-51BC-9970-8B29F711A8E2.dita">How to set an attribute in a service record</xref> </p> </li> </ul> </section> </conbody></concept>