/*******************************************************************************
*
- * Function BTA_JvL2capCloseLE
- *
- * Description This function closes an L2CAP client connection for Fixed
- * Channels Function is idempotent and no callbacks are called!
- *
- * Returns BTA_JV_SUCCESS, if the request is being processed.
- * BTA_JV_FAILURE, otherwise.
- *
- ******************************************************************************/
-tBTA_JV_STATUS BTA_JvL2capCloseLE(uint32_t handle);
-
-/*******************************************************************************
- *
* Function BTA_JvL2capStartServer
*
* Description This function starts an L2CAP server and listens for an
/*******************************************************************************
*
- * Function BTA_JvL2capWriteFixed
- *
- * Description This function writes data to an L2CAP connection
- * When the operation is complete, tBTA_JV_L2CAP_CBACK is
- * called with BTA_JV_L2CAP_WRITE_FIXED_EVT. Works for
- * fixed-channel connections
- *
- ******************************************************************************/
-void BTA_JvL2capWriteFixed(uint16_t channel, const RawAddress& addr,
- uint32_t req_id, tBTA_JV_L2CAP_CBACK* p_cback,
- BT_HDR* msg, uint32_t user_id);
-
-/*******************************************************************************
- *
* Function BTA_JvRfcommConnect
*
* Description This function makes an RFCOMM conection to a remote BD
p_cb->p_cback(BTA_JV_L2CAP_WRITE_EVT, &bta_jv, user_id);
}
-/* Write data to an L2CAP connection using Fixed channels */
-void bta_jv_l2cap_write_fixed(uint16_t channel, const RawAddress& addr,
- uint32_t req_id, BT_HDR* msg, uint32_t user_id,
- tBTA_JV_L2CAP_CBACK* p_cback) {
- tBTA_JV_L2CAP_WRITE_FIXED evt_data;
- evt_data.status = BTA_JV_FAILURE;
- evt_data.channel = channel;
- evt_data.addr = addr;
- evt_data.req_id = req_id;
- evt_data.len = 0;
-
- L2CA_SendFixedChnlData(channel, addr, msg);
-
- tBTA_JV bta_jv;
- bta_jv.l2c_write_fixed = evt_data;
- p_cback(BTA_JV_L2CAP_WRITE_FIXED_EVT, &bta_jv, user_id);
-}
-
/*******************************************************************************
*
* Function bta_jv_port_data_co_cback
}
}
}
-
-/* close a fixed channel connection. calls no callbacks. idempotent */
-extern void bta_jv_l2cap_close_fixed(uint32_t handle) {
- struct fc_client* t = fcclient_find_by_id(handle);
- if (t) fcclient_free(t);
-}
/*******************************************************************************
*
- * Function BTA_JvL2capCloseLE
- *
- * Description This function closes an L2CAP client connection for Fixed
- * Channels Function is idempotent and no callbacks are called!
- *
- * Returns BTA_JV_SUCCESS, if the request is being processed.
- * BTA_JV_FAILURE, otherwise.
- *
- ******************************************************************************/
-tBTA_JV_STATUS BTA_JvL2capCloseLE(uint32_t handle) {
- VLOG(2) << __func__;
-
- do_in_main_thread(FROM_HERE, Bind(&bta_jv_l2cap_close_fixed, handle));
- return BTA_JV_SUCCESS;
-}
-
-/*******************************************************************************
- *
* Function BTA_JvL2capStartServer
*
* Description This function starts an L2CAP server and listens for an
/*******************************************************************************
*
- * Function BTA_JvL2capWriteFixed
- *
- * Description This function writes data to an L2CAP connection
- * When the operation is complete, tBTA_JV_L2CAP_CBACK is
- * called with BTA_JV_L2CAP_WRITE_EVT. Works for
- * fixed-channel connections. This function takes ownership of
- * p_data, and will osi_free it.
- *
- ******************************************************************************/
-void BTA_JvL2capWriteFixed(uint16_t channel, const RawAddress& addr,
- uint32_t req_id, tBTA_JV_L2CAP_CBACK* p_cback,
- BT_HDR* msg, uint32_t user_id) {
- VLOG(2) << __func__;
-
- do_in_main_thread(FROM_HERE, Bind(&bta_jv_l2cap_write_fixed, channel, addr,
- req_id, msg, user_id, p_cback));
-}
-
-/*******************************************************************************
- *
* Function BTA_JvRfcommConnect
*
* Description This function makes an RFCOMM conection to a remote BD
tBTA_JV_CONN_STATE init_st);
extern void bta_jv_l2cap_stop_server_le(uint16_t local_chan);
-extern void bta_jv_l2cap_write_fixed(uint16_t channel, const RawAddress& addr,
- uint32_t req_id, BT_HDR* msg,
- uint32_t user_id,
- tBTA_JV_L2CAP_CBACK* p_cback);
-extern void bta_jv_l2cap_close_fixed(uint32_t handle);
#endif /* BTA_JV_INT_H */