summaryrefslogtreecommitdiffstats
path: root/binding/afm-common.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-11-12 00:55:01 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-11-16 05:32:08 -0800
commit47cba68fe66983f50bf785a4e60ec77ac8535c2f (patch)
treeb1e5485f96a1fa78581f7c953b2d257a9c2c5f7c /binding/afm-common.c
parent6c1719bec34a62309426b25dced79dd2be840910 (diff)
binding: mediaplayer: add avrcp support
Proxy avrcp metadata from bluetooth binding to mediaplayer service subscribers. Also allow transparent access to local and avrcp controls. Bug-AGL: SPEC-1630 Change-Id: I75cfd71ee62976a9312474b81469b8eb13a06015 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/afm-common.c')
-rw-r--r--binding/afm-common.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/binding/afm-common.c b/binding/afm-common.c
index ec68b8d..93e6f54 100644
--- a/binding/afm-common.c
+++ b/binding/afm-common.c
@@ -19,7 +19,7 @@
#include "afm-common.h"
-const char *control_commands[] = {
+const char *gstreamer_control_commands[] = {
"play",
"pause",
"previous",
@@ -33,6 +33,21 @@ const char *control_commands[] = {
"stop",
};
+/* NULLs signal this functional isn't available */
+const char *avrcp_control_commands[] = {
+ "Play",
+ "Pause",
+ "Previous",
+ "Next",
+ NULL,
+ "FastForward",
+ "Rewind",
+ NULL,
+ NULL,
+ NULL,
+ "Stop",
+};
+
int get_command_index(const char *name)
{
int i;
@@ -41,7 +56,7 @@ int get_command_index(const char *name)
return -EINVAL;
for (i = 0; i < NUM_CMDS; i++) {
- if (!strcasecmp(control_commands[i], name))
+ if (!strcasecmp(gstreamer_control_commands[i], name))
return i;
}