18bf80f4bSopenharmony_ci/* 28bf80f4bSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 38bf80f4bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 48bf80f4bSopenharmony_ci * you may not use this file except in compliance with the License. 58bf80f4bSopenharmony_ci * You may obtain a copy of the License at 68bf80f4bSopenharmony_ci * 78bf80f4bSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 88bf80f4bSopenharmony_ci * 98bf80f4bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 108bf80f4bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 118bf80f4bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 128bf80f4bSopenharmony_ci * See the License for the specific language governing permissions and 138bf80f4bSopenharmony_ci * limitations under the License. 148bf80f4bSopenharmony_ci */ 158bf80f4bSopenharmony_ci 168bf80f4bSopenharmony_ci#include <core/plugin/intf_plugin.h> 178bf80f4bSopenharmony_ci#include <render/implementation_uids.h> 188bf80f4bSopenharmony_ci#include <render/namespace.h> 198bf80f4bSopenharmony_ci#if defined(CORE_PLUGIN) && (CORE_PLUGIN == 1) 208bf80f4bSopenharmony_ci#include <core/plugin/intf_plugin_decl.h> 218bf80f4bSopenharmony_ci#else 228bf80f4bSopenharmony_ci// Include the declarations directly from engine. 238bf80f4bSopenharmony_ci// NOTE: macro defined by cmake as CORE_STATIC_PLUGIN_HEADER="${CORE_ROOT_DIRECTORY}/src/static_plugin_decl.h" 248bf80f4bSopenharmony_ci// this is so that the core include directories are not leaked here, but we want this one header in this case. 258bf80f4bSopenharmony_ci#include CORE_STATIC_PLUGIN_HEADER 268bf80f4bSopenharmony_ci#endif 278bf80f4bSopenharmony_ci 288bf80f4bSopenharmony_ciCORE_BEGIN_NAMESPACE() 298bf80f4bSopenharmony_ciclass IPluginRegister; 308bf80f4bSopenharmony_ciCORE_END_NAMESPACE() 318bf80f4bSopenharmony_ci 328bf80f4bSopenharmony_ciRENDER_BEGIN_NAMESPACE() 338bf80f4bSopenharmony_ciconst char* GetVersionInfo(); 348bf80f4bSopenharmony_ciCORE_NS::PluginToken RegisterInterfaces(CORE_NS::IPluginRegister&); 358bf80f4bSopenharmony_civoid UnregisterInterfaces(CORE_NS::PluginToken); 368bf80f4bSopenharmony_ciRENDER_END_NAMESPACE() 378bf80f4bSopenharmony_ci 388bf80f4bSopenharmony_cinamespace { 398bf80f4bSopenharmony_ciextern "C" { 408bf80f4bSopenharmony_ciPLUGIN_DATA(AGPRender) { 418bf80f4bSopenharmony_ci { CORE_NS::IPlugin::UID }, 428bf80f4bSopenharmony_ci // name of plugin. 438bf80f4bSopenharmony_ci "AGP Render", 448bf80f4bSopenharmony_ci // Version information of the plugin. 458bf80f4bSopenharmony_ci { RENDER_NS::UID_RENDER_PLUGIN, RENDER_NS::GetVersionInfo }, 468bf80f4bSopenharmony_ci RENDER_NS::RegisterInterfaces, 478bf80f4bSopenharmony_ci RENDER_NS::UnregisterInterfaces, 488bf80f4bSopenharmony_ci {}, 498bf80f4bSopenharmony_ci}; 508bf80f4bSopenharmony_ciDEFINE_STATIC_PLUGIN(AGPRender); 518bf80f4bSopenharmony_ci} 528bf80f4bSopenharmony_ci} // namespace 53