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 PLUGIN_FW_H 17 #define PLUGIN_FW_H 18 19 #include <map> 20 #include <string> 21 #include <vector> 22 #include "nocopyable.h" 23 #include "singleton.h" 24 #include "attr_data.h" 25 #include "plugin_class_base.h" 26 #include "plugin_common_type.h" 27 #include "plugin_errors.h" 28 #include "priority_scheme.h" 29 30 namespace OHOS { 31 namespace MultimediaPlugin { 32 class PluginMgr; 33 class ImplClassMgr; 34 35 class PluginFw final : public NoCopyable { 36 public: 37 uint32_t Register(const std::vector<std::string> &canonicalPaths); 38 PluginClassBase *CreateObject(uint16_t interfaceID, const std::string &className, uint32_t &errorCode); 39 PluginClassBase *CreateObject(uint16_t interfaceID, uint16_t serviceType, 40 const std::map<std::string, AttrData> &capabilities, 41 const PriorityScheme &priorityScheme, uint32_t &errorCode); 42 uint32_t PluginFwGetClassInfo(uint16_t interfaceID, uint16_t serviceType, 43 const std::map<std::string, AttrData> &capabilities, 44 std::vector<ClassInfo> &classesInfo); 45 DECLARE_DELAYED_REF_SINGLETON(PluginFw); 46 47 private: 48 PluginMgr &pluginMgr_; 49 ImplClassMgr &implClassMgr_; 50 }; 51 } // namespace MultimediaPlugin 52 } // namespace OHOS 53 54 #endif // PLUGIN_FW_H 55