---
android/client/if-rc.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index 60c3247..2e93c02 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -46,6 +46,14 @@ SINTMAP(btrc_media_attr_t, -1, "(unknown)")
DELEMENT(BTRC_MEDIA_ATTR_PLAYING_TIME),
ENDMAP
+SINTMAP(btrc_status_t, -1, "(unknown)")
+ DELEMENT(BTRC_STS_BAD_CMD),
+ DELEMENT(BTRC_STS_BAD_PARAM),
+ DELEMENT(BTRC_STS_NOT_FOUND),
+ DELEMENT(BTRC_STS_INTERNAL_ERR),
+ DELEMENT(BTRC_STS_NO_ERROR),
+ENDMAP
+
static char last_addr[MAX_ADDR_STR_LEN];
static void remote_features_cb(bt_bdaddr_t *bd_addr,
@@ -196,6 +204,33 @@ static void set_volume_p(int argc, const char **argv)
EXEC(if_rc->set_volume, volume);
}
+/* set_player_app_value_rsp */
+
+static void set_player_app_value_rsp_c(int argc, const char **argv,
+ enum_func *enum_func, void **user)
+{
+ if (argc == 3) {
+ *user = TYPE_ENUM(btrc_status_t);
+ *enum_func = enum_defines;
+ }
+}
+
+static void set_player_app_value_rsp_p(int argc, const char **argv)
+{
+ btrc_status_t rsp_status;
+
+ RETURN_IF_NULL(if_rc);
+
+ if (argc <= 2) {
+ haltest_error("No response status specified");
+ return;
+ }
+
+ rsp_status = str2btrc_status_t(argv[2]);
+
+ EXEC(if_rc->set_player_app_value_rsp, rsp_status);
+}
+
/* cleanup */
static void cleanup_p(int argc, const char **argv)
@@ -211,6 +246,7 @@ static struct method methods[] = {
STD_METHODCH(get_play_status_rsp,
"<play_status> <song_len> <song_pos>"),
STD_METHODCH(get_element_attr_rsp, "<num_attr> <attrs_id> <value>"),
+ STD_METHODCH(set_player_app_value_rsp, "<rsp_status>"),
STD_METHODCH(set_volume, "<volume>"),
STD_METHOD(cleanup),
END_METHOD
--
1.8.3.2
---
android/client/if-rc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index ede6214..c8f8c95 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -68,6 +68,11 @@ static void get_play_status_cb(void)
haltest_info("%s\n", __func__);
}
+static void list_player_app_attr_cb(void)
+{
+ haltest_info("%s\n", __func__);
+}
+
static void list_player_app_values_cb(btrc_player_attr_t attr_id)
{
haltest_info("%s, attr_id=%d\n", __func__, attr_id);
@@ -126,6 +131,7 @@ static btrc_callbacks_t rc_cbacks = {
.size = sizeof(rc_cbacks),
.remote_features_cb = remote_features_cb,
.get_play_status_cb = get_play_status_cb,
+ .list_player_app_attr_cb = list_player_app_attr_cb,
.list_player_app_values_cb = list_player_app_values_cb,
.get_player_app_value_cb = get_player_app_value_cb,
.get_player_app_attrs_text_cb = get_player_app_attrs_text_cb,
--
1.8.3.2
---
android/client/if-rc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index 2f5f41a..ede6214 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -68,6 +68,11 @@ static void get_play_status_cb(void)
haltest_info("%s\n", __func__);
}
+static void list_player_app_values_cb(btrc_player_attr_t attr_id)
+{
+ haltest_info("%s, attr_id=%d\n", __func__, attr_id);
+}
+
static void get_player_app_value_cb(uint8_t num_attr,
btrc_player_attr_t *p_attrs)
{
@@ -121,6 +126,7 @@ static btrc_callbacks_t rc_cbacks = {
.size = sizeof(rc_cbacks),
.remote_features_cb = remote_features_cb,
.get_play_status_cb = get_play_status_cb,
+ .list_player_app_values_cb = list_player_app_values_cb,
.get_player_app_value_cb = get_player_app_value_cb,
.get_player_app_attrs_text_cb = get_player_app_attrs_text_cb,
.get_player_app_values_text_cb = get_player_app_values_text_cb,
--
1.8.3.2
---
android/client/if-rc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index fb98fe6..2f5f41a 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -74,6 +74,12 @@ static void get_player_app_value_cb(uint8_t num_attr,
haltest_info("%s, num_attr=%d attrs=%u\n", __func__, num_attr, p_attrs);
}
+static void get_player_app_attrs_text_cb(uint8_t num_attr,
+ btrc_player_attr_t *p_attrs)
+{
+ haltest_info("%s, num_attr=%d attrs=%u\n", __func__, num_attr, p_attrs);
+}
+
static void get_player_app_values_text_cb(uint8_t attr_id, uint8_t num_val,
uint8_t *p_vals)
{
@@ -116,6 +122,7 @@ static btrc_callbacks_t rc_cbacks = {
.remote_features_cb = remote_features_cb,
.get_play_status_cb = get_play_status_cb,
.get_player_app_value_cb = get_player_app_value_cb,
+ .get_player_app_attrs_text_cb = get_player_app_attrs_text_cb,
.get_player_app_values_text_cb = get_player_app_values_text_cb,
.set_player_app_value_cb = set_player_app_value_cb,
.get_element_attr_cb = get_element_attr_cb,
--
1.8.3.2
---
android/client/if-rc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index f1cdbc5..df172d3 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -68,6 +68,11 @@ static void get_play_status_cb(void)
haltest_info("%s\n", __func__);
}
+static void set_player_app_value_cb(btrc_player_settings_t *p_vals)
+{
+ haltest_info("%s, settings=%u\n", __func__, p_vals);
+}
+
static void get_element_attr_cb(uint8_t num_attr, btrc_media_attr_t *attrs)
{
uint8_t i;
@@ -97,6 +102,7 @@ static btrc_callbacks_t rc_cbacks = {
.size = sizeof(rc_cbacks),
.remote_features_cb = remote_features_cb,
.get_play_status_cb = get_play_status_cb,
+ .set_player_app_value_cb = set_player_app_value_cb,
.get_element_attr_cb = get_element_attr_cb,
.register_notification_cb = register_notification_cb,
.volume_change_cb = volume_change_cb,
--
1.8.3.2
---
android/client/if-rc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index df172d3..cb3280d 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -68,6 +68,13 @@ static void get_play_status_cb(void)
haltest_info("%s\n", __func__);
}
+static void get_player_app_values_text_cb(uint8_t attr_id, uint8_t num_val,
+ uint8_t *p_vals)
+{
+ haltest_info("%s, attr_id=%d num_val=%d values=%u\n", __func__,
+ attr_id, num_val, p_vals);
+}
+
static void set_player_app_value_cb(btrc_player_settings_t *p_vals)
{
haltest_info("%s, settings=%u\n", __func__, p_vals);
@@ -102,6 +109,7 @@ static btrc_callbacks_t rc_cbacks = {
.size = sizeof(rc_cbacks),
.remote_features_cb = remote_features_cb,
.get_play_status_cb = get_play_status_cb,
+ .get_player_app_values_text_cb = get_player_app_values_text_cb,
.set_player_app_value_cb = set_player_app_value_cb,
.get_element_attr_cb = get_element_attr_cb,
.register_notification_cb = register_notification_cb,
--
1.8.3.2
---
android/client/if-rc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index cb3280d..fb98fe6 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -68,6 +68,12 @@ static void get_play_status_cb(void)
haltest_info("%s\n", __func__);
}
+static void get_player_app_value_cb(uint8_t num_attr,
+ btrc_player_attr_t *p_attrs)
+{
+ haltest_info("%s, num_attr=%d attrs=%u\n", __func__, num_attr, p_attrs);
+}
+
static void get_player_app_values_text_cb(uint8_t attr_id, uint8_t num_val,
uint8_t *p_vals)
{
@@ -109,6 +115,7 @@ static btrc_callbacks_t rc_cbacks = {
.size = sizeof(rc_cbacks),
.remote_features_cb = remote_features_cb,
.get_play_status_cb = get_play_status_cb,
+ .get_player_app_value_cb = get_player_app_value_cb,
.get_player_app_values_text_cb = get_player_app_values_text_cb,
.set_player_app_value_cb = set_player_app_value_cb,
.get_element_attr_cb = get_element_attr_cb,
--
1.8.3.2
---
android/client/if-rc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/android/client/if-rc.c b/android/client/if-rc.c
index 2e93c02..f1cdbc5 100644
--- a/android/client/if-rc.c
+++ b/android/client/if-rc.c
@@ -88,6 +88,11 @@ static void volume_change_cb(uint8_t volume, uint8_t ctype)
haltest_info("%s, volume=%d ctype=%d\n", __func__, volume, ctype);
}
+static void passthrough_cmd_cb(int id, int key_state)
+{
+ haltest_info("%s, id=%d key_state=%d\n", __func__, id, key_state);
+}
+
static btrc_callbacks_t rc_cbacks = {
.size = sizeof(rc_cbacks),
.remote_features_cb = remote_features_cb,
@@ -95,6 +100,7 @@ static btrc_callbacks_t rc_cbacks = {
.get_element_attr_cb = get_element_attr_cb,
.register_notification_cb = register_notification_cb,
.volume_change_cb = volume_change_cb,
+ .passthrough_cmd_cb = passthrough_cmd_cb,
};
/* init */
--
1.8.3.2