From 4aa2e4479668939d65951df0702aa36d81409e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 30 Dec 2023 01:08:31 +0100 Subject: [PATCH] spa: move dbus helpers out of bluez plugin The file is moved into a new "include-private" directory. This is done because otherwise adjustments would have to be made to the list of installed headers, the way include tests currently work and which files are used for generating documentation. --- .../bluez5 => include-private/spa-private}/dbus-helpers.h | 8 ++++---- spa/meson.build | 1 + spa/plugins/bluez5/backend-hsphfpd.c | 2 +- spa/plugins/bluez5/backend-native.c | 2 +- spa/plugins/bluez5/backend-ofono.c | 2 +- spa/plugins/bluez5/bluez5-dbus.c | 2 +- spa/plugins/bluez5/modemmanager.c | 2 +- spa/plugins/bluez5/player.c | 2 +- spa/plugins/bluez5/upower.c | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) rename spa/{plugins/bluez5 => include-private/spa-private}/dbus-helpers.h (92%) diff --git a/spa/plugins/bluez5/dbus-helpers.h b/spa/include-private/spa-private/dbus-helpers.h similarity index 92% rename from spa/plugins/bluez5/dbus-helpers.h rename to spa/include-private/spa-private/dbus-helpers.h index 22aed58a5..55a664d5d 100644 --- a/spa/plugins/bluez5/dbus-helpers.h +++ b/spa/include-private/spa-private/dbus-helpers.h @@ -1,9 +1,9 @@ -/* Spa Bluez5 DBus helpers */ +/* Spa DBus helpers */ /* SPDX-FileCopyrightText: Copyright © 2023 PipeWire authors */ /* SPDX-License-Identifier: MIT */ -#ifndef SPA_BLUEZ5_DBUS_HELPERS_H -#define SPA_BLUEZ5_DBUS_HELPERS_H +#ifndef SPA_PRIVATE_DBUS_HELPERS_H +#define SPA_PRIVATE_DBUS_HELPERS_H #include @@ -69,4 +69,4 @@ SPA_DEFINE_AUTO_CLEANUP(DBusError, DBusError, { dbus_error_free(thing); }) -#endif /* SPA_BLUEZ5_DBUS_HELPERS_H */ +#endif /* SPA_PRIVATE_DBUS_HELPERS_H */ diff --git a/spa/meson.build b/spa/meson.build index 145769a2e..2fb5811bc 100644 --- a/spa/meson.build +++ b/spa/meson.build @@ -8,6 +8,7 @@ spa_dep = declare_dependency( include_directories : [ include_directories('include'), + include_directories('include-private'), ], dependencies : [atomic_dep], version : spaversion, diff --git a/spa/plugins/bluez5/backend-hsphfpd.c b/spa/plugins/bluez5/backend-hsphfpd.c index 81296f32a..ddbae1c3c 100644 --- a/spa/plugins/bluez5/backend-hsphfpd.c +++ b/spa/plugins/bluez5/backend-hsphfpd.c @@ -16,9 +16,9 @@ #include #include #include +#include #include "defs.h" -#include "dbus-helpers.h" SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.bluez5.hsphfpd"); #undef SPA_LOG_TOPIC_DEFAULT diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index ed1d1218f..ecea26d18 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "defs.h" @@ -33,7 +34,6 @@ #include #endif -#include "dbus-helpers.h" #include "modemmanager.h" #include "upower.h" diff --git a/spa/plugins/bluez5/backend-ofono.c b/spa/plugins/bluez5/backend-ofono.c index 9452eb7f1..42dd0eceb 100644 --- a/spa/plugins/bluez5/backend-ofono.c +++ b/spa/plugins/bluez5/backend-ofono.c @@ -20,9 +20,9 @@ #include #include #include +#include #include "defs.h" -#include "dbus-helpers.h" #define INITIAL_INTERVAL_NSEC (500 * SPA_NSEC_PER_MSEC) #define ACTION_INTERVAL_NSEC (3000 * SPA_NSEC_PER_MSEC) diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c index 9a5a60855..e914629a8 100644 --- a/spa/plugins/bluez5/bluez5-dbus.c +++ b/spa/plugins/bluez5/bluez5-dbus.c @@ -32,10 +32,10 @@ #include #include #include +#include #include "config.h" #include "codec-loader.h" -#include "dbus-helpers.h" #include "player.h" #include "iso-io.h" #include "bap-codec-caps.h" diff --git a/spa/plugins/bluez5/modemmanager.c b/spa/plugins/bluez5/modemmanager.c index e0beee7bc..f30876f5c 100644 --- a/spa/plugins/bluez5/modemmanager.c +++ b/spa/plugins/bluez5/modemmanager.c @@ -4,10 +4,10 @@ #include #include +#include #include -#include "dbus-helpers.h" #include "modemmanager.h" #define DBUS_INTERFACE_OBJECTMANAGER "org.freedesktop.DBus.ObjectManager" diff --git a/spa/plugins/bluez5/player.c b/spa/plugins/bluez5/player.c index 6b2f5fbac..7b267e7d4 100644 --- a/spa/plugins/bluez5/player.c +++ b/spa/plugins/bluez5/player.c @@ -7,9 +7,9 @@ #include #include +#include #include "defs.h" -#include "dbus-helpers.h" #include "player.h" #define PLAYER_OBJECT_PATH_BASE "/media_player" diff --git a/spa/plugins/bluez5/upower.c b/spa/plugins/bluez5/upower.c index badb8d58a..17c324c2f 100644 --- a/spa/plugins/bluez5/upower.c +++ b/spa/plugins/bluez5/upower.c @@ -4,8 +4,8 @@ #include #include +#include -#include "dbus-helpers.h" #include "upower.h" #define UPOWER_SERVICE "org.freedesktop.UPower"