]> code.delx.au - pulseaudio/blobdiff - src/modules/bluetooth/module-bluetooth-proximity.c
Merge remote branch 'tanuk/master'
[pulseaudio] / src / modules / bluetooth / module-bluetooth-proximity.c
index 4cfaaf5be37435644b281fe4d1856bb61b5d28bc..c4cfd733ad1237c571ff44c1f3749593a8e427f6 100644 (file)
@@ -5,7 +5,7 @@
 
   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 of the License,
+  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
@@ -42,8 +42,8 @@
 #include <pulsecore/core-util.h>
 #include <pulsecore/core-error.h>
 #include <pulsecore/start-child.h>
+#include <pulsecore/dbus-shared.h>
 
-#include "../dbus-util.h"
 #include "module-bluetooth-proximity-symdef.h"
 
 PA_MODULE_AUTHOR("Lennart Poettering");
@@ -103,26 +103,26 @@ static void update_volume(struct userdata *u) {
 
         u->muted = FALSE;
 
-        if (!(s = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK, FALSE))) {
+        if (!(s = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK))) {
             pa_log_warn("Sink device '%s' not available for unmuting.", pa_strnull(u->sink_name));
             return;
         }
 
         pa_log_info("Found %u BT devices, unmuting.", u->n_found);
-        pa_sink_set_mute(s, FALSE);
+        pa_sink_set_mute(s, FALSE, FALSE);
 
     } else if (!u->muted && (u->n_found+u->n_unknown) <= 0) {
         pa_sink *s;
 
         u->muted = TRUE;
 
-        if (!(s = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK, FALSE))) {
+        if (!(s = pa_namereg_get(u->module->core, u->sink_name, PA_NAMEREG_SINK))) {
             pa_log_warn("Sink device '%s' not available for muting.", pa_strnull(u->sink_name));
             return;
         }
 
         pa_log_info("No BT devices found, muting.");
-        pa_sink_set_mute(s, TRUE);
+        pa_sink_set_mute(s, TRUE, FALSE);
 
     } else
         pa_log_info("%u devices now active, %u with unknown state.", u->n_found, u->n_unknown);
@@ -302,7 +302,7 @@ static DBusHandlerResult filter_func(DBusConnection *connection, DBusMessage *m,
 
         bonding_new(u, a);
 
-        return DBUS_HANDLER_RESULT_HANDLED;
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 
     } else if (dbus_message_is_signal(m, "org.bluez.Adapter", "BondingRemoved")) {
 
@@ -315,7 +315,7 @@ static DBusHandlerResult filter_func(DBusConnection *connection, DBusMessage *m,
 
         bonding_remove(u, a);
 
-        return DBUS_HANDLER_RESULT_HANDLED;
+        return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
     }
 
 finish: