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 #ifndef OHOS_BLUETOOTH_STANDARD_PBAP_PSE_INTERFACE_H 16 #define OHOS_BLUETOOTH_STANDARD_PBAP_PSE_INTERFACE_H 17 18 #include "../parcel/bluetooth_pbap_pce_parameter.h" 19 #include "../parcel/bluetooth_raw_address.h" 20 #include "bluetooth_service_ipc_interface_code.h" 21 #include "iremote_broker.h" 22 #include "pbap_pce_parameter.h" 23 #include "i_bluetooth_pbap_pse_observer.h" 24 25 namespace OHOS { 26 namespace Bluetooth { 27 class IBluetoothPbapPse : public OHOS::IRemoteBroker { 28 public: 29 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothPbapPse"); 30 31 virtual int GetDeviceState(const BluetoothRawAddress& device) = 0; 32 virtual void GetDevicesByStates( 33 const ::std::vector<int32_t> tmpStates, std::vector<BluetoothRawAddress> &rawDevices) = 0; 34 virtual int Disconnect(const BluetoothRawAddress& device) = 0; 35 virtual int SetConnectionStrategy(const BluetoothRawAddress& device, int32_t strategy) = 0; 36 virtual int GetConnectionStrategy(const BluetoothRawAddress& device) = 0; 37 virtual void GrantPermission(const BluetoothRawAddress& device, bool allow, bool save) = 0; 38 virtual int SetDevicePassword( 39 const BluetoothRawAddress& device, const std::string &password, const std::string &userId) = 0; 40 virtual void RegisterObserver(const sptr<IBluetoothPbapPseObserver>& observer) = 0; 41 virtual void DeregisterObserver(const sptr<IBluetoothPbapPseObserver>& observer) = 0; 42 virtual std::vector<BluetoothRawAddress> GetConnectedDevices() = 0; 43 }; 44 } // namespace Bluetooth 45 } // namespace OHOS 46 #endif // OHOS_BLUETOOTH_STANDARD_PBAP_PSE_INTERFACE_H