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_AVRCP_CT_INTERFACE_H 17 #define OHOS_BLUETOOTH_STANDARD_AVRCP_CT_INTERFACE_H 18 19 #include <cstdint> 20 #include <vector> 21 22 #include "bluetooth_service_ipc_interface_code.h" 23 #include "iremote_broker.h" 24 #include "i_bluetooth_avrcp_ct_observer.h" 25 #include "../common/raw_address.h" 26 27 namespace OHOS { 28 namespace Bluetooth { 29 using namespace OHOS::bluetooth; 30 class IBluetoothAvrcpCt : public OHOS::IRemoteBroker { 31 public: 32 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.ipc.IBluetoothAvrcpCt"); 33 34 virtual void RegisterObserver(const sptr<IBluetoothAvrcpCtObserver> &observer) = 0; 35 virtual void UnregisterObserver(const sptr<IBluetoothAvrcpCtObserver> &observer) = 0; 36 37 virtual std::vector<RawAddress> GetConnectedDevices() = 0; 38 virtual std::vector<RawAddress> GetDevicesByStates(const std::vector<int32_t> &states) = 0; 39 virtual int32_t GetDeviceState(const RawAddress &device) = 0; 40 virtual int32_t Connect(const RawAddress &device) = 0; 41 virtual int32_t Disconnect(const RawAddress &device) = 0; 42 virtual int32_t PressButton(const RawAddress &device, int32_t button) = 0; 43 virtual int32_t ReleaseButton(const RawAddress &device, int32_t button) = 0; 44 virtual int32_t GetUnitInfo(const RawAddress &device) = 0; 45 virtual int32_t GetSubUnitInfo(const RawAddress &device) = 0; 46 virtual int32_t GetSupportedCompanies(const RawAddress &device) = 0; 47 virtual int32_t GetSupportedEvents(const RawAddress &device) = 0; 48 virtual int32_t GetPlayerAppSettingAttributes(const RawAddress &device) = 0; 49 virtual int32_t GetPlayerAppSettingValues(const RawAddress &device, int32_t attribute) = 0; 50 virtual int32_t GetPlayerAppSettingCurrentValue(const RawAddress &device, 51 const std::vector<int32_t> &attributes) = 0; 52 virtual int32_t SetPlayerAppSettingCurrentValue(const RawAddress &device, 53 const std::vector<int32_t> &attributes, const std::vector<int32_t> &values) = 0; 54 virtual int32_t GetPlayerAppSettingAttributeText(const RawAddress &device, 55 const std::vector<int32_t> &attributes) = 0; 56 virtual int32_t GetPlayerAppSettingValueText(const RawAddress &device, int32_t attributes, 57 const std::vector<int32_t> &values) = 0; 58 virtual int32_t GetElementAttributes(const RawAddress &device, 59 const std::vector<int32_t> &attributes) = 0; 60 virtual int32_t GetPlayStatus(const RawAddress &device) = 0; 61 virtual int32_t PlayItem(const RawAddress &device, int32_t scope, int64_t uid, int32_t uidCounter) = 0; 62 virtual int32_t GetFolderItems(const RawAddress &device, int32_t startItem, int32_t endItem, 63 const std::vector<int32_t> &attributes) = 0; 64 virtual int32_t GetTotalNumberOfItems(const RawAddress &device, int32_t scope) = 0; 65 virtual int32_t SetAbsoluteVolume(const RawAddress &device, int32_t volume) = 0; 66 virtual int32_t EnableNotification(const RawAddress &device, 67 const std::vector<int32_t> &events, int32_t interval) = 0; 68 virtual int32_t DisableNotification(const RawAddress &device, 69 const std::vector<int32_t> &events) = 0; 70 virtual int32_t GetItemAttributes(const RawAddress &device, int64_t uid, int32_t uidCounter, 71 const std::vector<int32_t> &attributes) = 0; 72 virtual int32_t SetBrowsedPlayer(const RawAddress &device, int32_t playerId) = 0; 73 virtual int32_t GetMeidaPlayerList(const RawAddress &device, int32_t startItem, int32_t endItem) = 0; 74 }; 75 } // namespace Bluetooth 76 } // namespace OHOS 77 #endif // OHOS_BLUETOOTH_STANDARD_AVRCP_CT_INTERFACE_H