1 #ifndef DALI_ADAPTOR_COMMON_ADDON_MANAGER
2 #define DALI_ADAPTOR_COMMON_ADDON_MANAGER
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>
34 class AddOnManager : public Dali::Integration::AddOnManager
40 * @param impl Pointer to the platform specific implementation
42 explicit AddOnManager(Internal::AddOnManager* impl);
47 ~AddOnManager() override;
50 * @brief Registers a dispatch table for new AddOn. Dispatch table contains essential
51 * functions that will be called by the AddOnManager. It also includes lifecycle
53 * @param[in] dispatchTable Valid pointer to the DispatchTable object
55 void RegisterAddOnDispatchTable( const AddOnDispatchTable* dispatchTable ) override;
58 * @brief Retrieves list of all the extensions available
59 * @return List of AddOn names
61 std::vector<std::string> EnumerateAddOns() override;
64 * @brief Returns AddOnInfo structure for specified extension name
65 * @param[in] name Name of extension
66 * @param[out]] info Output reference
67 * @return True on success, False if extension info cannot be retrieved
69 bool GetAddOnInfo(const std::string& name, AddOnInfo& info ) override;
72 * @brief Loads and initialises specified extensions
74 * @param[in] extensionNames Array of extension names
75 * @return vector of initialised extension handles
77 std::vector<AddOnLibrary> LoadAddOns( const std::vector<std::string>& addonNames ) override;
80 * @brief Returns addon global function pointer
81 * @param[in] addonHandle Addon handle
82 * @param[in] procName Name of the function to retrieve
83 * @return Pointer to the function or null if function doesn't exist
85 void* GetGlobalProc( const Dali::AddOnLibrary& addonHandle, const char* procName ) override;
88 * @brief Returns addon instance function pointer
89 * @param[in] addonHandle Addon handle
90 * @param[in] procName Name of the function to retrieve
91 * @return Pointer to the function or null if function doesn't exist
93 void* GetInstanceProc( const Dali::AddOnLibrary& addonHandle, const char* procName ) override;
96 * @brief Lifecycle pause function
98 void Pause() override;
101 * @brief Lifecycle resume function
103 void Resume() override;
106 * @brief Lifecycle start function
108 void Start() override;
111 * @brief Lifecycle stop function
113 void Stop() override;
117 std::unique_ptr<Internal::AddOnManager> mImpl; /// Implementation of the AddOnManager
120 } // namespace Internal
123 #endif // DALI_ADAPTOR_COMMON_ADDON_MANAGER