Skip to contentSkip to conversation

android/adapter: Log not implemented properties

PATCH In review Luiz Augusto von Dentz 2 participants 4 messages Nov 1, 2013 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/3 android/adapter: Log not implemented properties

From: Luiz Augusto von Dentz <[email protected]>

This makes it easier to stop which functions the HAL is calling.

---
 android/adapter.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
android/adapter.c +80 -0
index f986020..0bf627f 100644
@@ -940,6 +940,78 @@ static void send_adapter_address(void)
 	g_free(ev);
 }
 
+static bool get_name(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
+static bool get_uuids(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
+static bool get_class(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
+static bool get_type(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
+static bool get_service(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
+static bool get_scan_mode(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
+static bool get_devices(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
+static bool get_disc_timeout(void)
+{
+	DBG("Not implemented");
+
+	/* TODO: Add implementation */
+
+	return false;
+}
+
 static bool get_property(void *buf, uint16_t len)
 {
 	struct hal_cmd_get_adapter_prop *cmd = buf;
@@ -949,13 +1021,21 @@ static bool get_property(void *buf, uint16_t len)
 		send_adapter_address();
 		return true;
 	case HAL_PROP_ADAPTER_NAME:
+		return get_name();
 	case HAL_PROP_ADAPTER_UUIDS:
+		return get_uuids();
 	case HAL_PROP_ADAPTER_CLASS:
+		return get_class();
 	case HAL_PROP_ADAPTER_TYPE:
+		return get_type();
 	case HAL_PROP_ADAPTER_SERVICE_REC:
+		return get_service();
 	case HAL_PROP_ADAPTER_SCAN_MODE:
+		return get_scan_mode();
 	case HAL_PROP_ADAPTER_BONDED_DEVICES:
+		return get_devices();
 	case HAL_PROP_ADAPTER_DISC_TIMEOUT:
+		return get_disc_timeout();
 	default:
 		return false;
 	}
Signature · 1 line
1.8.3.1
author maintainer
#1 lore raw

PATCH 2/3 android/hid: Log not implemented HAL functions

From: Luiz Augusto von Dentz <[email protected]>

This makes it easier to spot which functions the HAL is calling.

---
 android/hid.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)
android/hid.c +75 -0
index 6e6f606..e660552 100644
@@ -564,6 +564,60 @@ static uint8_t bt_hid_disconnect(struct hal_cmd_hid_disconnect *cmd,
 	return HAL_STATUS_SUCCESS;
 }
 
+static uint8_t bt_hid_virtual_unplug(struct hal_cmd_hid_vp *cmd, uint16_t len)
+{
+	DBG("Not Implemented");
+
+	return HAL_STATUS_FAILED;
+}
+
+static uint8_t bt_hid_info(struct hal_cmd_hid_set_info *cmd, uint16_t len)
+{
+	DBG("Not Implemented");
+
+	return HAL_STATUS_FAILED;
+}
+
+static uint8_t bt_hid_get_protocol(struct hal_cmd_hid_get_protocol *cmd,
+								uint16_t len)
+{
+	DBG("Not Implemented");
+
+	return HAL_STATUS_FAILED;
+}
+
+static uint8_t bt_hid_set_protocol(struct hal_cmd_hid_set_protocol *cmd,
+								uint16_t len)
+{
+	DBG("Not Implemented");
+
+	return HAL_STATUS_FAILED;
+}
+
+static uint8_t bt_hid_get_report(struct hal_cmd_hid_get_report *cmd,
+								uint16_t len)
+{
+	DBG("Not Implemented");
+
+	return HAL_STATUS_FAILED;
+}
+
+static uint8_t bt_hid_set_report(struct hal_cmd_hid_set_report *cmd,
+								uint16_t len)
+{
+	DBG("Not Implemented");
+
+	return HAL_STATUS_FAILED;
+}
+
+static uint8_t bt_hid_send_data(struct hal_cmd_hid_send_data *cmd,
+								uint16_t len)
+{
+	DBG("Not Implemented");
+
+	return HAL_STATUS_FAILED;
+}
+
 void bt_hid_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf, uint16_t len)
 {
 	uint8_t status = HAL_STATUS_FAILED;
@@ -575,6 +629,27 @@ void bt_hid_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf, uint16_t len)
 	case HAL_OP_HID_DISCONNECT:
 		status = bt_hid_disconnect(buf, len);
 		break;
+	case HAL_OP_HID_VP:
+		status = bt_hid_virtual_unplug(buf, len);
+		break;
+	case HAL_OP_HID_SET_INFO:
+		status = bt_hid_info(buf, len);
+		break;
+	case HAL_OP_HID_GET_PROTOCOL:
+		status = bt_hid_get_protocol(buf, len);
+		break;
+	case HAL_OP_HID_SET_PROTOCOL:
+		status = bt_hid_set_protocol(buf, len);
+		break;
+	case HAL_OP_HID_GET_REPORT:
+		status = bt_hid_get_report(buf, len);
+		break;
+	case HAL_OP_HID_SET_REPORT:
+		status = bt_hid_set_report(buf, len);
+		break;
+	case HAL_OP_HID_SEND_DATA:
+		status = bt_hid_send_data(buf, len);
+		break;
 	default:
 		DBG("Unhandled command, opcode 0x%x", opcode);
 		break;
Signature · 1 line
1.8.3.1
author maintainer
#2 lore raw

PATCH 3/3 android/socket: Log not implemented HAL functions

In reply to Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

This makes it easier to spot which functions the HAL is calling.

---
 android/socket.c | 4 ++++
 1 file changed, 4 insertions(+)
android/socket.c +4 -0
index 39709cd..b6eed6e 100644
@@ -34,11 +34,15 @@
 
 static int handle_listen(void *buf)
 {
+	DBG("Not implemented");
+
 	return -1;
 }
 
 static int handle_connect(void *buf)
 {
+	DBG("Not implemented");
+
 	return -1;
 }
 
Signature · 1 line
1.8.3.1
#3 lore raw
In reply to Luiz Augusto von Dentz

Hi Luiz,

Quoted 4 lines · Luiz Augusto von Dentz

This makes it easier to stop which functions the HAL is calling.

---
 android/adapter.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

All three patches have been applied. Thanks.

Johan