aboutsummaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-map-bluez.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-06-14 17:56:41 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-06-19 08:53:00 -0700
commit30b84ed96f8fc03fc5a73bbe97a86d76899ab8cc (patch)
tree3967da514a77ba4f1c4e186111ef44bc1197d2f3 /binding/bluetooth-map-bluez.c
parenta9584f072945bfda5d7741d43cb870dcb291fd70 (diff)
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 <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-map-bluez.c')
-rw-r--r--binding/bluetooth-map-bluez.c6
1 files changed, 4 insertions, 2 deletions
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;