From: Szymon Janc <szymon.janc@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Szymon Janc <szymon.janc@tieto.com>
Subject: [PATCH v2 04/15] android/hal: Add support for sending adapter get property command
Date: Fri, 25 Oct 2013 12:50:00 +0200 [thread overview]
Message-ID: <1382698211-9123-4-git-send-email-szymon.janc@tieto.com> (raw)
In-Reply-To: <1382698211-9123-1-git-send-email-szymon.janc@tieto.com>
This allows HAL to get adapter property.
---
android/hal-bluetooth.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index aae6078..a71de83 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -143,12 +143,33 @@ static int get_adapter_properties(void)
static int get_adapter_property(bt_property_type_t type)
{
+ struct hal_cmd_get_adapter_prop cmd;
+
DBG("");
if (!interface_ready())
return BT_STATUS_NOT_READY;
- return BT_STATUS_UNSUPPORTED;
+ switch (type) {
+ case BT_PROPERTY_BDNAME:
+ case BT_PROPERTY_BDADDR:
+ case BT_PROPERTY_UUIDS:
+ case BT_PROPERTY_CLASS_OF_DEVICE:
+ case BT_PROPERTY_TYPE_OF_DEVICE:
+ case BT_PROPERTY_SERVICE_RECORD:
+ case BT_PROPERTY_ADAPTER_SCAN_MODE:
+ case BT_PROPERTY_ADAPTER_BONDED_DEVICES:
+ case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
+ break;
+ default:
+ return BT_STATUS_PARM_INVALID;
+ }
+
+ /* type match IPC type */
+ cmd.type = type;
+
+ return hal_ipc_cmd(HAL_SERVICE_ID_BLUETOOTH, HAL_OP_GET_ADAPTER_PROP,
+ sizeof(cmd), &cmd, 0, NULL, NULL);
}
static int set_adapter_property(const bt_property_t *property)
--
1.8.4.1
next prev parent reply other threads:[~2013-10-25 10:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 10:49 [PATCH v2 01/15] android: Remove not needed local variable in connect_hal Szymon Janc
2013-10-25 10:49 ` [PATCH v2 02/15] android: Add properties defines to hal-msg.h Szymon Janc
2013-10-25 10:49 ` [PATCH v2 03/15] android/hal: Add support for sending adapter set property command Szymon Janc
2013-10-25 10:50 ` Szymon Janc [this message]
2013-10-25 10:50 ` [PATCH v2 05/15] android/hal: Add support for sending adapter get properties command Szymon Janc
2013-10-25 10:50 ` [PATCH v2 06/15] android/hal: Add support for sending create bond command Szymon Janc
2013-10-25 10:50 ` [PATCH v2 07/15] android/hal: Add support for sending cancel " Szymon Janc
2013-10-25 10:50 ` [PATCH v2 08/15] android/hal: Add support for sending adapter remove " Szymon Janc
2013-10-25 10:50 ` [PATCH v2 09/15] android/hal: Add support for sending adapter PIN reply command Szymon Janc
2013-10-25 10:50 ` [PATCH v2 10/15] android: Add missing SSP Variant definitions to IPC document Szymon Janc
2013-10-25 10:50 ` [PATCH v2 11/15] android: Add missing SSP variant definitions to IPC header Szymon Janc
2013-10-25 10:50 ` [PATCH v2 12/15] android/hal: Add support for sending adapter SSP reply command Szymon Janc
2013-10-25 10:50 ` [PATCH v2 13/15] android/hal: Add support for handling adapter properties change event Szymon Janc
2013-10-25 10:50 ` [PATCH v2 14/15] android: Add missing success status definition to IPC header Szymon Janc
2013-10-25 10:50 ` [PATCH v2 15/15] android: Add initial support for handling adapter get property command Szymon Janc
2013-10-25 12:29 ` [PATCH v2 01/15] android: Remove not needed local variable in connect_hal Luiz Augusto von Dentz
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=1382698211-9123-4-git-send-email-szymon.janc@tieto.com \
--to=szymon.janc@tieto.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