• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  *  Copyright 2014 Google, Inc.
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License");
6  *  you may not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at:
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  ******************************************************************************/
18 
19 #pragma once
20 
21 #include "bt_types.h"
22 #include "btcore/include/event_mask.h"
23 
24 typedef struct {
25   BT_HDR* (*make_reset)(void);
26   BT_HDR* (*make_read_buffer_size)(void);
27   BT_HDR* (*make_host_buffer_size)(uint16_t acl_size, uint8_t sco_size,
28                                    uint16_t acl_count, uint16_t sco_count);
29   BT_HDR* (*make_read_local_version_info)(void);
30   BT_HDR* (*make_read_bd_addr)(void);
31   BT_HDR* (*make_read_local_supported_commands)(void);
32   BT_HDR* (*make_read_local_extended_features)(uint8_t page_number);
33   BT_HDR* (*make_write_simple_pairing_mode)(uint8_t mode);
34   BT_HDR* (*make_write_secure_connections_host_support)(uint8_t mode);
35   BT_HDR* (*make_set_event_mask)(const bt_event_mask_t* event_mask);
36   BT_HDR* (*make_ble_write_host_support)(uint8_t supported_host,
37                                          uint8_t simultaneous_host);
38   BT_HDR* (*make_ble_read_acceptlist_size)(void);
39   BT_HDR* (*make_ble_read_buffer_size)(void);
40   BT_HDR* (*make_ble_read_buffer_size_v2)(void);
41   BT_HDR* (*make_ble_read_supported_states)(void);
42   BT_HDR* (*make_ble_read_local_supported_features)(void);
43   BT_HDR* (*make_ble_read_resolving_list_size)(void);
44   BT_HDR* (*make_ble_read_suggested_default_data_length)(void);
45   BT_HDR* (*make_ble_read_maximum_data_length)(void);
46   BT_HDR* (*make_ble_read_maximum_advertising_data_length)(void);
47   BT_HDR* (*make_ble_read_number_of_supported_advertising_sets)(void);
48   BT_HDR* (*make_ble_read_periodic_advertiser_list_size)(void);
49   BT_HDR* (*make_ble_set_event_mask)(const bt_event_mask_t* event_mask);
50   BT_HDR* (*make_ble_set_host_features)(uint8_t bit_number, uint8_t bit_value);
51   BT_HDR* (*make_read_local_supported_codecs)(void);
52 } hci_packet_factory_t;
53 
54 const hci_packet_factory_t* hci_packet_factory_get_interface();
55