1 /******************************************************************************* 2 * L2CAP Socket Interface 3 ******************************************************************************/ 4 5 #ifndef BTIF_SOCK_L2CAP_H 6 #define BTIF_SOCK_L2CAP_H 7 8 #include <hardware/bluetooth.h> 9 10 #include "btif_uid.h" 11 #include "types/raw_address.h" 12 13 bt_status_t btsock_l2cap_init(int handle, uid_set_t* set); 14 bt_status_t btsock_l2cap_cleanup(); 15 bt_status_t btsock_l2cap_listen(const char* name, int channel, int* sock_fd, 16 int flags, int app_uid); 17 bt_status_t btsock_l2cap_connect(const RawAddress* bd_addr, int channel, 18 int* sock_fd, int flags, int app_uid); 19 void btsock_l2cap_signaled(int fd, int flags, uint32_t user_id); 20 void on_l2cap_psm_assigned(int id, int psm); 21 bt_status_t btsock_l2cap_disconnect(const RawAddress* bd_addr); 22 bt_status_t btsock_l2cap_get_l2cap_local_cid(bluetooth::Uuid& conn_uuid, 23 uint16_t* cid); 24 bt_status_t btsock_l2cap_get_l2cap_remote_cid(bluetooth::Uuid& conn_uuid, 25 uint16_t* cid); 26 27 #endif 28