2 // C++ Interface: hil2cap
7 // Author: root <root@ubuntu>, (C) 2008
9 // Copyright: See COPYING file that comes with this distribution
17 #include<sys/socket.h>
38 #define MAX_CMD_STATE_REQUEST 0x0F
39 #define MAX_EVT_COUNT 128
45 __u8 evt_code;//codes of expected ansver event,command status event will be accepted everytime
46 void (*p_serv_rutine)(void);
48 } __attribute__((packed)) cmd_state_request;
55 int (*p_callback)(void *p_arg, void *p_recbuf);
57 } __attribute__((packed)) expect_evt;
62 struct hci_dev_info master;
63 struct hci_dev_info slave;
69 hw_connection_type type;
70 __u16 dev_identif; // like a device descriptor
76 bt_address *p_address;
77 void (*callback_app_read_bd_addr)(bt_address *p_address);
82 void (*callback_app_read_local_name)(char *p_name);
83 }read_local_name_data;
86 bt_address *p_address;
87 void (*callback_app_inquiry_RSSI)(bt_address *p_address);
92 //bt_address *p_address; // address of device whoo iniciated this connection
93 void (*callback_app_connection_complete)(__u16 *p_handle, bt_address *p_address);
94 }connection_complete_data;
97 extern int create_master_connection(connection_hci *p_connection);
98 extern int show_all_local_dev(struct hci_dev_info *master);
99 extern int show_all_remote_dev(struct hci_dev_info *master, bt_address *p_remadrar,int *p_remd_count);
101 extern int l2cap_call_cmd(__u16 ocf_ogf,int dd, void *p_param);
103 extern int req_fcn_add(cmd_state_request *p_req);
104 extern void req_fcn_remove(void);
106 extern void *rutine_catch_bd_addr(void *arg);