diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-05-03 02:43:24 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-05-06 23:29:12 -0700 |
commit | 4fd90fb81a9ab329800c41473ba948af16bbda8e (patch) | |
tree | 1360aa53882536fe92bceb126a1211ab3910792a /binding/bluetooth-map-bluez.c | |
parent | 2ebcd4022682f10f1084f0cf1abe77f19cdcd575 (diff) |
binding: bluetooth-map: add message composition support
Add message composition suppport for sending SMS/MMS messages in
bMessage format.
Bug-AGL: SPEC-2351
Change-Id: I5709c6619f44863e949ae61363f7d5fe54adcbfc
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-map-bluez.c')
-rw-r--r-- | binding/bluetooth-map-bluez.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/binding/bluetooth-map-bluez.c b/binding/bluetooth-map-bluez.c index 6d70fab..f957f5c 100644 --- a/binding/bluetooth-map-bluez.c +++ b/binding/bluetooth-map-bluez.c @@ -142,7 +142,8 @@ void bluez_decode_call_error(struct map_state *ns, access_type, type_arg); } else if (!strcmp(method, "CreateSession") || - !strcmp(method, "RemoveSession")) { + !strcmp(method, "RemoveSession") || + !strcmp(method, "SetFolder")) { g_clear_error(error); g_set_error(error, NB_ERROR, @@ -152,7 +153,8 @@ void bluez_decode_call_error(struct map_state *ns, } else if (!strcmp(method, "Cancel") || !strcmp(method, "Suspend") || - !strcmp(method, "Resume")) { + !strcmp(method, "Resume") || + !strcmp(method, "PushMessage")) { g_clear_error(error); g_set_error(error, NB_ERROR, @@ -189,6 +191,8 @@ GVariant *bluez_call(struct map_state *ns, interface = BLUEZ_OBEX_TRANSFER_INTERFACE; } else if (!strcmp(access_type, BLUEZ_AT_MESSAGE)) { interface = BLUEZ_OBEX_MESSAGE_INTERFACE; + } else if (!strcmp(access_type, BLUEZ_AT_MESSAGEACCESS)) { + interface = BLUEZ_OBEX_MESSAGEACCESS_INTERFACE; } else { g_set_error(error, NB_ERROR, NB_ERROR_ILLEGAL_ARGUMENT, "illegal %s argument", @@ -252,7 +256,8 @@ bluez_call_async(struct map_state *ns, struct bluez_pending_work *cpw; if (!type_arg && (!strcmp(access_type, BLUEZ_AT_SESSION) || - !strcmp(access_type, BLUEZ_AT_TRANSFER))) { + !strcmp(access_type, BLUEZ_AT_TRANSFER) || + !strcmp(access_type, BLUEZ_AT_MESSAGEACCESS))) { g_set_error(error, NB_ERROR, NB_ERROR_MISSING_ARGUMENT, "missing %s argument", access_type); @@ -265,6 +270,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_MESSAGEACCESS)) { + path = type_arg; + interface = BLUEZ_OBEX_MESSAGEACCESS_INTERFACE; } else { g_set_error(error, NB_ERROR, NB_ERROR_ILLEGAL_ARGUMENT, "illegal %s argument", |