summaryrefslogtreecommitdiff
path: root/android/client
diff options
context:
space:
mode:
authorMarcin Kraglak <marcin.kraglak@tieto.com>2014-11-21 12:16:43 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-11-24 15:25:45 +0100
commit083ca4eefda90366732adaa6351ad4bdb130e53b (patch)
tree31f1cca1a36f3f1331e179753732fea39dae8903 /android/client
parenta3baeb16c29e5c34f51961918505debcd2acd4ec (diff)
downloadbluez-083ca4eefda90366732adaa6351ad4bdb130e53b.tar.gz
android/client: Add get_connection_state command
Diffstat (limited to 'android/client')
-rw-r--r--android/client/if-bt.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/android/client/if-bt.c b/android/client/if-bt.c
index f7382ef08..22f3f4cf8 100644
--- a/android/client/if-bt.c
+++ b/android/client/if-bt.c
@@ -409,6 +409,20 @@ static void read_energy_info_p(int argc, const char **argv)
EXEC(if_bluetooth->read_energy_info);
}
+
+#define get_connection_state_c complete_addr_c
+
+static void get_connection_state_p(int argc, const char **argv)
+{
+ bt_bdaddr_t addr;
+
+ RETURN_IF_NULL(if_bluetooth);
+
+ VERIFY_ADDR_ARG(2, &addr);
+
+ haltest_info("if_bluetooth->get_connection_state : %d\n",
+ if_bluetooth->get_connection_state(&addr));
+}
#endif
static void disable_p(int argc, const char **argv)
@@ -892,6 +906,7 @@ static struct method methods[] = {
#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
STD_METHODCH(create_bond, "<addr> [<transport>]"),
STD_METHOD(read_energy_info),
+ STD_METHODCH(get_connection_state, "<addr>"),
#else
STD_METHODCH(create_bond, "<addr>"),
#endif