| 1 |
#pragma once |
| 2 |
#define ERR_CANNOT_ALLOCATE -1 |
| 3 |
#define ERR_HCI_DEV_OPEN_FAILED -2 |
| 4 |
#define ERR_NOT_CONNECTED -3 |
| 5 |
#define ERR_GET_CONN_INFO_FAILED -4 |
| 6 |
#define ERR_READ_RSSI_FAILED -5 |
| 7 |
#define ERR_READ_TPL_FAILED -6 |
| 8 |
#define ERR_GET_RFCOMM_LIST_FAILED -8 |
| 9 |
#define ERR_SOCKET_FAILED -9 |
| 10 |
#define ERR_BIND_FAILED -12 |
| 11 |
#define ERR_CONNECT_FAILED -13 |
| 12 |
#define ERR_CREATE_DEV_FAILED -14 |
| 13 |
#define ERR_RELEASE_DEV_FAILED -15 |
| 14 |
|
| 15 |
struct conn_info_handles { |
| 16 |
unsigned int handle; |
| 17 |
int dd; |
| 18 |
}; |
| 19 |
|
| 20 |
int connection_init(int dev_id, char *addr, struct conn_info_handles *ci); |
| 21 |
int connection_get_rssi(struct conn_info_handles *ci, int8_t *ret_rssi); |
| 22 |
int connection_get_tpl(struct conn_info_handles *ci, int8_t *ret_tpl, uint8_t type); |
| 23 |
int connection_close(struct conn_info_handles *ci); |
| 24 |
int get_rfcomm_channel(uint16_t uuid, char* btd_addr); |
| 25 |
int get_rfcomm_list(struct rfcomm_dev_list_req **result); |
| 26 |
int create_rfcomm_device(char *local_address, char *remote_address, int channel); |
| 27 |
int release_rfcomm_device(int id); |
| 28 |
|
| 29 |
int _create_bridge(const char* name); |
| 30 |
int _destroy_bridge(const char* name); |