mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
bluetooth: Create NULL backend
This commit is contained in:
parent
2198048e5d
commit
dca5d07937
5 changed files with 64 additions and 1 deletions
37
src/modules/bluetooth/backend-null.c
Normal file
37
src/modules/bluetooth/backend-null.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/***
|
||||
This file is part of PulseAudio.
|
||||
|
||||
Copyright 2013 João Paulo Rechi Vita
|
||||
|
||||
PulseAudio is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
PulseAudio is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with PulseAudio; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA.
|
||||
***/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <pulsecore/log.h>
|
||||
|
||||
#include "bluez5-util.h"
|
||||
|
||||
pa_bluetooth_backend *pa_bluetooth_backend_new(pa_core *c) {
|
||||
pa_log_debug("Bluetooth Headset Backend API support disabled");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void pa_bluetooth_backend_free(pa_bluetooth_backend *b) {
|
||||
/* Nothing to do here */
|
||||
}
|
||||
|
|
@ -87,6 +87,7 @@ struct pa_bluetooth_discovery {
|
|||
pa_hashmap *devices;
|
||||
pa_hashmap *transports;
|
||||
|
||||
pa_bluetooth_backend *backend;
|
||||
PA_LLIST_HEAD(pa_dbus_pending, pending);
|
||||
};
|
||||
|
||||
|
|
@ -1590,6 +1591,7 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) {
|
|||
|
||||
endpoint_init(y, PA_BLUETOOTH_PROFILE_A2DP_SINK);
|
||||
endpoint_init(y, PA_BLUETOOTH_PROFILE_A2DP_SOURCE);
|
||||
y->backend = pa_bluetooth_backend_new(c);
|
||||
|
||||
get_managed_objects(y);
|
||||
|
||||
|
|
@ -1631,6 +1633,9 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) {
|
|||
pa_hashmap_free(y->transports);
|
||||
}
|
||||
|
||||
if (y->backend)
|
||||
pa_bluetooth_backend_free(y->backend);
|
||||
|
||||
if (y->connection) {
|
||||
|
||||
if (y->matches_added)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ typedef struct pa_bluetooth_transport pa_bluetooth_transport;
|
|||
typedef struct pa_bluetooth_device pa_bluetooth_device;
|
||||
typedef struct pa_bluetooth_adapter pa_bluetooth_adapter;
|
||||
typedef struct pa_bluetooth_discovery pa_bluetooth_discovery;
|
||||
typedef struct pa_bluetooth_backend pa_bluetooth_backend;
|
||||
|
||||
typedef enum pa_bluetooth_hook {
|
||||
PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED, /* Call data: pa_bluetooth_device */
|
||||
|
|
@ -105,6 +106,9 @@ struct pa_bluetooth_adapter {
|
|||
bool valid;
|
||||
};
|
||||
|
||||
pa_bluetooth_backend *pa_bluetooth_backend_new(pa_core *c);
|
||||
void pa_bluetooth_backend_free(pa_bluetooth_backend *b);
|
||||
|
||||
pa_bluetooth_transport *pa_bluetooth_transport_new(pa_bluetooth_device *d, const char *owner, const char *path,
|
||||
pa_bluetooth_profile_t p, const uint8_t *config, size_t size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue