API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
IBTSDServer is the interface to the Bluetooth Service Discovery Database. This interface provides methods to add records, search for records, and retrieve records from the local Service Discovery Database.

Usage example:


To Create a new record

IBTSDRecord* piSDRecord; IBTSDServer_CreateRecord(piSDServer, &piSDRecord);

To search for records

// To search local service DB for all records having // UUID value of 0x0003 (RFCOMM protocol UUID) BTUUID32 uuid = AEEBT_PROT_RFCOMM; // 0x0003 uinsigned int handles [10]; int nHandles; IBTSDServer_RetrieveRecordHandles(piSDServer, &uuid, // search pattern; list of uuids 1, // single uuid in the list NULL, // no 128 bit uuid 0, // no 128 bit uuid &handles[0], // array to hold handles 10, // number of handles we want to read &nHandles); // max number of handles available

To Get the record object for a particular handle

// first search for a particular record and obtain its handle // then retrieve the record IBTSDServer_RetrieveRecord(piSDServer, recordHandle, // obtained by calling // IBTSDServer_RetrieveRecordHandles() &piSdRec)