3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2014 Intel Corporation. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include "lib/bluetooth.h"
35 #include "a2dp-sink.h"
37 static struct ipc *hal_ipc = NULL;
39 static void bt_a2dp_sink_connect(const void *buf, uint16_t len)
45 ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_A2DP_SINK, HAL_OP_A2DP_CONNECT,
46 HAL_STATUS_UNSUPPORTED);
49 static void bt_a2dp_sink_disconnect(const void *buf, uint16_t len)
55 ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_A2DP_SINK, HAL_OP_A2DP_DISCONNECT,
56 HAL_STATUS_UNSUPPORTED);
59 static const struct ipc_handler cmd_handlers[] = {
60 /* HAL_OP_A2DP_CONNECT */
61 { bt_a2dp_sink_connect, false, sizeof(struct hal_cmd_a2dp_connect) },
62 /* HAL_OP_A2DP_DISCONNECT */
63 { bt_a2dp_sink_disconnect, false,
64 sizeof(struct hal_cmd_a2dp_disconnect) },
67 bool bt_a2dp_sink_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode)
72 ipc_register(hal_ipc, HAL_SERVICE_ID_A2DP_SINK, cmd_handlers,
73 G_N_ELEMENTS(cmd_handlers));
78 void bt_a2dp_sink_unregister(void)
82 ipc_unregister(hal_ipc, HAL_SERVICE_ID_A2DP_SINK);