1 #ifndef TEST_ADDON_MANAGER_H
2 #define TEST_ADDON_MANAGER_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 #include <dali/integration-api/addon-manager.h>
22 #include <dali/public-api/common/vector-wrapper.h>
29 class AddOnManager : public Dali::Integration::AddOnManager
34 * @brief Constructor, initialised by the Adaptor
36 AddOnManager() = default;
41 ~AddOnManager() override = default;
43 std::vector<std::string> EnumerateAddOns() override;
45 bool GetAddOnInfo(const std::string& name, AddOnInfo& info ) override;
47 std::vector<AddOnLibrary> LoadAddOns( const std::vector<std::string>& addonNames ) override;
49 void* GetGlobalProc( const Dali::AddOnLibrary& addOnLibrary, const char* procName ) override;
51 void* GetInstanceProc( const Dali::AddOnLibrary& addOnLibrary, const char* procName ) override;
53 void RegisterAddOnDispatchTable( const AddOnDispatchTable* dispatchTable ) override;
55 void Start() override;
57 void Resume() override;
61 void Pause() override;
63 struct AddOnCacheEntry
69 void* handle {nullptr};
71 // main function pointers
72 void(*GetAddOnInfo)(AddOnInfo& ) = nullptr; ///< Returns AddOnInfo structure
73 void*(*GetInstanceProc)( const char* ) = nullptr; ///< Returns pointer of instance function (member funtion)
74 void*(*GetGlobalProc)( const char* ) = nullptr; ///< Returns pointer of global function (non-member function)
76 void(*OnStart)() = nullptr;
77 void(*OnResume)() = nullptr;
78 void(*OnPause)() = nullptr;
79 void(*OnStop)() = nullptr;
84 std::vector<AddOnCacheEntry> mAddOnCache;
89 #endif // TEST_ADDON_MANAGER_H