1 /* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_BLUETOOTH_STANDARD_PAN_SERVER_H 17 #define OHOS_BLUETOOTH_STANDARD_PAN_SERVER_H 18 19 #include <map> 20 21 #include "bt_def.h" 22 #include "bluetooth_pan_stub.h" 23 #include "bluetooth_types.h" 24 #include "i_bluetooth_pan.h" 25 #include "if_system_ability_manager.h" 26 #include "iservice_registry.h" 27 #include "system_ability.h" 28 #include "interface_adapter_manager.h" 29 #include "interface_profile_manager.h" 30 31 namespace OHOS { 32 namespace Bluetooth { 33 class BluetoothPanServer : public BluetoothPanStub { 34 public: 35 BluetoothPanServer(); 36 ~BluetoothPanServer() override; 37 38 int32_t Disconnect(const BluetoothRawAddress &device) override; 39 40 int32_t GetDeviceState(const BluetoothRawAddress &device, int32_t &state) override; 41 42 int32_t GetDevicesByStates( 43 const std::vector<int32_t> &states, 44 std::vector<BluetoothRawAddress>& result) override; 45 46 ErrCode RegisterObserver( 47 const sptr<IBluetoothPanObserver> observer) override; 48 49 ErrCode DeregisterObserver( 50 const sptr<IBluetoothPanObserver> observer) override; 51 52 int32_t SetTethering(const bool enable) override; 53 54 int32_t IsTetheringOn(bool& result) override; 55 56 private: 57 BLUETOOTH_DISALLOW_COPY_AND_ASSIGN(BluetoothPanServer); 58 BLUETOOTH_DECLARE_IMPL(); 59 }; 60 } // namespace Bluetooth 61 } // namespace OHOS 62 #endif // OHOS_BLUETOOTH_STANDARD_PAN_SERVER_H