summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/a2dp.c2
-rw-r--r--audio/a2dp.h4
-rw-r--r--audio/avdtp.c8
-rw-r--r--audio/avdtp.h6
-rw-r--r--audio/ctl_bluetooth.c2
-rw-r--r--audio/device.c6
-rw-r--r--audio/device.h10
-rw-r--r--audio/error.c4
-rw-r--r--audio/error.h2
-rw-r--r--audio/gateway.c5
-rw-r--r--audio/gateway.h2
-rw-r--r--audio/headset.c1
-rw-r--r--audio/headset.h7
-rw-r--r--audio/ipc.h9
-rw-r--r--audio/main.c5
-rw-r--r--audio/manager.c4
-rw-r--r--audio/manager.h5
-rw-r--r--audio/sink.c4
-rw-r--r--audio/sink.h4
-rw-r--r--audio/unix.c5
-rw-r--r--audio/unix.h2
21 files changed, 42 insertions, 55 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c
index 03cb8868..fd355302 100644
--- a/audio/a2dp.c
+++ b/audio/a2dp.c
@@ -30,11 +30,13 @@
#include <dbus/dbus.h>
#include <glib.h>
+#include <bluetooth/bluetooth.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
#include "logging.h"
#include "manager.h"
+#include "ipc.h"
#include "device.h"
#include "avdtp.h"
#include "sink.h"
diff --git a/audio/a2dp.h b/audio/a2dp.h
index 708f9f94..b2653594 100644
--- a/audio/a2dp.h
+++ b/audio/a2dp.h
@@ -21,10 +21,6 @@
*
*/
-#include <dbus.h>
-#include <glib.h>
-#include "avdtp.h"
-
#define A2DP_CODEC_SBC 0x00
#define A2DP_CODEC_MPEG12 0x01
#define A2DP_CODEC_MPEG24 0x02
diff --git a/audio/avdtp.c b/audio/avdtp.c
index 3dafc1bc..febef897 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
@@ -26,6 +26,7 @@
#endif
#include <stdio.h>
+#include <stdint.h>
#include <errno.h>
#include <unistd.h>
#include <assert.h>
@@ -34,9 +35,12 @@
#include <glib.h>
-#include "avdtp.h"
-#include "logging.h"
+#include <bluetooth/bluetooth.h>
+
#include "dbus.h"
+#include "logging.h"
+
+#include "avdtp.h"
#include <bluetooth/l2cap.h>
diff --git a/audio/avdtp.h b/audio/avdtp.h
index 67fb38df..f7ca6308 100644
--- a/audio/avdtp.h
+++ b/audio/avdtp.h
@@ -20,11 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
-#ifndef __AVDTP_H__
-#define __AVDTP_H__
-
-#include <stdint.h>
-#include <bluetooth/bluetooth.h>
struct avdtp;
struct avdtp_stream;
@@ -208,4 +203,3 @@ void avdtp_get_peers(struct avdtp *session, bdaddr_t *src, bdaddr_t *dst);
int avdtp_init(void);
void avdtp_exit(void);
-#endif
diff --git a/audio/ctl_bluetooth.c b/audio/ctl_bluetooth.c
index 411d7e00..9e1c320c 100644
--- a/audio/ctl_bluetooth.c
+++ b/audio/ctl_bluetooth.c
@@ -31,6 +31,8 @@
#include <alsa/asoundlib.h>
#include <alsa/control_external.h>
+#include <bluetooth/bluetooth.h>
+
#include "ipc.h"
#ifdef ENABLE_DEBUG
diff --git a/audio/device.c b/audio/device.c
index 54d4bb6f..119a4e4f 100644
--- a/audio/device.c
+++ b/audio/device.c
@@ -37,15 +37,19 @@
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
+#include <bluetooth/sdp.h>
+#include <bluetooth/sdp_lib.h>
#include "dbus.h"
#include "dbus-helper.h"
#include "logging.h"
#include "textfile.h"
+#include "ipc.h"
+#include "device.h"
+#include "avdtp.h"
#include "headset.h"
#include "sink.h"
-#include "device.h"
static DBusHandlerResult device_get_address(DBusConnection *conn,
DBusMessage *msg, void *data)
diff --git a/audio/device.h b/audio/device.h
index 5782dd99..80a95906 100644
--- a/audio/device.h
+++ b/audio/device.h
@@ -20,14 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
-#ifndef __AUDIO_DEVICE_H__
-#define __AUDIO_DEVICE_H__
-
-#include <bluetooth/bluetooth.h>
-#include <dbus/dbus.h>
-#include <glib.h>
-
-#include "ipc.h"
#define AUDIO_DEVICE_INTERFACE "org.bluez.audio.Device"
@@ -87,5 +79,3 @@ int device_get_config(struct device *dev, int sock, struct ipc_packet *req,
void device_set_state(struct device *dev, uint8_t state);
uint8_t device_get_state(struct device *dev);
-
-#endif
diff --git a/audio/error.c b/audio/error.c
index 275eb2a7..3bec2f61 100644
--- a/audio/error.c
+++ b/audio/error.c
@@ -25,6 +25,10 @@
#include <config.h>
#endif
+#include <dbus/dbus.h>
+
+#include "dbus.h"
+
#include "error.h"
#include "logging.h"
diff --git a/audio/error.h b/audio/error.h
index de4e8982..712ee20d 100644
--- a/audio/error.h
+++ b/audio/error.h
@@ -21,8 +21,6 @@
*
*/
-#include "dbus.h"
-
DBusHandlerResult err_invalid_args(DBusConnection *conn,
DBusMessage *msg, const char *descr);
DBusHandlerResult err_already_connected(DBusConnection *conn, DBusMessage *msg);
diff --git a/audio/gateway.c b/audio/gateway.c
index d91a2225..66db457f 100644
--- a/audio/gateway.c
+++ b/audio/gateway.c
@@ -25,4 +25,9 @@
#include <config.h>
#endif
+#include <stdint.h>
+
+#include <glib.h>
+#include <dbus/dbus.h>
+
#include "gateway.h"
diff --git a/audio/gateway.h b/audio/gateway.h
index 7fddb33c..572457c9 100644
--- a/audio/gateway.h
+++ b/audio/gateway.h
@@ -21,8 +21,6 @@
*
*/
-#include "device.h"
-
#define AUDIO_GATEWAY_INTERFACE "org.bluez.audio.Gateway"
int gateway_init(DBusConnection *conn, gboolean disable_hfp, gboolean sco_hci);
diff --git a/audio/headset.c b/audio/headset.c
index 3a01dbb1..b0e67ba2 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -51,6 +51,7 @@
#include "dbus.h"
#include "dbus-helper.h"
#include "logging.h"
+#include "ipc.h"
#include "device.h"
#include "manager.h"
#include "error.h"
diff --git a/audio/headset.h b/audio/headset.h
index ec57f1d8..2a65d136 100644
--- a/audio/headset.h
+++ b/audio/headset.h
@@ -20,13 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
-#include <bluetooth/sdp.h>
-#include <bluetooth/sdp_lib.h>
-
-#include <dbus/dbus.h>
-
-#include "ipc.h"
-#include "device.h"
#define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset"
diff --git a/audio/ipc.h b/audio/ipc.h
index 473efc05..77997496 100644
--- a/audio/ipc.h
+++ b/audio/ipc.h
@@ -20,10 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
-#ifndef __AUDIO_IPC_H__
-#define __AUDIO_IPC_H__
-
-#include <stdint.h>
#define IPC_TYPE_CONNECT 0x0001
@@ -78,7 +74,8 @@ struct ipc_packet {
#define CFG_CODEC_SBC 1
struct ipc_data_cfg {
- uint8_t fd_opt; /* Stream file descriptor options: read, write or readwrite*/
+ uint8_t fd_opt; /* Stream file descriptor options: read,
+ write or readwrite */
uint8_t channels; /* Number of audio channel */
uint8_t channel_mode; /* Audio channel mode*/
uint16_t pkt_len; /* Stream packet length */
@@ -133,5 +130,3 @@ struct ipc_data_ctl {
uint8_t mode; /* Control Mode */
uint8_t key; /* Control Key */
} __attribute__ ((packed));
-
-#endif
diff --git a/audio/main.c b/audio/main.c
index 72e54133..9e677354 100644
--- a/audio/main.c
+++ b/audio/main.c
@@ -26,15 +26,18 @@
#endif
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <glib.h>
-
#include <dbus/dbus.h>
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/sdp.h>
#include "dbus.h"
#include "logging.h"
+#include "ipc.h"
#include "unix.h"
#include "manager.h"
diff --git a/audio/manager.c b/audio/manager.c
index dd0907f6..7a650054 100644
--- a/audio/manager.c
+++ b/audio/manager.c
@@ -48,12 +48,14 @@
#include <dbus/dbus.h>
#include "dbus-helper.h"
+#include "dbus.h"
#include "logging.h"
#include "textfile.h"
+#include "ipc.h"
#include "device.h"
#include "error.h"
-#include "a2dp.h"
#include "avdtp.h"
+#include "a2dp.h"
#include "headset.h"
#include "gateway.h"
#include "sink.h"
diff --git a/audio/manager.h b/audio/manager.h
index 993c1057..a18cf4fd 100644
--- a/audio/manager.h
+++ b/audio/manager.h
@@ -21,11 +21,6 @@
*
*/
-#include <bluetooth/sdp.h>
-#include <dbus/dbus.h>
-
-#include "device.h"
-
#define MAX_PATH_LENGTH 64 /* D-Bus path */
#define AUDIO_MANAGER_PATH "/org/bluez/audio"
#define AUDIO_MANAGER_INTERFACE "org.bluez.audio.Manager"
diff --git a/audio/sink.c b/audio/sink.c
index 08a862cf..155170e6 100644
--- a/audio/sink.c
+++ b/audio/sink.c
@@ -25,16 +25,20 @@
#include <config.h>
#endif
+#include <stdint.h>
#include <errno.h>
#include <glib.h>
#include <dbus/dbus.h>
+#include <bluetooth/bluetooth.h>
+
#include "dbus.h"
#include "dbus-helper.h"
#include "logging.h"
#include "avdtp.h"
+#include "ipc.h"
#include "device.h"
#include "a2dp.h"
#include "error.h"
diff --git a/audio/sink.h b/audio/sink.h
index 4cb5d0c3..7894a36c 100644
--- a/audio/sink.h
+++ b/audio/sink.h
@@ -21,10 +21,6 @@
*
*/
-#include "ipc.h"
-#include "avdtp.h"
-#include "device.h"
-
#define AUDIO_SINK_INTERFACE "org.bluez.audio.Sink"
struct sink *sink_init(struct device *dev);
diff --git a/audio/unix.c b/audio/unix.c
index 8a65df8e..d977633c 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -33,13 +33,16 @@
#include <unistd.h>
#include <stdint.h>
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/sdp.h>
+#include <dbus/dbus.h>
#include <glib.h>
#include "logging.h"
#include "dbus.h"
+#include "ipc.h"
#include "device.h"
#include "manager.h"
-#include "ipc.h"
#include "unix.h"
struct unix_client {
diff --git a/audio/unix.h b/audio/unix.h
index 83e2518a..7f42688c 100644
--- a/audio/unix.h
+++ b/audio/unix.h
@@ -21,8 +21,6 @@
*
*/
-#include "ipc.h"
-
int unix_init(void);
void unix_exit(void);