diff options
author | Denis Kenzior <denkenz@gmail.com> | 2013-02-21 08:30:03 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2013-02-21 08:30:03 -0600 |
commit | 2f8b9ab50c946f72689601d435f183e249c653dd (patch) | |
tree | 613cab48266b12f62343179bafa2d900ed9c0412 /plugins/bluez5.c | |
parent | 951e03dfeadf4d4594c886c17792b7d47034d4de (diff) | |
download | ofono-2f8b9ab50c946f72689601d435f183e249c653dd.tar.bz2 |
bluez5: ref / unref handsfree audio
Diffstat (limited to 'plugins/bluez5.c')
-rw-r--r-- | plugins/bluez5.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/bluez5.c b/plugins/bluez5.c index 9233a2b2..788f3a25 100644 --- a/plugins/bluez5.c +++ b/plugins/bluez5.c @@ -35,6 +35,7 @@ #include <ofono/dbus.h> #include <ofono/plugin.h> #include <ofono/log.h> +#include <ofono/handsfree-audio.h> #include <gdbus/gdbus.h> #include "bluez5.h" @@ -256,5 +257,17 @@ void bt_disconnect_profile(DBusConnection *conn, cb, user_data); } +static int bluez5_init(void) +{ + ofono_handsfree_audio_ref(); + + return 0; +} + +static void bluez5_exit(void) +{ + ofono_handsfree_audio_unref(); +} + OFONO_PLUGIN_DEFINE(bluez5, "BlueZ 5 Utils Plugin", VERSION, - OFONO_PLUGIN_PRIORITY_DEFAULT, NULL, NULL) + OFONO_PLUGIN_PRIORITY_DEFAULT, bluez5_init, bluez5_exit) |