diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2014-10-02 10:10:54 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-10-02 14:20:49 +0300 |
commit | 634101d2a56ec02e311951ea77a032903f96080f (patch) | |
tree | 9fe0e6ac633a5a906f6b6e272b3888931dce3299 /android/tester-main.h | |
parent | b7d3beaaa7fdf66b76d3473da57fcc58ce937abb (diff) | |
download | bluez-634101d2a56ec02e311951ea77a032903f96080f.tar.gz |
android/tester: Add generic hook to handle pdu exchange
This allows tester-main to register hooks for certain CID to
automatically perform pdu exchange by registering array of pdu pairs
(request_pdu, response_pdu). When end_pdu is used instead of
request_pdu, response is sent immediately without incoming pdu
verification. A pair with end_pdus set as request and response is
considered as the end of pdu pairs array.
This callback can also handle sdp request<->response while transaction
ID for the response is swaped to match the one from SDP request.
'emu_l2cap_cid_data' is used to pass tha appropriate data to the hook
mechanism. It is similar to 'emu_cid_data" used in other testers and
eventually will replace those.
Diffstat (limited to 'android/tester-main.h')
-rw-r--r-- | android/tester-main.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/android/tester-main.h b/android/tester-main.h index 3ebad2b04..aa56cd2b0 100644 --- a/android/tester-main.h +++ b/android/tester-main.h @@ -439,6 +439,14 @@ struct emu_set_l2cap_data { void *user_data; }; +struct emu_l2cap_cid_data { + const struct pdu_set *pdu; + + uint16_t handle; + uint16_t cid; + bool is_sdp; +}; + /* * Callback data structure should be enhanced with data * returned by callbacks. It's used for test case step @@ -501,6 +509,8 @@ struct test_case { const struct step *step; }; +void tester_handle_l2cap_data_exchange(struct emu_l2cap_cid_data *cid_data); + /* Get, remove test cases API */ struct queue *get_bluetooth_tests(void); void remove_bluetooth_tests(void); |