• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*******************************************************************************
2  *  L2CAP Socket Interface
3  *******************************************************************************/
4 
5 #ifndef BTIF_SOCK_L2CAP_H
6 #define BTIF_SOCK_L2CAP_H
7 
8 #include "btif_uid.h"
9 
10 #include <hardware/bluetooth.h>
11 
12 #define L2CAP_MASK_FIXED_CHANNEL    0x10000
13 #define L2CAP_MASK_LE_COC_CHANNEL   0x20000
14 
15 bt_status_t btsock_l2cap_init(int handle, uid_set_t* set);
16 bt_status_t btsock_l2cap_cleanup();
17 bt_status_t btsock_l2cap_listen(const char* name, int channel,
18                               int* sock_fd, int flags, int app_uid);
19 bt_status_t btsock_l2cap_connect(const bt_bdaddr_t *bd_addr,
20                                int channel, int* sock_fd, int flags, int app_uid);
21 void btsock_l2cap_signaled(int fd, int flags, uint32_t user_id);
22 void on_l2cap_psm_assigned(int id, int psm);
23 
24 #endif
25 
26