From 30b84ed96f8fc03fc5a73bbe97a86d76899ab8cc Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Fri, 14 Jun 2019 17:56:41 -0700 Subject: binding: bluetooth-map: add message access support Add support for retrieving messages, and listing handles of messages located in folders. SPEC-2512 Change-Id: Ia345488b51f5cac1e1c2fd508305d7ffda794251 Signed-off-by: Matt Ranostay --- binding/bluetooth-map-bluez.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'binding/bluetooth-map-bluez.c') diff --git a/binding/bluetooth-map-bluez.c b/binding/bluetooth-map-bluez.c index f957f5c..4f1b850 100644 --- a/binding/bluetooth-map-bluez.c +++ b/binding/bluetooth-map-bluez.c @@ -38,8 +38,6 @@ #include "bluetooth-map-api.h" #include "bluetooth-map-common.h" -G_DEFINE_QUARK(bluetooth-map-error-quark, nb_error); - static const struct property_info session_props[] = { { .name = "Source", .fmt = "s", }, { .name = "Destination", .fmt = "s", }, @@ -257,6 +255,7 @@ bluez_call_async(struct map_state *ns, if (!type_arg && (!strcmp(access_type, BLUEZ_AT_SESSION) || !strcmp(access_type, BLUEZ_AT_TRANSFER) || + !strcmp(access_type, BLUEZ_AT_MESSAGE) || !strcmp(access_type, BLUEZ_AT_MESSAGEACCESS))) { g_set_error(error, NB_ERROR, NB_ERROR_MISSING_ARGUMENT, "missing %s argument", @@ -270,6 +269,9 @@ bluez_call_async(struct map_state *ns, } else if (!strcmp(access_type, BLUEZ_AT_TRANSFER)) { path = type_arg; interface = BLUEZ_OBEX_TRANSFER_INTERFACE; + } else if (!strcmp(access_type, BLUEZ_AT_MESSAGE)) { + path = type_arg; + interface = BLUEZ_OBEX_MESSAGE_INTERFACE; } else if (!strcmp(access_type, BLUEZ_AT_MESSAGEACCESS)) { path = type_arg; interface = BLUEZ_OBEX_MESSAGEACCESS_INTERFACE; -- cgit 1.2.3-korg