sdp_qeuery_rfcomm: delete sdp_query_rfcomm_deregister_callback

This commit is contained in:
Matthias Ringwald 2016-01-21 12:55:42 +01:00
parent f2924d79ff
commit 8937488244
5 changed files with 13 additions and 17 deletions

View File

@ -1329,7 +1329,6 @@ static int daemon_client_handler(connection_t *connection, uint16_t packet_type,
case DAEMON_EVENT_CONNECTION_CLOSED:
log_info("DAEMON_EVENT_CONNECTION_CLOSED %p\n",connection);
daemon_disconnect_client(connection);
sdp_query_rfcomm_deregister_callback();
// no clients -> no HCI connections
if (!clients){
hci_disconnect_all();

View File

@ -53,7 +53,8 @@ extern "C" {
/* API_START */
/**
* @brief Queries the SDP service of the remote device given a service search pattern and a list of attribute IDs. The remote data is handled by the SDP parser. The SDP parser delivers attribute values and done event via a registered callback.
* @brief Queries the SDP service of the remote device given a service search pattern and a list of attribute IDs.
* The remote data is handled by the SDP parser. The SDP parser delivers attribute values and done event via a registered callback.
*/
void sdp_client_query(bd_addr_t remote, uint8_t * des_serviceSearchPattern, uint8_t * des_attributeIDList);

View File

@ -111,13 +111,23 @@ typedef struct sdp_query_service_record_handle_event {
*/
void sdp_parser_init(void);
/*
* @brief Registers a callback to receive attribute value data and parse complete event.
*/
void sdp_parser_register_callback(void (*sdp_callback)(sdp_query_event_t * event));
/*
* @brief
*/
void sdp_parser_handle_chunk(uint8_t * data, uint16_t size);
#ifdef HAVE_SDP_EXTRA_QUERIES
/*
* @brief
*/
void sdp_parser_handle_done(uint8_t status);
#ifdef HAVE_SDP_EXTRA_QUERIES
/*
* @brief
*/
@ -134,12 +144,6 @@ void sdp_parser_init_service_search(void);
void sdp_parser_handle_service_search(uint8_t * data, uint16_t total_count, uint16_t record_handle_count);
#endif
void sdp_parser_handle_done(uint8_t status);
/*
* @brief Registers a callback to receive attribute value data and parse complete event.
*/
void sdp_parser_register_callback(void (*sdp_callback)(sdp_query_event_t * event));
/* API_END */

View File

@ -317,9 +317,3 @@ void sdp_query_rfcomm_channel_and_name_for_uuid(bd_addr_t remote, uint16_t uuid)
net_store_16(des_serviceSearchPattern, 3, uuid);
sdp_query_rfcomm_channel_and_name_for_search_pattern(remote, (uint8_t*)des_serviceSearchPattern);
}
void sdp_query_rfcomm_deregister_callback(void){
sdp_query_rfcomm_init();
sdp_app_callback = dummy_notify_app;
sdp_app_context = NULL;
}

View File

@ -68,8 +68,6 @@ typedef struct sdp_query_rfcomm_service_event {
*/
void sdp_query_rfcomm_register_callback(void(*sdp_app_callback)(sdp_query_event_t * event, void * context), void * context);
void sdp_query_rfcomm_deregister_callback(void);
/**
* @brief Searches SDP records on a remote device for RFCOMM services with a given UUID.
*/