summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSrinu Jella <sjella@codeaurora.org>2015-05-29 20:02:20 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:21:48 -0600
commitfc0cea9ec50c0b35ddfc28b269980da2ca7dc109 (patch)
tree2e8de76260745ad5e324d0a71ad4c2f3e00c5525 /include
parent222865ee3d43beae7a2928c19ca77b6ab22089d6 (diff)
downloadandroid_system_bt-fc0cea9ec50c0b35ddfc28b269980da2ca7dc109.tar.gz
android_system_bt-fc0cea9ec50c0b35ddfc28b269980da2ca7dc109.tar.bz2
android_system_bt-fc0cea9ec50c0b35ddfc28b269980da2ca7dc109.zip
L2CAP test tool for L2cap layer certification.
- Interface provided from BT-If layer to interact with l2cap - This tool covers all l2cap 4.0 PTS test cases whcih includes basic, ertm and streaming mode test cases. Conflicts: btif/src/bluetooth.c Change-Id: Ifacd0b99974c28788926e0f901c37ee2c12ff97b
Diffstat (limited to 'include')
-rw-r--r--include/bt_testapp.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/bt_testapp.h b/include/bt_testapp.h
index dde597488..37e39ca35 100644
--- a/include/bt_testapp.h
+++ b/include/bt_testapp.h
@@ -75,9 +75,53 @@ typedef enum {
NOT_SUPPORTED,
}profileName;
typedef enum {
+ TEST_APP_L2CAP,
TEST_APP_RFCOMM,
TEST_APP_MCAP
} test_app_profile;
+typedef struct {
+
+ /** set to sizeof(Btl2capInterface) */
+ size_t size;
+ /** Register the L2cap callbacks */
+ bt_status_t (*Init)(tL2CAP_APPL_INFO* callbacks);
+ bt_status_t (*RegisterPsm)(UINT16 psm, BOOLEAN conn_type, UINT16 sec_level);
+ bt_status_t (*Deregister)(UINT16 psm);
+ UINT16 (*AllocatePsm)(void);
+ UINT16 (*Connect)(UINT16 psm, bt_bdaddr_t *bd_addr);
+ BOOLEAN (*ConnectRsp)(BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 result, UINT16 status);
+ UINT16 (*ErtmConnectReq)(UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_ERTM_INFO *p_ertm_info);
+ BOOLEAN (*ErtmConnectRsp)(BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid,
+ UINT16 result, UINT16 status,
+ tL2CAP_ERTM_INFO *p_ertm_info);
+ BOOLEAN (*ConfigReq)(UINT16 cid, tL2CAP_CFG_INFO *p_cfg);
+ BOOLEAN (*ConfigRsp)(UINT16 cid, tL2CAP_CFG_INFO *p_cfg);
+ BOOLEAN (*DisconnectReq)(UINT16 cid);
+ BOOLEAN (*DisconnectRsp)(UINT16 cid);
+ UINT8 (*DataWrite)(UINT16 cid, char *p_data, UINT32 len);
+ BOOLEAN (*Ping)(BD_ADDR p_bd_addr, tL2CA_ECHO_RSP_CB *p_cb);
+ BOOLEAN (*Echo)(BD_ADDR p_bd_addr, BT_HDR *p_data, tL2CA_ECHO_DATA_CB *p_callback);
+ BOOLEAN (*SetIdleTimeout)(UINT16 cid, UINT16 timeout, BOOLEAN is_global);
+ BOOLEAN (*SetIdleTimeoutByBdAddr)(BD_ADDR bd_addr, UINT16 timeout);
+ UINT8 (*SetDesireRole)(UINT8 new_role);
+ void (*SetSecConnOnlyMode)(BOOLEAN secvalue);
+ UINT16 (*LocalLoopbackReq)(UINT16 psm, UINT16 handle, BD_ADDR p_bd_addr);
+ UINT16 (*FlushChannel)(UINT16 lcid, UINT16 num_to_flush);
+ BOOLEAN (*SetAclPriority)(BD_ADDR bd_addr, UINT8 priority);
+ BOOLEAN (*FlowControl)(UINT16 cid, BOOLEAN data_enabled);
+ BOOLEAN (*SendTestSFrame)(UINT16 cid, BOOLEAN rr_or_rej, UINT8 back_track);
+ BOOLEAN (*SetTxPriority)(UINT16 cid, tL2CAP_CHNL_PRIORITY priority);
+ BOOLEAN (*RegForNoCPEvt)(tL2CA_NOCP_CB *p_cb, BD_ADDR p_bda);
+ BOOLEAN (*SetChnlDataRate)(UINT16 cid, tL2CAP_CHNL_DATA_RATE tx, tL2CAP_CHNL_DATA_RATE rx);
+ BOOLEAN (*SetFlushTimeout)(BD_ADDR bd_addr, UINT16 flush_tout);
+ UINT8 (*DataWriteEx)(UINT16 cid, BT_HDR *p_data, UINT16 flags);
+ BOOLEAN (*SetChnlFlushability)(UINT16 cid, BOOLEAN is_flushable);
+ BOOLEAN (*GetPeerFeatures)(BD_ADDR bd_addr, UINT32 *p_ext_feat, UINT8 *p_chnl_mask);
+ BOOLEAN (*GetBDAddrbyHandle)(UINT16 handle, BD_ADDR bd_addr);
+ UINT8 (*GetChnlFcrMode)(UINT16 lcid);
+ UINT16 (*SendFixedChnlData)(UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf);
+ void (*Cleanup)(void);
+} btl2cap_interface_t;
typedef struct
{