summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2016-05-27 16:36:24 -0700
committerJakub Pawlowski <jpawlowski@google.com>2016-06-15 13:47:02 -0700
commit620fd71ee1991a9f257ca08924fd52f83b94ea7f (patch)
tree52e56accf86fe46c63956468ccb433c937dc0bac
parent8babab0d5cd836f1cc5435026f7dc04c0e421950 (diff)
downloadlibhardware-620fd71ee1991a9f257ca08924fd52f83b94ea7f.tar.gz
Vectors as parameters to GATT write/indicate (3/3)
Bug: 29005882 Bug: 28485365 Change-Id: I39b0d746692a23be89551979488a28cfe930866a
-rw-r--r--include/hardware/bt_gatt_client.h11
-rw-r--r--include/hardware/bt_gatt_server.h7
2 files changed, 12 insertions, 6 deletions
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index e2c8a921..86991b1d 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -19,9 +19,12 @@
#define ANDROID_INCLUDE_BT_GATT_CLIENT_H
#include <stdint.h>
+#include <vector>
#include "bt_gatt_types.h"
#include "bt_common_types.h"
+using std::vector;
+
__BEGIN_DECLS
/**
@@ -304,16 +307,16 @@ typedef struct {
/** Write a remote characteristic */
bt_status_t (*write_characteristic)(int conn_id, uint16_t handle,
- int write_type, int len, int auth_req,
- char* p_value);
+ int write_type, int auth_req,
+ vector<uint8_t> value);
/** Read the descriptor for a given characteristic */
bt_status_t (*read_descriptor)(int conn_id, uint16_t handle, int auth_req);
/** Write a remote descriptor for a given characteristic */
bt_status_t (*write_descriptor)( int conn_id, uint16_t handle,
- int write_type, int len,
- int auth_req, char* p_value);
+ int write_type, int auth_req,
+ vector<uint8_t> value);
/** Execute a prepared write operation */
bt_status_t (*execute_write)(int conn_id, int execute);
diff --git a/include/hardware/bt_gatt_server.h b/include/hardware/bt_gatt_server.h
index 0d6cc1e8..d2fdda3f 100644
--- a/include/hardware/bt_gatt_server.h
+++ b/include/hardware/bt_gatt_server.h
@@ -19,9 +19,12 @@
#define ANDROID_INCLUDE_BT_GATT_SERVER_H
#include <stdint.h>
+#include <vector>
#include "bt_gatt_types.h"
+using std::vector;
+
__BEGIN_DECLS
/** GATT value type used in response to remote read requests */
@@ -182,8 +185,8 @@ typedef struct {
/** Send value indication to a remote device */
bt_status_t (*send_indication)(int server_if, int attribute_handle,
- int conn_id, int len, int confirm,
- char* p_value);
+ int conn_id, int confirm,
+ vector<uint8_t> value);
/** Send a response to a read/write operation */
bt_status_t (*send_response)(int conn_id, int trans_id,