avrcp_browsing.c (f25e60dece291970e0c7612fc7fda3d74ae3ceba) avrcp_browsing.c (b93f89661ecd1d19be40311be96b92932960a800)
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 622 unchanged lines hidden (view full) ---

631
632 if (!connection_controller->browsing_connection){
633 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
634 }
635 if (!connection_target->browsing_connection){
636 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
637 }
638
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 622 unchanged lines hidden (view full) ---

631
632 if (!connection_controller->browsing_connection){
633 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
634 }
635 if (!connection_target->browsing_connection){
636 return ERROR_CODE_UNKNOWN_CONNECTION_IDENTIFIER;
637 }
638
639 l2cap_disconnect(connection_controller->browsing_connection->l2cap_browsing_cid, 0);
639 l2cap_disconnect(connection_controller->browsing_connection->l2cap_browsing_cid);
640 return ERROR_CODE_SUCCESS;
641}
642
643void avrcp_browsing_register_controller_packet_handler(btstack_packet_handler_t callback){
644 avrcp_browsing_controller_packet_handler = callback;
645}
646
647void avrcp_browsing_register_target_packet_handler(btstack_packet_handler_t callback){
648 avrcp_browsing_target_packet_handler = callback;
649}
650
651void avrcp_browsing_register_packet_handler(btstack_packet_handler_t callback){
652 btstack_assert(callback != NULL);
653 avrcp_browsing_callback = callback;
654}
640 return ERROR_CODE_SUCCESS;
641}
642
643void avrcp_browsing_register_controller_packet_handler(btstack_packet_handler_t callback){
644 avrcp_browsing_controller_packet_handler = callback;
645}
646
647void avrcp_browsing_register_target_packet_handler(btstack_packet_handler_t callback){
648 avrcp_browsing_target_packet_handler = callback;
649}
650
651void avrcp_browsing_register_packet_handler(btstack_packet_handler_t callback){
652 btstack_assert(callback != NULL);
653 avrcp_browsing_callback = callback;
654}