1 #ifndef DALI_INTERNAL_ADDON_MANAGER_IMPL
2 #define DALI_INTERNAL_ADDON_MANAGER_IMPL
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>
32 * Base class for platform-specific implementation of AddOnManager
41 AddOnManager() = default;
47 virtual ~AddOnManager() = default;
50 * @brief Registers the dispatch table with AddOnManager.
51 * @param[in] dispatchTable Pointer to the valid dispatch table
53 virtual void RegisterAddOnDispatchTable( const AddOnDispatchTable* dispatchTable ) = 0;
56 * @brief Retrieves list of the available AddOns
57 * @return List of AddOn names
59 virtual std::vector<std::string> EnumerateAddOns() = 0;
62 * @brief Returns AddOnInfo structure for specified AddOn name
63 * @param[in] name Name of AddOn
64 * @param[out]] info Output reference
65 * @return True on success, False if extension info cannot be retrieved
67 virtual bool GetAddOnInfo(const std::string& name, AddOnInfo& info ) = 0;
70 * @brief Loads and initialises specified AddOns
71 * @param[in] extensionNames Array of extension names
72 * @return vector of initialised AddOnLibrary handles
74 virtual std::vector<Dali::AddOnLibrary> LoadAddOns( const std::vector<std::string>& addonNames ) = 0;
77 * @brief Returns AddOn global function pointer
78 * @param[in] addOnLibrary valid AddOn library object
79 * @param[in] procName Name of the function to retrieve
80 * @return Pointer to the function or null if function doesn't exist
82 virtual void* GetGlobalProc( const Dali::AddOnLibrary& addonHandle, const char* procName ) = 0;
85 * @brief Returns addon instance function pointer
86 * @param[in] addOnLibrary valid AddOn library object
87 * @param[in] procName Name of the function to retrieve
88 * @return Pointer to the function or null if function doesn't exist
90 virtual void* GetInstanceProc( const Dali::AddOnLibrary& addonHandle, const char* procName ) = 0;
93 * @brief Pause lifecycle event
94 * Implementation is optional and depends whether AddOn needs to handle lifecycle event.
96 virtual void Pause() {}
99 * @brief Resume lifecycle event
100 * Implementation is optional and depends whether AddOn needs to handle lifecycle event.
102 virtual void Resume() {}
105 * @brief Start lifecycle event
106 * Implementation is optional and depends whether AddOn needs to handle lifecycle event.
108 virtual void Start() {}
111 * @brief Stop lifecycle event
112 * Implementation is optional and depends whether AddOn needs to handle lifecycle event.
114 virtual void Stop() {}
121 #endif // DALI_CMAKE_EXTENSION_MANAGER_IMPL