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_PCE_INTERFACE_H 16 #define OHOS_BLUETOOTH_STANDARD_PBAP_PCE_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_pce_observer.h" 24 25 namespace OHOS { 26 namespace Bluetooth { 27 class IBluetoothPbapPce : public OHOS::IRemoteBroker { 28 public: 29 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothPbapPce"); 30 31 virtual int GetDeviceState(const BluetoothRawAddress &device) = 0; 32 virtual int Connect(const BluetoothRawAddress &device) = 0; 33 virtual int PullPhoneBook(const BluetoothRawAddress &device, const BluetoothIPbapPullPhoneBookParam ¶m) = 0; 34 virtual int SetPhoneBook(const BluetoothRawAddress &device, const std::u16string &name, int32_t flag) = 0; 35 virtual int PullvCardListing(const BluetoothRawAddress &device, const BluetoothIPbapPullvCardListingParam ¶m) = 0; 36 virtual int PullvCardEntry(const BluetoothRawAddress &device, const BluetoothIPbapPullvCardEntryParam ¶m) = 0; 37 virtual bool IsDownloading(const BluetoothRawAddress &device) = 0; 38 virtual int AbortDownloading(const BluetoothRawAddress &device) = 0; 39 virtual int SetDevicePassword(const BluetoothRawAddress &device, const std::string &password, const std::string &userId) = 0; 40 virtual int Disconnect(const BluetoothRawAddress &device) = 0; 41 virtual int SetConnectionStrategy(const BluetoothRawAddress &device, int32_t strategy) = 0; 42 virtual int GetConnectionStrategy(const BluetoothRawAddress &device) = 0; 43 virtual void GetDevicesByStates(const std::vector<int32_t> tmpStates, std::vector<BluetoothRawAddress> &rawDevices) = 0; 44 virtual void RegisterObserver(const sptr<IBluetoothPbapPceObserver> &observer) = 0; 45 virtual void DeregisterObserver(const sptr<IBluetoothPbapPceObserver> &observer) = 0; 46 virtual ::std::vector<BluetoothRawAddress> GetConnectedDevices() = 0; 47 48 }; 49 } // namespace Bluetooth 50 } // namespace OHOS 51 #endif // OHOS_BLUETOOTH_STANDARD_PBAP_PCE_INTERFACE_H