1 /* 2 * Copyright (C) 2021 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_AVRCP_CT_SERVER_H 16 #define OHOS_BLUETOOTH_STANDARD_AVRCP_CT_SERVER_H 17 18 #include "bluetooth_avrcp_ct_stub.h" 19 #include "bluetooth_types.h" 20 #include "system_ability.h" 21 22 namespace OHOS { 23 namespace Bluetooth { 24 class BluetoothAvrcpCtServer : public BluetoothAvrcpCtStub { 25 public: 26 BluetoothAvrcpCtServer(); 27 ~BluetoothAvrcpCtServer(); 28 29 virtual void RegisterObserver(const sptr<IBluetoothAvrcpCtObserver> &observer) override; 30 virtual void UnregisterObserver(const sptr<IBluetoothAvrcpCtObserver> &observer) override; 31 32 virtual std::vector<RawAddress> GetConnectedDevices() override; 33 virtual std::vector<RawAddress> GetDevicesByStates(const std::vector<int32_t> &states) override; 34 virtual int32_t GetDeviceState(const RawAddress &device) override; 35 virtual int32_t Connect(const RawAddress &device) override; 36 virtual int32_t Disconnect(const RawAddress &device) override; 37 virtual int32_t PressButton(const RawAddress &device, int32_t button) override; 38 virtual int32_t ReleaseButton(const RawAddress &device, int32_t button) override; 39 virtual int32_t GetUnitInfo(const RawAddress &device) override; 40 virtual int32_t GetSubUnitInfo(const RawAddress &device) override; 41 virtual int32_t GetSupportedCompanies(const RawAddress &device) override; 42 virtual int32_t GetSupportedEvents(const RawAddress &device) override; 43 virtual int32_t GetPlayerAppSettingAttributes(const RawAddress &device) override; 44 virtual int32_t GetPlayerAppSettingValues(const RawAddress &device, int32_t attribute) override; 45 virtual int32_t GetPlayerAppSettingCurrentValue(const RawAddress &device, 46 const std::vector<int32_t> &attributes) override; 47 virtual int32_t SetPlayerAppSettingCurrentValue(const RawAddress &device, 48 const std::vector<int32_t> &attributes, const std::vector<int32_t> &values) override; 49 virtual int32_t GetPlayerAppSettingAttributeText(const RawAddress &device, 50 const std::vector<int32_t> &attributes) override; 51 virtual int32_t GetPlayerAppSettingValueText(const RawAddress &device, int32_t attributes, 52 const std::vector<int32_t> &values) override; 53 virtual int32_t GetElementAttributes(const RawAddress &device, 54 const std::vector<int32_t> &attributes) override; 55 virtual int32_t GetPlayStatus(const RawAddress &device) override; 56 virtual int32_t PlayItem(const RawAddress &device, int32_t scope, int64_t uid, int32_t uidCounter) override; 57 virtual int32_t GetFolderItems(const RawAddress &device, int32_t startItem, int32_t endItem, 58 const std::vector<int32_t> &attributes) override; 59 virtual int32_t GetTotalNumberOfItems(const RawAddress &device, int32_t scope) override; 60 virtual int32_t SetAbsoluteVolume(const RawAddress &device, int32_t volume) override; 61 virtual int32_t EnableNotification(const RawAddress &device, 62 const std::vector<int32_t> &events, int32_t interval) override; 63 virtual int32_t DisableNotification(const RawAddress &device, const std::vector<int32_t> &events) override; 64 virtual int32_t GetItemAttributes(const RawAddress &device, int64_t uid, int32_t uidCounter, 65 const std::vector<int32_t> &attributes) override; 66 virtual int32_t SetBrowsedPlayer(const RawAddress &device, int32_t playerId) override; 67 virtual int32_t GetMeidaPlayerList(const RawAddress &device, int32_t startItem, int32_t endItem) override; 68 private: 69 BLUETOOTH_DECLARE_IMPL(); 70 BLUETOOTH_DISALLOW_COPY_AND_ASSIGN(BluetoothAvrcpCtServer); 71 }; 72 } // namespace Bluetooth 73 } // namespace OHOS 74 #endif // OHOS_BLUETOOTH_STANDARD_AVRCP_CT_SERVER_H