Barnabás Pőcze
6e581deb91
spa: bluez: use spa_autoptr for DBusMessage
2023-07-30 13:45:49 +02:00
Barnabás Pőcze
146665893e
spa: bluez: upower: keep track of pending call
...
Keep track of the DBusPendingCall and cancel it when being destroyed,
furthermore, create `update_battery_percentage()` and don't duplicate code.
2023-07-15 01:08:24 +02:00
Barnabás Pőcze
708e5443ae
spa: bluez: add steal_reply_and_unref() helper
...
This function retrieves the reply from a DBusPendingCall and unrefs the call.
2023-07-15 01:04:23 +02:00
Barnabás Pőcze
183270f53c
spa: bluez: add cancel_and_unref() dbus helper
...
This function cancels and unrefs a DBusPendingCall and
resets the pointer to NULL.
2023-07-15 01:04:22 +02:00
Barnabás Pőcze
36bfd5263f
spa: bluez: do not check if service is running
...
It is inherently racy, and we have a better way to ensure that
we won't autostart the service:
dbus_message_set_auto_start()
So use that.
This commit also adds a missing call to `dbus_pending_call_unref()`
and indirectly fixes a type mismatch (`dbus_bool_t` vs. `bool`)
that was present in `is_dbus_service_running()`.
2023-05-03 11:27:25 +00:00
Barnabás Pőcze
934ab3036e
treewide: use SPDX tags to specify copyright information
...
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.
See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Frédéric Danis
47700a2214
bluez5: backend-native: Add battery level indicator support
...
This connect to the UPower service and update the +CIND battchg indicator
2022-10-05 19:31:50 +00:00