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 "stack/acl/acl.h" 21 #include "stack/include/btm_api_types.h" // tBTM_PM_PWR_MD 22 #include "types/raw_address.h" 23 24 namespace bluetooth { 25 namespace shim { 26 27 bool RegisterLinkPolicyClient(tBTM_PM_STATUS_CBACK* p_cb); 28 bool UnregisterLinkPolicyClient(tBTM_PM_STATUS_CBACK* p_cb); 29 30 bool SetHoldMode(uint16_t handle, uint16_t max_interval, uint16_t min_interval); 31 bool SetSniffMode(uint16_t handle, uint16_t max_interval, uint16_t min_interval, 32 uint16_t attempt, uint16_t timeout); 33 bool ExitSniffMode(uint16_t handle); 34 bool SetSniffSubrating(uint16_t handle, uint16_t maximum_latency, 35 uint16_t minimum_remote_timeout, 36 uint16_t minimum_local_timeout); 37 38 tBTM_STATUS BTM_SetPowerMode(uint16_t handle, const tBTM_PM_PWR_MD& mode); 39 void btm_pm_on_mode_change(tHCI_STATUS status, uint16_t handle, 40 tHCI_MODE current_mode, uint16_t interval); 41 42 tBTM_STATUS BTM_SetSsrParams(uint16_t handle, uint16_t max_lat, 43 uint16_t min_rmt_to, uint16_t min_loc_to); 44 void btm_pm_on_sniff_subrating(tHCI_STATUS status, uint16_t handle, 45 uint16_t maximum_transmit_latency, 46 uint16_t maximum_receive_latency, 47 uint16_t minimum_remote_timeout, 48 uint16_t minimum_local_timeout); 49 } // namespace shim 50 } // namespace bluetooth 51