• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 
3 #pragma once
4 
5 #include <list>
6 #include <map>
7 #include <string>
8 
9 #include "include/hardware/bluetooth.h"
10 
11 using acl_state_changed_params_t = struct {
12   bt_status_t status;
13   RawAddress* remote_bd_addr;
14   bt_acl_state_t state;
15   bt_hci_error_code_t hci_reason;
16 };
17 
18 using callback_params_t = union {
19   acl_state_changed_params_t acl_state_changed;
20 };
21 
22 using interface_data_t = struct {
23   std::string name;
24   callback_params_t params;
25 };
26 
27 using callback_function_t = void (*)(interface_data_t);
28 using interface_callback_t = struct {
29   std::string name;
30   callback_function_t function;
31 };
32 
33 void headless_add_callback(const std::string interface_name,
34                            callback_function_t function);
35 void headless_remove_callback(const std::string interface_name,
36                               callback_function_t function);
37