diff options
author | Matt Porter <mporter@konsulko.com> | 2018-05-10 12:41:35 -0400 |
---|---|---|
committer | Matt Porter <mporter@konsulko.com> | 2018-05-11 19:07:54 -0400 |
commit | 4e454de545544526cbea9d787df9ba76cb99d889 (patch) | |
tree | 23174d8ac18edf3b3d849b1747f5cf9810305814 /telephony-binding/gdbus | |
parent | 8256ad1306337dc343683f5479e1a08764f1111a (diff) |
telephony binding: support runtime change of BT HFP modem
The binding currently only queries for a BT HFP enabled modem
once at binding init time.
To support runtime modem changes, use BT binding events to
handle connection and disconnection of BT HFP devices. The
default voice call modem is now torn down on device disconnect
and initialized when a new BT HFP device is connected at runtime.
Bug-AGL: SPEC-1433
Change-Id: Icea7686ef5ecb80b0d33560e4499ca1fd6285147
Signed-off-by: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'telephony-binding/gdbus')
-rw-r--r-- | telephony-binding/gdbus/ofono_manager.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/telephony-binding/gdbus/ofono_manager.c b/telephony-binding/gdbus/ofono_manager.c index a77623d..98b0fdc 100644 --- a/telephony-binding/gdbus/ofono_manager.c +++ b/telephony-binding/gdbus/ofono_manager.c @@ -50,7 +50,6 @@ int ofono_manager_set_default_modem(const char *address) gchar *path, *key; const gchar *name = NULL, *type = NULL, *serial = NULL; gboolean powered = FALSE, online = FALSE; - GVariantIter *iter, *iter2 = NULL; int ret = 0; @@ -95,10 +94,6 @@ int ofono_manager_set_default_modem(const char *address) int ofono_manager_init() { - GVariant *out_arg = NULL, *next, *value; - GError *error = NULL; - GVariantIter *iter, *iter2 = NULL; - gchar *path, *key; int ret = 0; if (manager) { @@ -115,29 +110,6 @@ int ofono_manager_init() return -1; } - org_ofono_manager_call_get_modems_sync(manager, &out_arg, NULL, &error); - if (error == NULL) { - g_variant_get(out_arg, "a(oa{sv})", &iter); - next = g_variant_iter_next_value(iter); - if (next) { - g_variant_get(next, "(oa{sv})", &path, &iter2); - default_modem.path = path; - while (g_variant_iter_loop(iter2, "{sv}", &key, &value)) { - if (!strcmp(key, "Name")) - default_modem.name = g_variant_get_string(value, NULL); - else if (!strcmp(key, "Type")) - default_modem.type = g_variant_get_string(value, NULL); - else if (!strcmp(key, "Powered")) - default_modem.powered = g_variant_get_boolean(value); - else if (!strcmp(key, "Online")) - default_modem.online = g_variant_get_boolean(value); - } - } else { - ret = -1; - } - } else { - ret = -1; - } return ret; } |