Blame profiles/audio/a2dp.h

Packit 34410b
/*
Packit 34410b
 *
Packit 34410b
 *  BlueZ - Bluetooth protocol stack for Linux
Packit 34410b
 *
Packit 34410b
 *  Copyright (C) 2006-2010  Nokia Corporation
Packit 34410b
 *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
Packit 34410b
 *  Copyright (C) 2011  BMW Car IT GmbH. All rights reserved.
Packit 34410b
 *
Packit 34410b
 *
Packit 34410b
 *  This program is free software; you can redistribute it and/or modify
Packit 34410b
 *  it under the terms of the GNU General Public License as published by
Packit 34410b
 *  the Free Software Foundation; either version 2 of the License, or
Packit 34410b
 *  (at your option) any later version.
Packit 34410b
 *
Packit 34410b
 *  This program 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
Packit 34410b
 *  GNU General Public License for more details.
Packit 34410b
 *
Packit 34410b
 *  You should have received a copy of the GNU General Public License
Packit 34410b
 *  along with this program; 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
struct a2dp_sep;
Packit 34410b
struct a2dp_setup;
Packit 34410b
Packit 34410b
typedef void (*a2dp_endpoint_select_t) (struct a2dp_setup *setup, void *ret,
Packit 34410b
					int size);
Packit 34410b
typedef void (*a2dp_endpoint_config_t) (struct a2dp_setup *setup, gboolean ret);
Packit 34410b
Packit 34410b
struct a2dp_endpoint {
Packit 34410b
	const char *(*get_name) (struct a2dp_sep *sep, void *user_data);
Packit 34410b
	const char *(*get_path) (struct a2dp_sep *sep, void *user_data);
Packit 34410b
	size_t (*get_capabilities) (struct a2dp_sep *sep,
Packit 34410b
						uint8_t **capabilities,
Packit 34410b
						void *user_data);
Packit 34410b
	int (*select_configuration) (struct a2dp_sep *sep,
Packit 34410b
						uint8_t *capabilities,
Packit 34410b
						size_t length,
Packit 34410b
						struct a2dp_setup *setup,
Packit 34410b
						a2dp_endpoint_select_t cb,
Packit 34410b
						void *user_data);
Packit 34410b
	int (*set_configuration) (struct a2dp_sep *sep,
Packit 34410b
						uint8_t *configuration,
Packit 34410b
						size_t length,
Packit 34410b
						struct a2dp_setup *setup,
Packit 34410b
						a2dp_endpoint_config_t cb,
Packit 34410b
						void *user_data);
Packit 34410b
	void (*clear_configuration) (struct a2dp_sep *sep, void *user_data);
Packit 34410b
	void (*set_delay) (struct a2dp_sep *sep, uint16_t delay,
Packit 34410b
							void *user_data);
Packit 34410b
};
Packit 34410b
Packit 34410b
typedef void (*a2dp_discover_cb_t) (struct avdtp *session, GSList *seps,
Packit 34410b
						int err, void *user_data);
Packit 34410b
typedef void (*a2dp_select_cb_t) (struct avdtp *session,
Packit 34410b
					struct a2dp_sep *sep, GSList *caps,
Packit 34410b
					void *user_data);
Packit 34410b
typedef void (*a2dp_config_cb_t) (struct avdtp *session, struct a2dp_sep *sep,
Packit 34410b
					struct avdtp_stream *stream, int err,
Packit 34410b
					void *user_data);
Packit 34410b
typedef void (*a2dp_stream_cb_t) (struct avdtp *session, int err,
Packit 34410b
					void *user_data);
Packit 34410b
Packit 34410b
struct a2dp_sep *a2dp_add_sep(struct btd_adapter *adapter, uint8_t type,
Packit 34410b
				uint8_t codec, gboolean delay_reporting,
Packit 34410b
				struct a2dp_endpoint *endpoint,
Packit 34410b
				void *user_data, GDestroyNotify destroy,
Packit 34410b
				int *err);
Packit 34410b
void a2dp_remove_sep(struct a2dp_sep *sep);
Packit 34410b
Packit 34410b
Packit 34410b
unsigned int a2dp_discover(struct avdtp *session, a2dp_discover_cb_t cb,
Packit 34410b
							void *user_data);
Packit 34410b
unsigned int a2dp_select_capabilities(struct avdtp *session,
Packit 34410b
					uint8_t type, const char *sender,
Packit 34410b
					a2dp_select_cb_t cb,
Packit 34410b
					void *user_data);
Packit 34410b
unsigned int a2dp_config(struct avdtp *session, struct a2dp_sep *sep,
Packit 34410b
				a2dp_config_cb_t cb, GSList *caps,
Packit 34410b
				void *user_data);
Packit 34410b
unsigned int a2dp_resume(struct avdtp *session, struct a2dp_sep *sep,
Packit 34410b
				a2dp_stream_cb_t cb, void *user_data);
Packit 34410b
unsigned int a2dp_suspend(struct avdtp *session, struct a2dp_sep *sep,
Packit 34410b
				a2dp_stream_cb_t cb, void *user_data);
Packit 34410b
gboolean a2dp_cancel(unsigned int id);
Packit 34410b
Packit 34410b
gboolean a2dp_sep_lock(struct a2dp_sep *sep, struct avdtp *session);
Packit 34410b
gboolean a2dp_sep_unlock(struct a2dp_sep *sep, struct avdtp *session);
Packit 34410b
struct avdtp_stream *a2dp_sep_get_stream(struct a2dp_sep *sep);
Packit 34410b
struct btd_device *a2dp_setup_get_device(struct a2dp_setup *setup);
Packit 34410b
const char *a2dp_setup_remote_path(struct a2dp_setup *setup);
Packit 34410b
struct avdtp *a2dp_avdtp_get(struct btd_device *device);