mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
sdp_client: add sdp_client_register_query_callback() allows to register query request instead of polling sdp_client_ready()
This commit is contained in:
parent
e094740e06
commit
b443d25d72
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user