From: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Subject: [RFC 6/7] android/hal-health: Add app state event handler
Date: Mon, 9 Jun 2014 17:28:13 +0300 [thread overview]
Message-ID: <1402324094-18004-7-git-send-email-ravikumar.veeramally@linux.intel.com> (raw)
In-Reply-To: <1402324094-18004-1-git-send-email-ravikumar.veeramally@linux.intel.com>
---
android/hal-health.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/android/hal-health.c b/android/hal-health.c
index ae327b8..01d8758 100644
--- a/android/hal-health.c
+++ b/android/hal-health.c
@@ -33,11 +33,24 @@ static bool interface_ready(void)
return cbacks != NULL;
}
+static void handle_app_registration_state(void *buf, uint16_t len)
+{
+ struct hal_ev_health_app_reg_state *ev = buf;
+
+ if (cbacks->app_reg_state_cb)
+ cbacks->app_reg_state_cb(ev->id, ev->state);
+}
+
/*
* handlers will be called from notification thread context,
* index in table equals to 'opcode - HAL_MINIMUM_EVENT'
*/
static const struct hal_ipc_handler ev_handlers[] = {
+ { /* HAL_EV_HEALTH_APP_REG_STATE */
+ .handler = handle_app_registration_state,
+ .var_len = false,
+ .data_len = sizeof(struct hal_ev_health_app_reg_state)
+ },
};
static bt_status_t register_application(bthl_reg_param_t *reg, int *app_id)
--
1.8.3.2
next prev parent reply other threads:[~2014-06-09 14:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 14:28 [RFC 0/7] HDP initial implementaion Ravi kumar Veeramally
2014-06-09 14:28 ` [RFC 1/7] android/hal-health: Fix passing buf not cmd for passing data Ravi kumar Veeramally
2014-06-09 14:28 ` [RFC 2/7] android/hal-msg: Add application id to mdep config cmd struct Ravi kumar Veeramally
2014-06-09 14:28 ` [RFC 3/7] android/health: Cache health application data on app register call Ravi kumar Veeramally
2014-06-09 14:28 ` [RFC 4/7] android/health: Perform clean up on app unregister call Ravi kumar Veeramally
2014-06-09 14:28 ` [RFC 5/7] android/health: Add HDP SDP record Ravi kumar Veeramally
2014-06-09 14:28 ` Ravi kumar Veeramally [this message]
2014-06-09 14:28 ` [RFC 7/7] android/health: Notify application registration status Ravi kumar Veeramally
2014-06-10 12:58 ` [RFC 0/7] HDP initial implementaion Szymon Janc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402324094-18004-7-git-send-email-ravikumar.veeramally@linux.intel.com \
--to=ravikumar.veeramally@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox