Add SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY for display plugin module.
[Detailed description]
1. Newly added SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY plugin module
- module : SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY
- library_name : "/usr/lib/system/plugin/libplugin-backend-deviced-display.so"
- library_name_64bit : "/usr/lib64/system/plugin/libplugin-backend-deviced-display.so"
- symbol_name : "system_plugin_backend_deviced_display_data"
2. Newly added SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY plugin api
- int syscommon_plugin_deviced_display_get_backend(void)
: Load deviced display plugin-backend from above library_name/library_name_64bit path
- int syscommon_plugin_deviced_display_put_backend(void);
: Unload Deviced display plugin-backend
Change-Id: I51ea96d56046d09b10d449c1455c97575837fdee
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
SYSCOMMON_PLUGIN_MODULE_RESOURCED_MEMORY_LMK,
SYSCOMMON_PLUGIN_MODULE_DEVICED_BATTERY,
SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT,
+ SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY,
SYSCOMMON_PLUGIN_MODULE_END,
};
.backend_min_abi_version = SYSCOMMON_PLUGIN_ABI_VERSION_TIZEN_8_0,
},
},
+ [SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY] = {
+ [0] = {
+ .platform_abi_version = SYSCOMMON_PLUGIN_ABI_VERSION_TIZEN_8_0,
+ .backend_min_abi_version = SYSCOMMON_PLUGIN_ABI_VERSION_TIZEN_8_0,
+ },
+ },
};
static struct __plugin_module_info g_plugin_module_info[] = {
.num_abi_versions = ARRAY_SIZE(abi_version_match_data[SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT]),
.abi_versions = abi_version_match_data[SYSCOMMON_PLUGIN_MODULE_DEVICED_INPUT],
},
+ [SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY] = {
+ .group = PLUGIN_GROUP_DEVICED,
+ .module = SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY,
+ .license = PLUGIN_LICENSE_APACHE_2_0,
+ .module_name = "SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY",
+ .backend_module_name = "deviced-display",
+ .library_name = "/usr/lib/system/plugin/libplugin-backend-deviced-display.so",
+ .library_name_64bit = "/usr/lib64/system/plugin/libplugin-backend-deviced-display.so",
+ .symbol_name = "system_plugin_backend_deviced_display_data",
+ .num_abi_versions = ARRAY_SIZE(abi_version_match_data[SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY]),
+ .abi_versions = abi_version_match_data[SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY],
+ },
};
#endif /* __PLUGIN_API_LIST_H__ */
#define DEVICED_DISPLAY_SCREEN_TIMEOUT_INFINITE ((~0) >> 1)
+typedef struct _syscommon_plugin_backend_deviced_display_funcs {
+ /* NONE */
+} syscommon_plugin_backend_deviced_display_funcs;
+
#ifdef __cplusplus
}
#endif
extern "C" {
#endif
-#include <system/syscommon-plugin-deviced-common-interface.h>
-#include <system/syscommon-plugin-deviced-display-interface.h>
+#include "syscommon-plugin-deviced-common-interface.h"
+#include "syscommon-plugin-deviced-display-interface.h"
+
+/**
+ * @brief Get the backend data of deviced-display module
+ * @return @c 0 on success, otherwise a negative error value
+ */
+int syscommon_plugin_deviced_display_get_backend(void);
+
+/**
+ * @brief Put the backend data of deviced-display module
+ * @return @c 0 on success, otherwise a negative error value
+ */
+int syscommon_plugin_deviced_display_put_backend(void);
#ifdef __cplusplus
}
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+#include <glib.h>
+
+#include "syscommon-plugin-common.h"
+
+#include "common.h"
+#include "syscommon-plugin-deviced-display.h"
+#include "syscommon-plugin-deviced-display-interface.h"
+
+#ifndef EXPORT
+#define EXPORT __attribute__((visibility("default")))
+#endif
+
+static syscommon_plugin_backend_deviced_display_funcs *g_display_funcs = NULL;
+
+EXPORT
+int syscommon_plugin_deviced_display_get_backend(void)
+{
+ int ret = 0;
+
+ if (g_display_funcs)
+ return 0;
+
+ ret = syscommon_plugin_common_get_backend(
+ SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY,
+ (void **)&g_display_funcs);
+ if (ret < 0) {
+ _E("Failed to get deviced_display backend: %d", ret);
+ return ret;
+ }
+
+ _I("Success to get deviced_display backend: %d", ret);
+
+ return 0;
+}
+
+EXPORT
+int syscommon_plugin_deviced_display_put_backend(void)
+{
+ int ret = 0;
+
+ if (!g_display_funcs)
+ return 0;
+
+ ret = syscommon_plugin_common_put_backend(
+ SYSCOMMON_PLUGIN_MODULE_DEVICED_DISPLAY,
+ (void *)g_display_funcs);
+ if (ret < 0) {
+ _E("Failed to put deviced_display backend: %d", ret);
+ return ret;
+ }
+ g_display_funcs = NULL;
+
+ _I("Success to put deviced_display backend: %d", ret);
+
+ return 0;
+}