|
SDP_API BOOLEAN | SDP_AddAttribute (UINT32 handle, UINT16 attr_id, UINT8 attr_type, UINT32 attr_len, UINT8 *p_val) |
|
SDP_API BOOLEAN | SDP_AddProtocolList (UINT32 handle, UINT16 num_elem, tSDP_PROTOCOL_ELEM *p_elem_list) |
|
SDP_API BOOLEAN | SDP_AddServiceClassIdList (UINT32 handle, UINT16 num_services, UINT16 *p_service_uuids) |
|
SDP_API BOOLEAN | SDP_AddUuidSequence (UINT32 handle, UINT16 attr_id, UINT16 num_uuids, UINT16 *p_uuids) |
|
SDP_API UINT32 | SDP_CreateRecord (void) |
|
wiced_bool_t | wiced_bt_sdp_cancel_service_search (wiced_bt_sdp_discovery_db_t *p_db) |
|
wiced_bool_t | wiced_bt_sdp_db_init (uint8_t *p_sdp_db, uint16_t size) |
|
wiced_bt_sdp_discovery_record_t * | wiced_bt_sdp_find_attribute_in_db (wiced_bt_sdp_discovery_db_t *p_db, uint16_t attr_id, wiced_bt_sdp_discovery_record_t *p_start_rec) |
|
wiced_bt_sdp_discovery_attribute_t * | wiced_bt_sdp_find_attribute_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t attr_id) |
|
wiced_bool_t | wiced_bt_sdp_find_profile_version_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t profile_uuid, uint16_t *p_version) |
|
wiced_bool_t | wiced_bt_sdp_find_protocol_list_elem_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t layer_uuid, wiced_bt_sdp_protocol_elem_t *p_elem) |
|
wiced_bool_t | wiced_bt_sdp_find_protocol_lists_elem_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, uint16_t layer_uuid, wiced_bt_sdp_protocol_elem_t *p_elem) |
|
wiced_bt_sdp_discovery_record_t * | wiced_bt_sdp_find_service_in_db (wiced_bt_sdp_discovery_db_t *p_db, uint16_t service_uuid, wiced_bt_sdp_discovery_record_t *p_start_rec) |
|
wiced_bt_sdp_discovery_record_t * | wiced_bt_sdp_find_service_uuid_in_db (wiced_bt_sdp_discovery_db_t *p_db, wiced_bt_uuid_t *p_uuid, wiced_bt_sdp_discovery_record_t *p_start_rec) |
|
wiced_bool_t | wiced_bt_sdp_find_service_uuid_in_rec (wiced_bt_sdp_discovery_record_t *p_rec, wiced_bt_uuid_t *p_uuid) |
|
wiced_bool_t | wiced_bt_sdp_init_discovery_db (wiced_bt_sdp_discovery_db_t *p_db, uint32_t len, uint16_t num_uuid, wiced_bt_uuid_t *p_uuid_list, uint16_t num_attr, uint16_t *p_attr_list) |
|
wiced_bool_t | wiced_bt_sdp_service_search_attribute_request (uint8_t *p_bd_addr, wiced_bt_sdp_discovery_db_t *p_db, wiced_bt_sdp_discovery_complete_cback_t *p_cb) |
|
wiced_bool_t | wiced_bt_sdp_service_search_request (uint8_t *p_bd_addr, wiced_bt_sdp_discovery_db_t *p_db, wiced_bt_sdp_discovery_complete_cback_t *p_cb) |
|
API Functions module for SDP.
The Service Discovery Protocol (SDP) allows a device to discover services offered by other devices, and their associated parameters. For example, when you use a mobile phone with a Bluetooth headset, the phone uses SDP to determine which Bluetooth profiles the headset can use (Headset Profile, Hands Free Profile, Advanced Audio Distribution Profile (A2DP) etc.) and the protocol multiplexer settings needed for the phone to connect to the headset using each of them. Each service is identified by a Universally Unique Identifier (UUID), with official services (Bluetooth profiles) assigned a short form UUID (16 bits rather than the full 128).
Function SDP_AddAttribute
Description This function is called to add an attribute to a record. This would be through the SDP database maintenance API. If the attribute already exists in the record, it is replaced with the new value.
- Note
- Attribute values must be passed as a Big Endian stream.
- Parameters
-
[in] | handle | : The identifier of the record to be added |
[in] | attr_id | : Identifies the attribute being added to the record (UUID) |
[in] | attr_type | : Identifies the data element type of the attribute |
| SDP_AddAtribute Types |
Value | Description |
0 | Nil, the null type |
1 | Unsigned Integer |
2 | Signed twos-complement integer |
3 | UUID, a universally unique identifier |
4 | Text string |
5 | Boolean |
6 | Data element sequence, a data element whose data field |
| is a sequence of data elements. |
7 | Data element alternative, data element whose data field |
| is a sequence of data elements from which one data element |
| is to be selected. |
8 | URL, a uniform resource locator |
9-31 | Reserved |
- Parameters
-
[in] | attr_len | : The length of the attribute, in bytes. |
[in] | p_val | : A pointer to the attribute value to be stored in the record. |
- Returns
- TRUE : If added OK FALSE : Else
Function SDP_AddProtocolList
Description This function is called to add a protocol descriptor list to a record. This would be through the SDP database maintenance API. If the protocol list already exists in the record, it is replaced with the new list.
- Parameters
-
[in] | handle | : The identifier of the record to be added |
[in] | num_elem | : The number of elements in the list |
[in] | p_elem_list | : A pointer to the first protocol element structure in the array to be stored in the record. |
- Returns
- TRUE : If added OK FALSE : Else
SDP_API BOOLEAN SDP_AddServiceClassIdList |
( |
UINT32 |
handle, |
|
|
UINT16 |
num_services, |
|
|
UINT16 * |
p_service_uuids |
|
) |
| |
Function SDP_AddServiceClassIdList
Description This function is called to add a service list to a record. This would be through the SDP database maintenance API. If the service list already exists in the record, it is replaced with the new list.
- Parameters
-
[in] | handle | : The identifier of the record to be added |
[in] | num_services | : The number of service class IDs in the list |
[in] | p_service_uuids | : A pointer to the first service class id UUID in the array |
- Returns
- TRUE : If added OK FALSE : Else
Function SDP_AddUuidSequence
Description This function is called to add a UUID sequence to a record. This would be through the SDP database maintenance API. If the sequence already exists in the record, it is replaced with the new sequence.
- Parameters
-
[in] | handle | : The identifier of the record to be added |
[in] | attr_id | : Identifies the attribute being added (UUID) |
[in] | num_uuids | : The number of UUIDs being added |
[in] | p_uuids | : A pointer to the first UUID in the array to be stored in the record |
- Returns
- TRUE : If added OK FALSE : Else
SDP_API UINT32 SDP_CreateRecord |
( |
void |
| ) |
|
Function SDP_CreateRecord
Description This function is called to create a record in the database. This would be through the SDP database maintenance API. The record is created empty, the application should then call "add_attribute" to add the record's attributes.
- Returns
- Record handle : If OK 0 : Else
Function wiced_bt_sdp_cancel_service_search
Cancel service search request
- Parameters
-
[in] | p_db | : Discovery database of the request being cancelled |
- Returns
- TRUE if discovery cancelled, FALSE if a matching activity is not found.
wiced_bool_t wiced_bt_sdp_db_init |
( |
uint8_t * |
p_sdp_db, |
|
|
uint16_t |
size |
|
) |
| |
Function wiced_bt_sdp_db_init
Initialize local SDP server database (database generated using WICED Smart/SmartReady Designer)
- Parameters
-
[in] | p_sdp_db | First element in database array |
[in] | size | size (in bytes) of SDP database |
- Returns
- TRUE if successful, FALSE otherwise
Function wiced_bt_sdp_find_attribute_in_db
Parse results from service search. Look next record in discovery database
containing attribute ID.
- Parameters
-
[in] | p_db | : Discovery results database |
[in] | attr_id | : Attribute ID to find |
[in] | p_start_rec | : Starting record to search from (if NULL, start from beginning of database) |
- Returns
- Pointer to matching record, or NULL
Function wiced_bt_sdp_find_attribute_in_rec
Parse SDP record. Look for requested attribute in the service record.
- Parameters
-
[in] | p_rec | : Service record |
[in] | attr_id | : Attribute ID to find |
- Returns
- Pointer to matching attribute entry, or NULL
Function wiced_bt_sdp_find_profile_version_in_rec
Parse SDP record. Look for version of requested profile.
- Parameters
-
[in] | p_rec | : Service record |
[in] | profile_uuid | Profile to find |
[out] | p_version | : Major/minor version of profile (if found) |
- Returns
- TRUE if found, FALSE if not
Function wiced_bt_sdp_find_protocol_list_elem_in_rec
Parse SDP record. Look for requested protocol list element in the service record.
- Parameters
-
[in] | p_rec | : Service record |
[in] | layer_uuid | : protocol list element to find |
[out] | p_elem | : protocol list element (if found) |
- Returns
- TRUE if found, else FALSE
Function wiced_bt_sdp_find_protocol_lists_elem_in_rec
Parse SDP record. Look for requested protocol lists element in the service record.
- Parameters
-
[in] | p_rec | : Service record |
[in] | layer_uuid | : protocol lists element to find |
[out] | p_elem | : protocol lists element (if found) |
- Returns
- TRUE if found, else FALSE
Function wiced_bt_sdp_find_service_in_db
Parse results from service search. Look next record in discovery database
containing requested service UUID (specified using uint16_t)
- Parameters
-
[in] | p_db | : Discovery results database |
[in] | service_uuid | Service to find |
[in] | p_start_rec | : Starting record to search from (if NULL, start from beginning of database) |
- Returns
- Pointer to matching record, or NULL
Function wiced_bt_sdp_find_service_uuid_in_db
Parse results from service search. Look next record in discovery database
containing requested service UUID (specified using wiced_bt_uuid_t structure)
- Parameters
-
[in] | p_db | : Discovery results database |
[in] | p_uuid | : Service to find |
[in] | p_start_rec | : Starting record to search from (if NULL, start from beginning of database) |
- Returns
- Pointer to matching record, or NULL
Function wiced_bt_sdp_find_service_uuid_in_rec
Parse SDP record. Look for service UUID
- Parameters
-
[in] | p_rec | : Service record |
[out] | p_uuid | : Service UUID of the record |
- Returns
- TRUE if found, FALSE if not
Function wiced_bt_sdp_init_discovery_db
Initialize discovery database prior to performing service
discovery (using #wiced_bt_sdp_service_search_request or
#wiced_bt_sdp_service_search_request).
Provides a list of UUIDs and/or attribute IDs to search for.
- Parameters
-
[in] | p_db | : Discovery database to initialize |
[in] | len | : size of discovery database |
[in] | num_uuid | : Number of UUIDs in p_uuid_list |
[in] | p_uuid_list | : UUIDs to add to discovery database |
[in] | num_attr | : Number of attributes in p_attr_list |
[in] | p_attr_list | : Attributes to add to discovery database |
- Returns
- TRUE if successful, FALSE if one or more parameters are bad
Function wiced_bt_sdp_service_search_attribute_request
Initiate combined service search and attribute request on remote device
- Parameters
-
[in] | p_bd_addr | : Remote device address |
[in] | p_db | : Discovery database of UUIDs and attribute IDs to search for (intialized using wiced_bt_sdp_init_discovery_db) |
[in] | p_cb | : Callback for discovery results |
- Returns
- TRUE if discovery started, FALSE if failed.
Function wiced_bt_sdp_service_search_request
Initiate service search on remote device
- Parameters
-
[in] | p_bd_addr | : Remote device address |
[in] | p_db | : Discovery database of UUIDs and attribute IDs to search for (intialized using wiced_bt_sdp_init_discovery_db) |
[in] | p_cb | : Callback for discovery results |
- Returns
- TRUE if discovery started, FALSE if failed.