1/*
2 *
3 *  BlueZ - Bluetooth protocol stack for Linux
4 *
5 *  Copyright (C) 2006-2010  Nokia Corporation
6 *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
7 *
8 *
9 *  This program is free software; you can redistribute it and/or modify
10 *  it under the terms of the GNU General Public License as published by
11 *  the Free Software Foundation; either version 2 of the License, or
12 *  (at your option) any later version.
13 *
14 *  This program is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this program; if not, write to the Free Software
21 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22 *
23 */
24
25#define AUDIO_CONTROL_INTERFACE "org.bluez.Control"
26
27typedef enum {
28	AVCTP_STATE_DISCONNECTED = 0,
29	AVCTP_STATE_CONNECTING,
30	AVCTP_STATE_CONNECTED
31} avctp_state_t;
32
33typedef void (*avctp_state_cb) (struct audio_device *dev,
34				avctp_state_t old_state,
35				avctp_state_t new_state,
36				void *user_data);
37
38unsigned int avctp_add_state_cb(avctp_state_cb cb, void *user_data);
39gboolean avctp_remove_state_cb(unsigned int id);
40
41int avrcp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config);
42void avrcp_unregister(const bdaddr_t *src);
43
44gboolean avrcp_connect(struct audio_device *dev);
45void avrcp_disconnect(struct audio_device *dev);
46
47struct control *control_init(struct audio_device *dev, uint16_t uuid16);
48void control_update(struct audio_device *dev, uint16_t uuid16);
49void control_unregister(struct audio_device *dev);
50gboolean control_is_active(struct audio_device *dev);
51