COMPONENT_TYPE_NONE,
COMPONENT_TYPE_FRAME,
COMPONENT_TYPE_SERVICE,
+ COMPONENT_TYPE_WIDGET,
COMPONENT_TYPE_MAX,
} component_type_e;
static tag_map_t __component_type_map[] = {
{ COMPONENT_TYPE_FRAME, "frame-component" },
{ COMPONENT_TYPE_SERVICE, "service-component" },
+ { COMPONENT_TYPE_WIDGET, "widget-component" },
};
static const char *__component_type_string[] = {
[COMPONENT_TYPE_FRAME] = "frame",
[COMPONENT_TYPE_SERVICE] = "service",
+ [COMPONENT_TYPE_WIDGET] = "widget",
};
static const char *__component_attr_string[] = {
return false;
}
+static bool __is_widget_component(const char *type)
+{
+ if (!strcmp(type, __component_type_string[COMPONENT_TYPE_WIDGET]))
+ return true;
+
+ return false;
+}
+
static bool __is_boolean(const char *value)
{
if (!strcmp(value, "true") || !strcmp(value, "false"))
const char *key = __component_attr_string[COMPONENT_ATTR_LAUNCH_MODE];
char *value;
- if (__is_service_component(info->type)) {
+ if (__is_service_component(info->type) ||
+ __is_widget_component(info->type)) {
info->launch_mode = strdup("single");
if (!info->launch_mode) {
LOGE("Failed to duplicate launch mode");
const char *key = __component_attr_string[COMPONENT_ATTR_TASKMANAGE];
char *value;
- if (__is_service_component(info->type)) {
+ if (__is_service_component(info->type) ||
+ __is_widget_component(info->type)) {
info->taskmanage = strdup("false");
if (!info->taskmanage) {
LOGE("Failed to duplicate taskmanage");