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 struct bt_sco *bt_sco_new(const bdaddr_t *local_bdaddr);
33 struct bt_sco *bt_sco_ref(struct bt_sco *sco);
34 void bt_sco_unref(struct bt_sco *sco);
36 bool bt_sco_connect(struct bt_sco *sco, const bdaddr_t *remote_addr,
37 uint16_t voice_settings);
38 void bt_sco_disconnect(struct bt_sco *sco);
39 bool bt_sco_get_fd_and_mtu(struct bt_sco *sco, int *fd, uint16_t *mtu);
41 typedef bool (*bt_sco_confirm_func_t) (const bdaddr_t *remote_addr,
42 uint16_t *voice_settings);
43 typedef void (*bt_sco_conn_func_t) (enum sco_status status,
44 const bdaddr_t *addr);
45 typedef void (*bt_sco_disconn_func_t) (const bdaddr_t *addr);
47 void bt_sco_set_confirm_cb(struct bt_sco *sco,
48 bt_sco_confirm_func_t func);
49 void bt_sco_set_connect_cb(struct bt_sco *sco, bt_sco_conn_func_t func);
50 void bt_sco_set_disconnect_cb(struct bt_sco *sco,
51 bt_sco_disconn_func_t func);