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 16 #ifndef PRIORITY_SCHEME_H 17 #define PRIORITY_SCHEME_H 18 19 #include <string> 20 21 namespace OHOS { 22 namespace MultimediaPlugin { 23 enum class PriorityType : int32_t { 24 PRIORITY_TYPE_NULL, 25 PRIORITY_ORDER_BY_ATTR_ASCENDING, 26 PRIORITY_ORDER_BY_ATTR_DESCENDING 27 }; 28 29 class PriorityScheme final { 30 public: PriorityScheme()31 PriorityScheme() : type_(PriorityType::PRIORITY_TYPE_NULL) {} PriorityScheme(PriorityType type,const std::string & attrKey)32 PriorityScheme(PriorityType type, const std::string &attrKey) : type_(type), attrKey_(attrKey) {} PriorityScheme(PriorityType type,std::string && attrKey)33 PriorityScheme(PriorityType type, std::string &&attrKey) : type_(type), attrKey_(std::move(attrKey)) {} 34 ~PriorityScheme() = default; 35 GetPriorityType()36 PriorityType GetPriorityType() const 37 { 38 return type_; 39 } 40 GetAttrKey()41 const std::string &GetAttrKey() const 42 { 43 return attrKey_; 44 } 45 46 private: 47 PriorityType type_; 48 std::string attrKey_; 49 }; 50 } // namespace MultimediaPlugin 51 } // namespace OHOS 52 53 #endif // PRIORITY_SCHEME_H 54