diff options
author | 2022-02-28 12:12:15 -0500 | |
---|---|---|
committer | 2022-02-28 13:02:17 -0500 | |
commit | 045d4a1ffc823665b068be96b5d8532e68838e18 (patch) | |
tree | 160650b6af968e1d5d899737005ae0682ea958c1 /include/bluez-glib.h | |
parent | 0a7ac44764e96898370bdd14badfb484ad9d3fc7 (diff) |
Media control enablement and bug fixesricefish_18.0.3ricefish_18.0.2ricefish_18.0.1ricefish_18.0.0ricefish/18.0.3ricefish/18.0.2ricefish/18.0.1ricefish/18.0.0quillback_17.1.4quillback_17.1.3quillback_17.1.2quillback_17.1.1quillback_17.1.0quillback_17.0.2quillback_17.0.1quillback_17.0.0quillback/17.1.4quillback/17.1.3quillback/17.1.2quillback/17.1.1quillback/17.1.0quillback/17.0.2quillback/17.0.1quillback/17.0.0needlefish_13.93.0needlefish/13.93.0marlin_12.93.0marlin/12.93.0lamprey_12.1.6lamprey_12.1.5lamprey_12.1.4lamprey_12.1.3lamprey_12.1.2lamprey/12.1.6lamprey/12.1.5lamprey/12.1.4lamprey/12.1.3lamprey/12.1.2devtool-patcheddevtool-base18.0.318.0.218.0.118.0.017.1.417.1.317.1.217.1.117.1.017.0.217.0.117.0.013.93.012.93.012.1.612.1.512.1.412.1.312.1.2
Changes:
- Properly split out media control and transport callbacks, working
on an implementation in a client pointed out some issues that
needed to be fixed.
- Add new exported API functions bluez_get_media_control_properties
and bluez_get_media_player_properties to simplify the ability of
clients to determine the current state. This is more required now
for the usecase of standalone clients starting up separately as
opposed to having a binding tracking the state for them.
- Added logic in bluez_devices_signal_callback to be paranoid about
the input to the callback, as it became clear from debugging that
having two different libraries use g_dbus_connection_signal_subscribe
in the same process results in the separately registered callbacks
all getting called with the superset of the filtered signal requests.
At best this leads to confusion with respect to logging/debugging, at
worst it opens the door to tripping over unexpected inputs in the
callbacks.
- Fixed the device path being passed to bluez_autoconnect, this seems
to re-enable the workaround wrt devices disconnecting after the
initial connect. Further investigation is required into what
happens here, but the behavior now seems to match the pre-refactored
code in the binding.
- Added a couple of DEBUG statements to allow vetting the arguments
passed to g_dbus_connection_call in a couple of places.
- Fix install of the test program if building it is enabled with the
meson option.
Bug-AGL: SPEC-4231
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Iba5bb6e4bde3a9f4172d11b9eefdddf8c5da2203
Diffstat (limited to 'include/bluez-glib.h')
-rw-r--r-- | include/bluez-glib.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/bluez-glib.h b/include/bluez-glib.h index 25abecb..257effb 100644 --- a/include/bluez-glib.h +++ b/include/bluez-glib.h @@ -75,11 +75,17 @@ typedef void (*bluez_device_event_cb_t)(gchar *adapter, typedef void (*bluez_media_control_event_cb_t)(gchar *adapter, gchar *device, - gchar *endpoint, bluez_event_t event, GVariant *properties, gpointer user_data); +typedef void (*bluez_media_transport_event_cb_t)(gchar *adapter, + gchar *device, + gchar *endpoint, + bluez_event_t event, + GVariant *properties, + gpointer user_data); + typedef void (*bluez_media_player_event_cb_t)(gchar *adapter, gchar *device, gchar *player, @@ -104,6 +110,8 @@ void bluez_add_media_control_event_callback(bluez_media_control_event_cb_t cb, g void bluez_add_media_player_event_callback(bluez_media_player_event_cb_t cb, gpointer user_data); +void bluez_add_media_transport_event_callback(bluez_media_transport_event_cb_t cb, gpointer user_data); + void bluez_add_agent_event_callback(bluez_agent_event_cb_t cb, gpointer user_data); void bluez_set_log_level(bluez_log_level_t level); @@ -154,6 +162,10 @@ gboolean bluez_device_avrcp_controls(const char *device, bluez_media_control_t a gboolean bluez_set_pincode(const char *pincode); +gboolean bluez_get_media_control_properties(const char *device, GVariant **reply); + +gboolean bluez_get_media_player_properties(const char *device, GVariant **reply); + #ifdef __cplusplus } // extern "C" #endif |