File indexing completed on 2025-02-16 05:11:52
0001 /* 0002 // Copyright 2023 Codethink Ltd <codethink@codethink.co.uk> 0003 // SPDX-License-Identifier: Apache-2.0 0004 // 0005 // Licensed under the Apache License, Version 2.0 (the "License"); 0006 // you may not use this file except in compliance with the License. 0007 // You may obtain a copy of the License at 0008 // 0009 // http://www.apache.org/licenses/LICENSE-2.0 0010 // 0011 // Unless required by applicable law or agreed to in writing, software 0012 // distributed under the License is distributed on an "AS IS" BASIS, 0013 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 // See the License for the specific language governing permissions and 0015 // limitations under the License. 0016 */ 0017 0018 #include <ct_lvtplg_basicpluginhandlers.h> 0019 #include <ct_lvtplg_basicpluginhooks.h> 0020 0021 auto constexpr PLUGIN_ID = "cppTestPlugin"; 0022 0023 struct TestPluginData { }; 0024 0025 void hookSetupPlugin(PluginSetupHandler *handler) 0026 { 0027 handler->registerPluginData(PLUGIN_ID, new TestPluginData{}); 0028 } 0029 0030 void hookTeardownPlugin(PluginSetupHandler *handler) 0031 { 0032 auto *data = static_cast<TestPluginData *>(handler->getPluginData(PLUGIN_ID)); 0033 handler->unregisterPluginData(PLUGIN_ID); 0034 delete data; 0035 }