Blame android/sco.h

Packit 34410b
/*
Packit 34410b
 *
Packit 34410b
 *  BlueZ - Bluetooth protocol stack for Linux
Packit 34410b
 *
Packit 34410b
 *  Copyright (C) 2014  Intel Corporation. All rights reserved.
Packit 34410b
 *
Packit 34410b
 *
Packit 34410b
 *  This library is free software; you can redistribute it and/or
Packit 34410b
 *  modify it under the terms of the GNU Lesser General Public
Packit 34410b
 *  License as published by the Free Software Foundation; either
Packit 34410b
 *  version 2.1 of the License, or (at your option) any later version.
Packit 34410b
 *
Packit 34410b
 *  This library is distributed in the hope that it will be useful,
Packit 34410b
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 34410b
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 34410b
 *  Lesser General Public License for more details.
Packit 34410b
 *
Packit 34410b
 *  You should have received a copy of the GNU Lesser General Public
Packit 34410b
 *  License along with this library; if not, write to the Free Software
Packit 34410b
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Packit 34410b
 *
Packit 34410b
 */
Packit 34410b
Packit 34410b
enum sco_status {
Packit 34410b
	SCO_STATUS_OK,
Packit 34410b
	SCO_STATUS_ERROR,
Packit 34410b
};
Packit 34410b
Packit 34410b
struct bt_sco;
Packit 34410b
Packit 34410b
struct bt_sco *bt_sco_new(const bdaddr_t *local_bdaddr);
Packit 34410b
Packit 34410b
struct bt_sco *bt_sco_ref(struct bt_sco *sco);
Packit 34410b
void bt_sco_unref(struct bt_sco *sco);
Packit 34410b
Packit 34410b
bool bt_sco_connect(struct bt_sco *sco, const bdaddr_t *remote_addr,
Packit 34410b
						uint16_t voice_settings);
Packit 34410b
void bt_sco_disconnect(struct bt_sco *sco);
Packit 34410b
bool bt_sco_get_fd_and_mtu(struct bt_sco *sco, int *fd, uint16_t *mtu);
Packit 34410b
Packit 34410b
typedef bool (*bt_sco_confirm_func_t) (const bdaddr_t *remote_addr,
Packit 34410b
						uint16_t *voice_settings);
Packit 34410b
typedef void (*bt_sco_conn_func_t) (enum sco_status status,
Packit 34410b
							const bdaddr_t *addr);
Packit 34410b
typedef void (*bt_sco_disconn_func_t) (const bdaddr_t *addr);
Packit 34410b
Packit 34410b
void bt_sco_set_confirm_cb(struct bt_sco *sco,
Packit 34410b
					bt_sco_confirm_func_t func);
Packit 34410b
void bt_sco_set_connect_cb(struct bt_sco *sco, bt_sco_conn_func_t func);
Packit 34410b
void bt_sco_set_disconnect_cb(struct bt_sco *sco,
Packit 34410b
						bt_sco_disconn_func_t func);