summaryrefslogtreecommitdiffstats
path: root/plugins/hfp_hf_bluez5.c
diff options
context:
space:
mode:
authorPaulo Borges <paulo.borges@openbossa.org>2013-02-27 18:49:13 -0300
committerDenis Kenzior <denkenz@gmail.com>2013-03-01 13:22:35 -0600
commit80212a3db2d5a0b1cccb84ae183a917175d34a8a (patch)
treef6d27f9c19241cbe3df0c30a7170ddebe86aba36 /plugins/hfp_hf_bluez5.c
parentcf6137c1872e7f0b00f2ed5c27c7f35dff083d80 (diff)
downloadofono-80212a3db2d5a0b1cccb84ae183a917175d34a8a.tar.bz2
bluez5: Move ref / unref handsfree audio
This commit moves the ref / unref to hfp_hf_bluez5 to make bluez5 more generic and reusable.
Diffstat (limited to 'plugins/hfp_hf_bluez5.c')
-rw-r--r--plugins/hfp_hf_bluez5.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c
index 2db2fa5a..e84af732 100644
--- a/plugins/hfp_hf_bluez5.c
+++ b/plugins/hfp_hf_bluez5.c
@@ -48,6 +48,7 @@
#include <ofono/call-volume.h>
#include <ofono/handsfree-audio.h>
#include <ofono/handsfree.h>
+#include <ofono/handsfree-audio.h>
#include <drivers/hfpmodem/slc.h>
@@ -729,6 +730,8 @@ static int hfp_init(void)
g_dbus_client_set_proxy_handlers(bluez, proxy_added, NULL,
property_changed, NULL);
+ ofono_handsfree_audio_ref();
+
return 0;
}
@@ -744,6 +747,8 @@ static void hfp_exit(void)
if (sco_watch > 0)
g_source_remove(sco_watch);
+
+ ofono_handsfree_audio_unref();
}
OFONO_PLUGIN_DEFINE(hfp_bluez5, "External Hands-Free Profile Plugin", VERSION,