aboutsummaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-bluez.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-11-06 23:02:11 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-11-12 03:58:47 -0800
commita5fe25e7496cf4a8369e1f34e66c9e55d2c95ed1 (patch)
treeb999b55195278036550836f1336eb9f805cc00a6 /binding/bluetooth-bluez.c
parent50078d83552f02051a5706b3dfea0953eff3a02b (diff)
binding: bluetooth: add new avrcp controls verb
Since MediaPlayer1 controls are part of bluez it makes sense to keep them here for now Bug-AGL: SPEC-1630 Change-Id: Ia02341179a322082357b0e7eff07264e34197d57 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-bluez.c')
-rw-r--r--binding/bluetooth-bluez.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/binding/bluetooth-bluez.c b/binding/bluetooth-bluez.c
index 052ea7b..824843b 100644
--- a/binding/bluetooth-bluez.c
+++ b/binding/bluetooth-bluez.c
@@ -155,6 +155,19 @@ void bluez_decode_call_error(struct bluetooth_state *ns,
NB_ERROR_UNKNOWN_SERVICE,
"unknown service %s",
type_arg);
+ } else if (!strcmp(method, "Play") ||
+ !strcmp(method, "Pause") ||
+ !strcmp(method, "Stop") ||
+ !strcmp(method, "Next") ||
+ !strcmp(method, "Previous") ||
+ !strcmp(method, "FastForward") ||
+ !strcmp(method, "Rewind")) {
+
+ g_clear_error(error);
+ g_set_error(error, NB_ERROR,
+ NB_ERROR_UNKNOWN_PROPERTY,
+ "unknown method %s",
+ method);
}
}
}
@@ -167,7 +180,8 @@ GVariant *bluez_call(struct bluetooth_state *ns,
GVariant *reply;
if (!path && (!strcmp(access_type, BLUEZ_AT_DEVICE) ||
- !strcmp(access_type, BLUEZ_AT_ADAPTER))) {
+ !strcmp(access_type, BLUEZ_AT_ADAPTER) ||
+ !strcmp(access_type, BLUEZ_AT_MEDIAPLAYER))) {
g_set_error(error, NB_ERROR, NB_ERROR_MISSING_ARGUMENT,
"missing %s argument",
access_type);
@@ -181,6 +195,8 @@ GVariant *bluez_call(struct bluetooth_state *ns,
} else if (!strcmp(access_type, BLUEZ_AT_AGENTMANAGER)) {
path = BLUEZ_PATH;
interface = BLUEZ_AGENTMANAGER_INTERFACE;
+ } else if (!strcmp(access_type, BLUEZ_AT_MEDIAPLAYER)) {
+ interface = BLUEZ_MEDIAPLAYER_INTERFACE;
} else {
g_set_error(error, NB_ERROR, NB_ERROR_ILLEGAL_ARGUMENT,
"illegal %s argument",