chore: bluez5: move spa_bt_monitor to common header file

This commit is contained in:
Dmitry Sharshakov 2021-03-09 10:33:40 +03:00 committed by Wim Taymans
parent 0078b3b73e
commit a1ed8aec68
2 changed files with 43 additions and 40 deletions

View file

@ -53,46 +53,6 @@
#define NAME "bluez5-monitor"
struct spa_bt_monitor {
struct spa_handle handle;
struct spa_device device;
struct spa_log *log;
struct spa_loop *main_loop;
struct spa_system *main_system;
struct spa_dbus *dbus;
struct spa_dbus_connection *dbus_connection;
DBusConnection *conn;
struct spa_hook_list hooks;
uint32_t count;
uint32_t id;
/*
* Lists of BlueZ objects, kept up-to-date by following DBus events
* initiated by BlueZ. Object lifetime is also determined by that.
*/
struct spa_list adapter_list;
struct spa_list device_list;
struct spa_list remote_endpoint_list;
struct spa_list transport_list;
unsigned int filters_added:1;
unsigned int objects_listed:1;
struct spa_bt_backend *backend_native;
struct spa_bt_backend *backend_ofono;
struct spa_bt_backend *backend_hsphfpd;
struct spa_dict enabled_codecs;
unsigned int enable_sbc_xq:1;
unsigned int backend_native_registered:1;
unsigned int backend_ofono_registered:1;
unsigned int backend_hsphfpd_registered:1;
};
/* Stream endpoints owned by BlueZ for each device */
struct spa_bt_remote_endpoint {
struct spa_list link;

View file

@ -33,8 +33,11 @@ extern "C" {
#include <spa/support/log.h>
#include <spa/support/loop.h>
#include <spa/support/plugin.h>
#include <spa/monitor/device.h>
#include <spa/utils/hook.h>
#include <dbus/dbus.h>
#include "config.h"
#define BLUEZ_SERVICE "org.bluez"
@ -366,6 +369,46 @@ struct spa_bt_device_events {
void (*profiles_changed) (void *data, uint32_t prev_profiles, uint32_t prev_connected);
};
struct spa_bt_monitor {
struct spa_handle handle;
struct spa_device device;
struct spa_log *log;
struct spa_loop *main_loop;
struct spa_system *main_system;
struct spa_dbus *dbus;
struct spa_dbus_connection *dbus_connection;
DBusConnection *conn;
struct spa_hook_list hooks;
uint32_t count;
uint32_t id;
/*
* Lists of BlueZ objects, kept up-to-date by following DBus events
* initiated by BlueZ. Object lifetime is also determined by that.
*/
struct spa_list adapter_list;
struct spa_list device_list;
struct spa_list remote_endpoint_list;
struct spa_list transport_list;
unsigned int filters_added:1;
unsigned int objects_listed:1;
struct spa_bt_backend *backend_native;
struct spa_bt_backend *backend_ofono;
struct spa_bt_backend *backend_hsphfpd;
struct spa_dict enabled_codecs;
unsigned int enable_sbc_xq:1;
unsigned int backend_native_registered:1;
unsigned int backend_ofono_registered:1;
unsigned int backend_hsphfpd_registered:1;
};
struct spa_bt_device {
struct spa_list link;
struct spa_bt_monitor *monitor;