sdp_client: add sdp_client_register_query_callback() allows to register query request instead of polling sdp_client_ready()

This commit is contained in:
Matthias Ringwald 2020-08-21 13:43:16 +02:00
parent e094740e06
commit b443d25d72
2 changed files with 4 additions and 4 deletions

View File

@ -312,7 +312,7 @@ void sdp_parser_handle_service_search(uint8_t * data, uint16_t total_count, uint
#endif
static void sdp_client_notify_callbacks(void){
if (!sdp_client_ready) {
if (sdp_client_ready() == false) {
return;
}
btstack_context_callback_registration_t * callback = btstack_linked_list_pop(&sdp_client_query_requests);
@ -702,7 +702,7 @@ void sdp_client_reset(void){
// Public API
int sdp_client_ready(void){
bool sdp_client_ready(void){
return sdp_client_state == INIT;
}

View File

@ -65,9 +65,9 @@ int de_state_size(uint8_t eventByte, de_state_t *de_state);
/**
* @brief Checks if the SDP Client is ready
* @deprecated Please use sdp_client_register_query_callback instead
* @return 1 when no query is active
* @return true when no query is active
*/
int sdp_client_ready(void);
bool sdp_client_ready(void);
/**
* @brief Requests a callback, when the SDP Client is ready and can be used