[pulseaudio-discuss] [RFCv2 01/17] bluetooth: Track org.ofono service
Mikel Astiz
mikel.astiz.oss at gmail.com
Thu Apr 18 06:30:23 PDT 2013
Hi João Paulo,
On Mon, Apr 15, 2013 at 11:53 PM, <jprvita at gmail.com> wrote:
> From: João Paulo Rechi Vita <jprvita at openbossa.org>
>
> ---
> src/modules/bluetooth/bluetooth-util.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
> index 01bdc3e..260c24e 100644
> --- a/src/modules/bluetooth/bluetooth-util.c
> +++ b/src/modules/bluetooth/bluetooth-util.c
> @@ -1325,7 +1325,18 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
> }
> }
>
> + if (pa_streq(name, "org.ofono")) {
> + if (old_owner && *old_owner) {
> + pa_log_debug("oFono disappeared");
> + }
No braces needed.
> +
> + if (new_owner && *new_owner) {
> + pa_log_debug("oFono appeared");
> + }
Same here.
> + }
> +
> return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
> +
Unrelated line added.
> } else if (dbus_message_is_signal(m, "org.bluez.MediaTransport", "PropertyChanged")) {
> pa_bluetooth_transport *t;
> DBusMessageIter arg_i;
> @@ -2170,6 +2181,8 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) {
> ",arg0='org.bluez.Device1'",
> "type='signal',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
> ",arg0='org.bluez.MediaTransport1'",
> + "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',"
> + "arg0='org.ofono'",
> NULL) < 0) {
> pa_log("Failed to add D-Bus matches: %s", err.message);
> goto fail;
> @@ -2245,6 +2258,8 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) {
> "type='signal',sender='org.bluez',interface='org.bluez.MediaTransport',member='PropertyChanged'",
> "type='signal',sender='org.bluez',interface='org.freedesktop.DBus.ObjectManager',member='InterfacesAdded'",
> "type='signal',sender='org.bluez',interface='org.freedesktop.DBus.ObjectManager',member='InterfacesRemoved'",
> + "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',"
> + "arg0='org.ofono'",
As a general comment beyond this specific patch, as already discussed,
it'd be good that we have the backends in place before mixing all
this.
Cheers,
Mikel
More information about the pulseaudio-discuss
mailing list