/* * Copyright (C) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef AVRCP_MEDIA_H #define AVRCP_MEDIA_H #include #include #include #include "cstdint" #include "iosfwd" namespace OHOS { namespace bluetooth { /** * @brief This class provides a set of attributes for saving the packet of the Media player item. * @see Audio/Video Remote Control 1.6.2 Section 6.10.2.1 Media player item. * * @since 6.0 */ class AvrcMpItem { public: AvrcMpItem(uint8_t itemType, uint16_t playerId, uint8_t majorType, uint32_t subType, uint8_t playStatus, const std::vector &features, const std::string &name); AvrcMpItem() = default; AvrcMpItem(const AvrcMpItem& other) = default; ~AvrcMpItem() = default; uint8_t itemType_ = 0; // The value of the "Item Type ". uint16_t playerId_ = 0; // The value of the "Player Id". uint8_t majorType_ = 0; // The value of the "Major Player Type". Refer to AvrcMediaMajorPlayerType. uint32_t subType_ = 0; // The value of the "Player Sub Type". Refer to AvrcMediaPlayerSubType. uint8_t playStatus_ = 0; // The value of the "Play Status". Refer to AvrcPlayStatus. std::vector features_ {}; // The value of the "Feature Bit Mask". std::string name_ {}; // The value of the "Displayable Name". }; /** * @brief This class provides a set of attributes for saving the packet of the Media player item. * @see Audio/Video Remote Control 1.6.2 Section 6.10.2.2 Folder item and Section 6.10.2.3 Media element item. * * @since 6.0 */ class AvrcMeItem { public: AvrcMeItem(uint8_t itemType, uint64_t uid, uint8_t type, uint8_t playable, const std::string &name, const std::vector &attributes, const std::vector &values); AvrcMeItem() = default; AvrcMeItem(const AvrcMeItem& other) = default; ~AvrcMeItem() = default; uint8_t itemType_ = 0; // The value of the "Item Type ". // The value of the "Folder UID" and the "Media Element UID". uint64_t uid_ = 0; // The value of the "Folder Type" and the "Media Type". Refer to AvrcMediaFolderType and // AvrcMediaElementType. uint8_t type_ = 0; // The value of the "Is Playable". Refer to AvrcMediaFolderPlayable. uint8_t playable_ = 0; // The value of the "Displayable Name". std::string name_ {}; // The list of the "Attribute ID". Refer to AvrcMediaAttribute. std::vector attributes_ {}; // The list of the "Attribute Value". std::vector values_ {}; }; } // namespace bluetooth } // namespace OHOS #endif // AVRCP_MEDIA_H