summaryrefslogtreecommitdiff
path: root/android/client
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-11-12 17:14:29 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-11-13 18:07:33 +0100
commita0a577041cb9f7ff267fa987e5bdd98d49f246a3 (patch)
tree2bb13bbee951ab45fbd80f3745277817a6f284df /android/client
parent12c3a0adb6d69ef7de89cacecf53dc57843fccfa (diff)
downloadbluez-a0a577041cb9f7ff267fa987e5bdd98d49f246a3.tar.gz
android/client: Add handsfree configure_wbs command
Add command configure_wbs and helpers.
Diffstat (limited to 'android/client')
-rw-r--r--android/client/if-hf.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/android/client/if-hf.c b/android/client/if-hf.c
index c64d4121e..d24612a4a 100644
--- a/android/client/if-hf.c
+++ b/android/client/if-hf.c
@@ -105,6 +105,12 @@ SINTMAP(bthf_call_addrtype_t, -1, "(unknown)")
DELEMENT(BTHF_CALL_ADDRTYPE_INTERNATIONAL),
ENDMAP
+SINTMAP(bthf_wbs_config_t, -1, "(unknown)")
+ DELEMENT(BTHF_WBS_NONE),
+ DELEMENT(BTHF_WBS_NO),
+ DELEMENT(BTHF_WBS_YES),
+ENDMAP
+
/* Callbacks */
static char last_addr[MAX_ADDR_STR_LEN];
@@ -902,6 +908,35 @@ static void clcc_response_p(int argc, const char **argv)
#endif
}
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+static void configure_wbs_c(int argc, const char **argv, enum_func *enum_func,
+ void **user)
+{
+ if (argc == 4) {
+ *user = TYPE_ENUM(bthf_wbs_config_t);
+ *enum_func = enum_defines;
+ }
+}
+
+static void configure_wbs_p(int argc, const char **argv)
+{
+ bthf_wbs_config_t wbs;
+ bt_bdaddr_t addr;
+
+ RETURN_IF_NULL(if_hf);
+
+ if (argc <= 3) {
+ haltest_error("Too few parameters specified\n");
+ return;
+ }
+
+ VERIFY_ADDR_ARG(2, &addr);
+ wbs = str2bthf_wbs_config_t(argv[3]);
+
+ EXEC(if_hf->configure_wbs, &addr, wbs);
+}
+#endif
+
/* phone state change */
static void phone_state_change_c(int argc, const char **argv,
@@ -990,6 +1025,7 @@ static struct method methods[] = {
STD_METHODCH(clcc_response,
"<index> <direction> <state> <mode> <mpty> <number> "
"<type> <addr>"),
+ STD_METHODCH(configure_wbs, "<addr> <wbs config>"),
#else
STD_METHOD(init),
STD_METHOD(start_voice_recognition),