diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2014-10-02 10:10:50 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-10-02 14:20:48 +0300 |
commit | 8c888307c25cd08c00ed71e3b911cc3c2189445f (patch) | |
tree | 8ed3cf527f48d36e95e11d999e6d0bdfa84aade8 /android/tester-main.h | |
parent | ede5363af39fb1ad915d9be1976e4d536eff1336 (diff) | |
download | bluez-8c888307c25cd08c00ed71e3b911cc3c2189445f.tar.gz |
android/tester: Expose structs holding request pdu and response pdu
This exposes the structs holding request and response pdus from a2dp
and avrcp testers and makes it available to other testers. It also
makes it use iovectors. Some helper macros were also extracted from
gatt tester and reused.
Diffstat (limited to 'android/tester-main.h')
-rw-r--r-- | android/tester-main.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/android/tester-main.h b/android/tester-main.h index e152ff35c..3ebad2b04 100644 --- a/android/tester-main.h +++ b/android/tester-main.h @@ -55,6 +55,21 @@ #include <hardware/bt_gatt_client.h> #include <hardware/bt_gatt_server.h> +struct pdu_set { + struct iovec req; + struct iovec rsp; +}; + +#define raw_data(args...) ((unsigned char[]) { args }) + +#define raw_pdu(args...) \ + { \ + .iov_base = raw_data(args), \ + .iov_len = sizeof(raw_data(args)), \ + } + +#define end_pdu { .iov_base = NULL } + #define TEST_CASE_BREDR(text, ...) { \ HCIEMU_TYPE_BREDR, \ text, \ |