From 5068f85cacab59bf740dea059c6cc46ea66b4993 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Sun, 28 Apr 2019 22:54:30 -0700 Subject: binding: bluetooth: use BLUEZ_AT_DEVICE macro Use the BLUEZ_AT_DEVICE macro instead of explicit string references. Bug-AGL: SPEC-2361 Change-Id: Icddf5914433123e65d2a7d40629bab362b60c1c1 Signed-off-by: Matt Ranostay --- binding/bluetooth-api.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/binding/bluetooth-api.c b/binding/bluetooth-api.c index 8b7d66a..a7c3edd 100644 --- a/binding/bluetooth-api.c +++ b/binding/bluetooth-api.c @@ -76,7 +76,7 @@ static void mediaplayer1_connect_disconnect(struct bluetooth_state *ns, *g_strrstr(path, "/") = '\0'; for (; *tmp; tmp++) { - reply = bluez_call(ns, "device", path, state ? "ConnectProfile" : "DisconnectProfile", g_variant_new("(&s)", *tmp), NULL); + reply = bluez_call(ns, BLUEZ_AT_DEVICE, path, state ? "ConnectProfile" : "DisconnectProfile", g_variant_new("(&s)", *tmp), NULL); if (!reply) break; } @@ -997,11 +997,11 @@ static void bluetooth_connect_device(afb_req_t request) afb_req_addref(request); if (uuid) - cw->cpw = bluez_call_async(ns, "device", device, + cw->cpw = bluez_call_async(ns, BLUEZ_AT_DEVICE, device, "ConnectProfile", g_variant_new("(&s)", uuid), &error, connect_service_callback, cw); else - cw->cpw = bluez_call_async(ns, "device", device, + cw->cpw = bluez_call_async(ns, BLUEZ_AT_DEVICE, device, "Connect", NULL, &error, connect_service_callback, cw); @@ -1110,7 +1110,7 @@ static void bluetooth_pair_device(afb_req_t request) cw->request = request; afb_req_addref(request); - cw->cpw = bluez_call_async(ns, "device", device, "Pair", NULL, &error, + cw->cpw = bluez_call_async(ns, BLUEZ_AT_DEVICE, device, "Pair", NULL, &error, pair_service_callback, cw); if (!cw->cpw) { @@ -1219,7 +1219,7 @@ static void bluetooth_remove_device(afb_req_t request) return; } - jval = bluez_get_property(ns, "device", device, FALSE, "Adapter", &error); + jval = bluez_get_property(ns, BLUEZ_AT_DEVICE, device, FALSE, "Adapter", &error); if (!jval) { afb_req_fail_f(request, "failed", -- cgit 1.2.3-korg