bluez5: Rename backend-hsp-native to backend-native

This commit is contained in:
Frédéric Danis 2021-01-04 15:50:03 +01:00
parent 219248d43e
commit 00cce32514
4 changed files with 18 additions and 18 deletions

View file

@ -38,7 +38,7 @@
#include "defs.h"
#define NAME "hsp-native"
#define NAME "native"
struct spa_bt_backend {
struct spa_bt_monitor *monitor;
@ -265,7 +265,7 @@ static int sco_release_cb(void *data)
struct spa_bt_transport *t = data;
struct spa_bt_backend *backend = t->backend;
spa_log_info(backend->log, "Transport %s released", t->path);
spa_log_info(backend->log, NAME": Transport %s released", t->path);
if (t->sco_io) {
spa_bt_sco_io_destroy(t->sco_io);
@ -640,20 +640,20 @@ static int register_profile(struct spa_bt_backend *backend, const char *profile,
return 0;
}
void backend_hsp_native_register_profiles(struct spa_bt_backend *backend)
void backend_native_register_profiles(struct spa_bt_backend *backend)
{
register_profile(backend, PROFILE_HSP_AG, SPA_BT_UUID_HSP_AG);
register_profile(backend, PROFILE_HSP_HS, SPA_BT_UUID_HSP_HS);
}
void backend_hsp_native_free(struct spa_bt_backend *backend)
void backend_native_free(struct spa_bt_backend *backend)
{
dbus_connection_unregister_object_path(backend->conn, PROFILE_HSP_AG);
dbus_connection_unregister_object_path(backend->conn, PROFILE_HSP_HS);
free(backend);
}
struct spa_bt_backend *backend_hsp_native_new(struct spa_bt_monitor *monitor,
struct spa_bt_backend *backend_native_new(struct spa_bt_monitor *monitor,
void *dbus_connection,
const struct spa_support *support,
uint32_t n_support)

View file

@ -75,7 +75,7 @@ struct spa_bt_monitor {
unsigned int filters_added:1;
unsigned int objects_listed:1;
struct spa_bt_backend *backend_hsp_native;
struct spa_bt_backend *backend_native;
struct spa_bt_backend *backend_ofono;
struct spa_bt_backend *backend_hsphfpd;
@ -1750,7 +1750,7 @@ static void interface_added(struct spa_bt_monitor *monitor,
adapter_register_application(a);
}
else if (strcmp(interface_name, BLUEZ_PROFILE_MANAGER_INTERFACE) == 0) {
backend_hsp_native_register_profiles(monitor->backend_hsp_native);
backend_native_register_profiles(monitor->backend_native);
}
else if (strcmp(interface_name, BLUEZ_DEVICE_INTERFACE) == 0) {
struct spa_bt_device *d;
@ -2133,9 +2133,9 @@ static int impl_clear(struct spa_handle *handle)
spa_list_consume(a, &monitor->adapter_list, link)
adapter_free(a);
if (monitor->backend_hsp_native) {
backend_hsp_native_free(monitor->backend_hsp_native);
monitor->backend_hsp_native = NULL;
if (monitor->backend_native) {
backend_native_free(monitor->backend_native);
monitor->backend_native = NULL;
}
if (monitor->backend_ofono) {
@ -2213,7 +2213,7 @@ impl_init(const struct spa_handle_factory *factory,
this->enable_sbc_xq = true;
}
this->backend_hsp_native = backend_hsp_native_new(this, this->conn, support, n_support);
this->backend_native = backend_native_new(this, this->conn, support, n_support);
this->backend_ofono = backend_ofono_new(this, this->conn, info, support, n_support);
this->backend_hsphfpd = backend_hsphfpd_new(this, this->conn, info, support, n_support);

View file

@ -431,21 +431,21 @@ static inline enum spa_bt_transport_state spa_bt_transport_state_from_string(con
#ifdef HAVE_BLUEZ_5_BACKEND_NATIVE
struct spa_bt_backend *backend_hsp_native_new(struct spa_bt_monitor *monitor,
struct spa_bt_backend *backend_native_new(struct spa_bt_monitor *monitor,
void *dbus_connection,
const struct spa_support *support,
uint32_t n_support);
void backend_hsp_native_free(struct spa_bt_backend *backend);
void backend_hsp_native_register_profiles(struct spa_bt_backend *backend);
void backend_native_free(struct spa_bt_backend *backend);
void backend_native_register_profiles(struct spa_bt_backend *backend);
#else
static inline struct spa_bt_backend *backend_hsp_native_new(struct spa_bt_monitor *monitor,
static inline struct spa_bt_backend *backend_native_new(struct spa_bt_monitor *monitor,
void *dbus_connection,
const struct spa_support *support,
uint32_t n_support) {
return NULL;
}
static inline void backend_hsp_native_free(struct spa_bt_backend *backend) {}
static inline void backend_hsp_native_register_profiles(struct spa_bt_backend *backend) {}
static inline void backend_native_free(struct spa_bt_backend *backend) {}
static inline void backend_native_register_profiles(struct spa_bt_backend *backend) {}
#endif
#ifdef HAVE_BLUEZ_5_BACKEND_OFONO

View file

@ -34,7 +34,7 @@ if fdk_aac_dep.found()
endif
if get_option('bluez5-backend-native')
bluez5_sources += ['backend-hsp-native.c']
bluez5_sources += ['backend-native.c']
endif
if get_option('bluez5-backend-ofono')