1 /******************************************************************************
2  *
3  *  Copyright 2016 The Android Open Source Project
4  *  Copyright 2009-2012 Broadcom Corporation
5  *
6  *  Licensed under the Apache License, Version 2.0 (the "License");
7  *  you may not use this file except in compliance with the License.
8  *  You may obtain a copy of the License at:
9  *
10  *  http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *  Unless required by applicable law or agreed to in writing, software
13  *  distributed under the License is distributed on an "AS IS" BASIS,
14  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *  See the License for the specific language governing permissions and
16  *  limitations under the License.
17  *
18  ******************************************************************************/
19 
20 #ifndef BTIF_HD_H
21 #define BTIF_HD_H
22 
23 #include <bluetooth/log.h>
24 #include <hardware/bluetooth.h>
25 #include <hardware/bt_hd.h>
26 #include <stdint.h>
27 
28 #include "bta/include/bta_hd_api.h"
29 #include "types/raw_address.h"
30 
31 typedef enum {
32   BTIF_HD_DISABLED = 0,
33   BTIF_HD_ENABLED,
34   BTIF_HD_DISABLING
35 } BTIF_HD_STATUS;
36 
37 /* BTIF-HD control block */
38 typedef struct {
39   BTIF_HD_STATUS status;
40   bool app_registered;
41   bool service_dereg_active;
42   bool forced_disc;
43 } btif_hd_cb_t;
44 
45 extern btif_hd_cb_t btif_hd_cb;
46 
47 void btif_hd_remove_device(RawAddress bd_addr);
48 void btif_hd_service_registration();
49 
50 namespace fmt {
51 template <>
52 struct formatter<BTIF_HD_STATUS> : enum_formatter<BTIF_HD_STATUS> {};
53 }  // namespace fmt
54 
55 #endif
56