• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  *  BlueZ - Bluetooth protocol stack for Linux
4  *
5  *  Copyright (C) 2006-2007  Nokia Corporation
6  *  Copyright (C) 2004-2009  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 
27 typedef enum {
28 	AVCTP_STATE_DISCONNECTED = 0,
29 	AVCTP_STATE_CONNECTING,
30 	AVCTP_STATE_CONNECTED
31 } avctp_state_t;
32 
33 typedef 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 
38 unsigned int avctp_add_state_cb(avctp_state_cb cb, void *user_data);
39 gboolean avctp_remove_state_cb(unsigned int id);
40 
41 int avrcp_register(DBusConnection *conn, const bdaddr_t *src, GKeyFile *config);
42 void avrcp_unregister(const bdaddr_t *src);
43 
44 gboolean avrcp_connect(struct audio_device *dev);
45 void avrcp_disconnect(struct audio_device *dev);
46 
47 struct control *control_init(struct audio_device *dev, uint16_t uuid16);
48 void control_update(struct audio_device *dev, uint16_t uuid16);
49 void control_unregister(struct audio_device *dev);
50 gboolean control_is_active(struct audio_device *dev);
51