1 /* 2 * Copyright (C) 2023 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_PBAP_PSE_INTERFACE_H 17 #define OHOS_BLUETOOTH_STANDARD_PBAP_PSE_INTERFACE_H 18 19 #include "bluetooth_service_ipc_interface_code.h" 20 #include "i_bluetooth_pbap_pse_observer.h" 21 #include "../parcel/bluetooth_raw_address.h" 22 23 namespace OHOS { 24 namespace Bluetooth { 25 class IBluetoothPbapPse : public OHOS::IRemoteBroker { 26 public: 27 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothPbapPse"); 28 29 virtual int32_t GetDeviceState(const BluetoothRawAddress &device, int32_t &state) = 0; 30 virtual int32_t GetDevicesByStates(const std::vector<int32_t> &states, 31 std::vector<BluetoothRawAddress> &rawDevices) = 0; 32 virtual int32_t Disconnect(const BluetoothRawAddress &device) = 0; 33 virtual int32_t SetConnectionStrategy(const BluetoothRawAddress &device, int32_t strategy) = 0; 34 virtual int32_t GetConnectionStrategy(const BluetoothRawAddress &device, int32_t &strategy) = 0; 35 virtual int32_t SetShareType(const BluetoothRawAddress &device, int32_t shareType) = 0; 36 virtual int32_t GetShareType(const BluetoothRawAddress &device, int32_t &shareType) = 0; 37 virtual int32_t SetPhoneBookAccessAuthorization(const BluetoothRawAddress &device, 38 int32_t accessAuthorization) = 0; 39 virtual int32_t GetPhoneBookAccessAuthorization(const BluetoothRawAddress &device, 40 int32_t &accessAuthorization) = 0; 41 virtual void RegisterObserver(const sptr<IBluetoothPbapPseObserver> &observer) = 0; 42 virtual void DeregisterObserver(const sptr<IBluetoothPbapPseObserver> &observer) = 0; 43 }; 44 } // namespace Bluetooth 45 } // namespace OHOS 46 #endif // OHOS_BLUETOOTH_STANDARD_PBAP_PSE_INTERFACE_H