summaryrefslogtreecommitdiff
path: root/android/tester-main.h
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2015-01-08 10:17:40 +0100
committerSzymon Janc <szymon.janc@tieto.com>2015-01-13 14:46:53 +0100
commit51a8bb208d4cb8d1133f6e97173dffe75823d893 (patch)
treea71c7ae3b1da267752251fb1ffe64fdaf17fedf1 /android/tester-main.h
parent20c6a6cd64fcbd6166ced434e34dc4f1d4d50837 (diff)
downloadbluez-51a8bb208d4cb8d1133f6e97173dffe75823d893.tar.gz
android/tester: Add macro improving pdu send procedure
As of now when we want to send response from remote device, we compose pdu from handle and value, which are then copied into fixed size pdu with predefined header. With this macro we will be able to pass up to 3 iovectors which are then send without additional copying. It also quite generic and can be used to any other kind of data processing nad not only for sending pdus.
Diffstat (limited to 'android/tester-main.h')
-rw-r--r--android/tester-main.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/android/tester-main.h b/android/tester-main.h
index 7fe73fe41..e35feec1c 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
@@ -68,10 +68,18 @@ struct pdu_set {
.action_status = status, \
.action = modif_fun, \
.set_data = from, \
- .set_data_to = to, \
+ .set_data_2 = to, \
.set_data_len = len, \
}
+#define PROCESS_DATA(status, proc_fun, data1, data2, data3) { \
+ .action_status = status, \
+ .action = proc_fun, \
+ .set_data = data1, \
+ .set_data_2 = data2, \
+ .set_data_3 = data3, \
+ }
+
#define ACTION(status, act_fun, data_set) { \
.action_status = status, \
.action = act_fun, \
@@ -706,7 +714,8 @@ struct step {
struct bt_callback_data callback_result;
void *set_data;
- void *set_data_to;
+ void *set_data_2;
+ void *set_data_3;
int set_data_len;
uint16_t *store_srvc_handle;