1 /*
2  * Copyright 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cstdint>
20 #include <functional>
21 
22 #include "include/hardware/bluetooth.h"
23 #include "types/raw_address.h"
24 
25 namespace bluetooth {
26 namespace shim {
27 
28 /**
29  * Sets handler to SecurityModule and provides callback to handler
30  */
31 void BTIF_DM_SetUiCallback(std::function<void(RawAddress, bt_bdname_t, uint32_t, bt_ssp_variant_t, uint32_t)> callback);
32 void BTIF_DM_ssp_reply(const RawAddress bd_addr, uint8_t, bt_ssp_variant_t variant, uint8_t accept);
33 void BTIF_DM_pin_reply(const RawAddress bd_addr, uint8_t, uint8_t, uint8_t, bt_pin_code_t);
34 void BTIF_RegisterBondStateChangeListener(
35     std::function<void(RawAddress)> bond_state_bonding_cb,
36     std::function<void(RawAddress)> bond_state_bonded_cb,
37     std::function<void(RawAddress)> bond_state_none_cb);
38 }  // namespace shim
39 }  // namespace bluetooth
40