summaryrefslogtreecommitdiffstats
path: root/src/modules/bluetooth/bluetooth-util.h
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2010-10-07 17:22:41 +0300
committerLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2010-10-07 17:22:41 +0300
commit8f3ef04b4310bfbbe0aa8042585340e1832cacf6 (patch)
treeeca67c7b2b395b6a3d063db89efe1c8c818f07b2 /src/modules/bluetooth/bluetooth-util.h
parent3de129f3ac8dd6cf51178b266837db4d5e4a1215 (diff)
bluetooth: Add support for Media API
Make use of D-Bus to transfer file descriptors.
Diffstat (limited to 'src/modules/bluetooth/bluetooth-util.h')
-rw-r--r--src/modules/bluetooth/bluetooth-util.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/modules/bluetooth/bluetooth-util.h b/src/modules/bluetooth/bluetooth-util.h
index 9cee3de3..ce551967 100644
--- a/src/modules/bluetooth/bluetooth-util.h
+++ b/src/modules/bluetooth/bluetooth-util.h
@@ -25,6 +25,7 @@
#include <dbus/dbus.h>
#include <pulsecore/llist.h>
+#include <pulsecore/strlist.h>
#include <pulsecore/macro.h>
#include <pulsecore/core-util.h>
@@ -45,6 +46,7 @@
typedef struct pa_bluetooth_uuid pa_bluetooth_uuid;
typedef struct pa_bluetooth_device pa_bluetooth_device;
typedef struct pa_bluetooth_discovery pa_bluetooth_discovery;
+typedef struct pa_bluetooth_transport pa_bluetooth_transport;
struct userdata;
@@ -53,6 +55,23 @@ struct pa_bluetooth_uuid {
PA_LLIST_FIELDS(pa_bluetooth_uuid);
};
+enum profile {
+ PROFILE_A2DP,
+ PROFILE_A2DP_SOURCE,
+ PROFILE_HSP,
+ PROFILE_HFGW,
+ PROFILE_OFF
+};
+
+struct pa_bluetooth_transport {
+ pa_bluetooth_discovery *y;
+ char *path;
+ enum profile profile;
+ uint8_t codec;
+ uint8_t *config;
+ int config_size;
+};
+
/* This enum is shared among Audio, Headset, AudioSink, and AudioSource, although not all values are acceptable in all profiles */
typedef enum pa_bt_audio_state {
PA_BT_AUDIO_STATE_INVALID = -1,
@@ -70,6 +89,7 @@ struct pa_bluetooth_device {
/* Device information */
char *name;
char *path;
+ pa_hashmap *transports;
int paired;
char *alias;
int device_connected;
@@ -103,6 +123,12 @@ void pa_bluetooth_discovery_sync(pa_bluetooth_discovery *d);
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *d, const char* path);
const pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address);
+const pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discovery *y, const char *path);
+const pa_bluetooth_transport* pa_bluetooth_device_get_transport(const pa_bluetooth_device *d, enum profile profile);
+
+int pa_bluetooth_transport_acquire(const pa_bluetooth_transport *t, const char *accesstype);
+void pa_bluetooth_transport_release(const pa_bluetooth_transport *t, const char *accesstype);
+
pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *d);
const char* pa_bluetooth_get_form_factor(uint32_t class);