--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="core-component-manager-tests" version="0.1.0" api-version="5.5">
+ <label>CoreComponentManagerTest</label>
+ <author email="test@tizen.org" href="www.tizen.org">test</author>
+ <description>Core API test Application</description>
+ <ui-application appid="core.component-manager-tests" exec="/usr/apps/core-component-manager-tests/bin/tct-component-manager-core" nodisplay="false" multiple="false" type="capp" taskmanage="true">
+ <background-category value="background-network"/>
+ <background-category value="download"/>
+ <background-category value="iot-communication"/>
+ <background-category value="location"/>
+ <background-category value="media"/>
+ <background-category value="sensor"/>
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+ <privilege>http://tizen.org/privilege/appmanager.kill.bgapp</privilege>
+ </privileges>
+</manifest>
--- /dev/null
+SET(PKG_NAME "component-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-core")
+SET(RPM_NAME "core-${PKG_NAME}-tests")
+
+SET(CAPI_LIB "capi-appfw-component-manager")
+
+SET(TC_SOURCES
+ utc_common.c
+ tct-component-manager-core.c
+ utc_component_context_clone.c
+ utc_component_context_destroy.c
+ utc_component_context_get_app_id.c
+ utc_component_context_get_component_id.c
+ utc_component_context_get_component_state.c
+ utc_component_context_get_instance_id.c
+ utc_component_context_is_subcomponent.c
+ utc_component_context_is_terminated.c
+ utc_component_info_clone.c
+ utc_component_info_create.c
+ utc_component_info_destroy.c
+ utc_component_info_get_app_id.c
+ utc_component_info_get_component_id.c
+ utc_component_info_get_component_type.c
+ utc_component_info_get_icon.c
+ utc_component_info_get_label.c
+ utc_component_info_get_localized_label.c
+ utc_component_info_is_icon_display.c
+ utc_component_info_is_managed_by_task_manager.c
+ utc_component_manager_foreach_component_context.c
+ utc_component_manager_foreach_component_info.c
+ utc_component_manager_get_component_context.c
+ utc_component_manager_get_component_info.c
+ utc_component_manager_is_running.c
+ utc_component_manager_resume_component.c
+ utc_component_manager_terminate_bg_component.c
+ )
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+ ${CAPI_LIB}
+ capi-appfw-application
+ capi-system-info
+ glib-2.0
+ bundle
+ dlog
+ elementary
+ )
+
+INCLUDE_DIRECTORIES(
+ ${${CAPI_LIB}_INCLUDE_DIRS}
+)
+
+ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.c ${TC_SOURCES} ${COMMON_FILE})
+TARGET_LINK_LIBRARIES(${EXEC_NAME}
+ ${${CAPI_LIB}_LIBRARIES}
+ bundle
+)
+
+INSTALL(PROGRAMS ${EXEC_NAME}
+ DESTINATION ${BIN_DIR}/${RPM_NAME}/bin
+)
+
+IF( DEFINED ASAN )
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wall -pie -g -fsanitize=address -fsanitize-recover=address -U_FORTIFY_SOURCE -fno-omit-frame-pointer")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -Wl,-fsanitize=address")
+ELSE()
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fPIE -Wall")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib -pie")
+ENDIF()
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <stdio.h>
+#include <libgen.h>
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "NativeTCT"
+
+#define _E(fmt, ...) do { \
+ dlog_print(DLOG_ERROR, LOG_TAG, "%s: %s(%d) > "fmt, \
+ basename(__FILE__), __FUNCTION__, \
+ __LINE__, ##__VA_ARGS__); \
+ fprintf(stderr, "%s: %s(%d) > "fmt, \
+ basename(__FILE__), __FUNCTION__, \
+ __LINE__, ##__VA_ARGS__); \
+} while (0)
+
+#define _W(fmt, ...) dlog_print(DLOG_WARN, LOG_TAG, "%s: %s(%d) > "fmt, \
+ basename(__FILE__), __FUNCTION__, __LINE__, ##__VA_ARGS__)
+#define _I(fmt, ...) dlog_print(DLOG_INFO, LOG_TAG, "%s: %s(%d) > "fmt, \
+ basename(__FILE__), __FUNCTION__, __LINE__, ##__VA_ARGS__)
+#define _D(fmt, ...) dlog_print(DLOG_DEBUG, LOG_TAG, "%s: %s(%d) > "fmt, \
+ basename(__FILE__), __FUNCTION__, __LINE__, ##__VA_ARGS__)
--- /dev/null
+//
+// Copyright (c) 2014 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "tct_common.h"
+
+#ifdef MOBILE //Starts MOBILE
+#include "tct-component-manager-core_mobile.h"
+#endif //MOBILE //End MOBILE
+
+#ifdef WEARABLE //Starts WEARABLE
+#include "tct-component-manager-core_wearable.h"
+#endif //WEARABLE //End WEARABLE
+
+#ifdef TV //Starts TV
+#include "tct-component-manager-core_tv.h"
+#endif //TV //End TV
+
+#ifdef TIZENIOT //Starts TIZENIOT
+#include "tct-component-manager-core_tizeniot.h"
+#endif //TIZENIOT //End TIZENIOT
+
+#include <stdio.h>
+#include <string.h>
+#include <malloc.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <glib.h>
+#include <stdbool.h>
+#include <app.h>
+#include <dlog.h>
+
+#include <Elementary.h>
+
+typedef struct appdata {
+ Evas_Object *win;
+ Evas_Object *conform;
+ Evas_Object *label;
+} appdata_s;
+
+static bool app_create(void *data)
+{
+ return true;
+}
+
+static void app_control(app_control_h app_control, void *data)
+{
+ char* pszGetTCName = NULL;
+ int i=0, result=0, nRet=0;
+ nRet = app_control_get_extra_data(app_control, "testcase_name", &pszGetTCName);
+ if(nRet != APP_CONTROL_ERROR_NONE)
+ {
+ dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] app_control_get_extra_data returns error = %d", __FUNCTION__, __LINE__, nRet);
+ PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to fetch test case name: app_control_get_extra_data API call fails\\n", __FILE__, __LINE__);
+ PRINT_TC_RESULT("%d",1);
+ FREE_MEMORY_TC(pszGetTCName);
+ return;
+ }
+
+ dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName);
+ for ( i = 0; tc_array[i].name; i++ )
+ {
+ if ( 0 == strncmp(pszGetTCName, tc_array[i].name, strlen(pszGetTCName)) )
+ {
+ DUMP_UTC_ERRLOG();
+ if ( tc_array[i].startup )
+ {
+ dlog_print(DLOG_INFO, "NativeTCT", "%s : Start up", pszGetTCName);
+ tc_array[i].startup();
+ }
+
+ dlog_print(DLOG_INFO, "NativeTCT", "%s : Body", pszGetTCName);
+ result = tc_array[i].function();
+ dlog_print(DLOG_INFO, "NativeTCT", "%s returns value = %d", pszGetTCName, result);
+
+ if ( tc_array[i].cleanup )
+ {
+ dlog_print(DLOG_INFO, "NativeTCT", "%s : Clean up", pszGetTCName);
+ tc_array[i].cleanup();
+ }
+
+ CLOSE_UTC_ERRLOG();
+ PRINT_TC_RESULT("%d",result);
+ FREE_MEMORY_TC(pszGetTCName);
+ return;
+ }
+ }
+
+ dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, pszGetTCName);
+ PRINT_UTC_LOG("\\n[%s][Line : %d]Unable to execute %s : Unknown Test Case Name\\n", __FILE__, __LINE__, pszGetTCName);
+ PRINT_TC_RESULT("%d",1);
+ FREE_MEMORY_TC(pszGetTCName);
+ return;
+}
+
+static void app_terminate(void *data)
+{
+ dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is now Terminating", __FUNCTION__, __LINE__);
+}
+
+int main(int argc, char *argv[])
+{
+ int ret = 0;
+ appdata_s ad = {0,};
+
+ ui_app_lifecycle_callback_s event_callback = {0,};
+ event_callback.create = app_create;
+ event_callback.terminate = app_terminate;
+ event_callback.app_control = app_control;
+
+ //setting gcda file location for coverage
+ setenv("GCOV_PREFIX","/tmp",1);
+ dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Coverage *.gcda File location set to /tmp/home/abuild/rpmbuild/BUILD/ ", __FUNCTION__, __LINE__);
+
+ dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Main Function is Invoked", __FUNCTION__, __LINE__);
+ ret = ui_app_main(argc, argv, &event_callback, &ad);
+ if (ret != APP_ERROR_NONE)
+ {
+ dlog_print(DLOG_ERROR, "NativeTCT", "Application ui_app_main call gets failed. err = %d", ret);
+ PRINT_UTC_LOG("\\n[%s][Line : %d]Application ui_app_main call gets failed. err = %d\\n", __FILE__, __LINE__, ret);
+ PRINT_TC_RESULT("%d",1);
+ return ret;
+ }
+
+ dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Application Package is Terminated", __FUNCTION__, __LINE__);
+ return ret;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TCT_COMPONENT_MANAGER_NATIVE_H__
+#define __TCT_COMPONENT_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+#include "tct_common.h"
+
+extern void utc_component_context_clone_p_startup(void);
+extern void utc_component_context_clone_p_cleanup(void);
+extern int utc_component_context_clone_p(void);
+extern int utc_component_context_clone_n(void);
+
+extern void utc_component_context_destroy_p_startup(void);
+extern int utc_component_context_destroy_p(void);
+extern int utc_component_context_destroy_n(void);
+
+extern void utc_component_context_get_app_id_p_startup(void);
+extern void utc_component_context_get_app_id_p_cleanup(void);
+extern int utc_component_context_get_app_id_p(void);
+extern int utc_component_context_get_app_id_n(void);
+
+extern void utc_component_context_get_component_id_p_startup(void);
+extern void utc_component_context_get_component_id_p_cleanup(void);
+extern int utc_component_context_get_component_id_p(void);
+extern int utc_component_context_get_component_id_n(void);
+
+extern void utc_component_context_get_component_state_p_startup(void);
+extern void utc_component_context_get_component_state_p_cleanup(void);
+extern int utc_component_context_get_component_state_p(void);
+extern int utc_component_context_get_component_state_n(void);
+
+extern void utc_component_context_get_instance_id_p_startup(void);
+extern void utc_component_context_get_instance_id_p_cleanup(void);
+extern int utc_component_context_get_instance_id_p(void);
+extern int utc_component_context_get_instance_id_n(void);
+
+extern void utc_component_context_is_subcomponent_p_startup(void);
+extern void utc_component_context_is_subcomponent_p_cleanup(void);
+extern int utc_component_context_is_subcomponent_p(void);
+extern int utc_component_context_is_subcomponent_n(void);
+
+extern void utc_component_context_is_terminated_p_startup(void);
+extern void utc_component_context_is_terminated_p_cleanup(void);
+extern int utc_component_context_is_terminated_p(void);
+extern int utc_component_context_is_terminated_n(void);
+
+extern void utc_component_info_clone_p_startup(void);
+extern void utc_component_info_clone_p_cleanup(void);
+extern int utc_component_info_clone_p(void);
+extern int utc_component_info_clone_n(void);
+
+extern void utc_component_info_create_p_startup(void);
+extern void utc_component_info_create_p_cleanup(void);
+extern int utc_component_info_create_p(void);
+extern int utc_component_info_create_n(void);
+
+extern void utc_component_info_destroy_p_startup(void);
+extern int utc_component_info_destroy_p(void);
+extern int utc_component_info_destroy_n(void);
+
+extern void utc_component_info_get_app_id_p_startup(void);
+extern void utc_component_info_get_app_id_p_cleanup(void);
+extern int utc_component_info_get_app_id_p(void);
+extern int utc_component_info_get_app_id_n(void);
+
+extern void utc_component_info_get_component_id_p_startup(void);
+extern void utc_component_info_get_component_id_p_cleanup(void);
+extern int utc_component_info_get_component_id_p(void);
+extern int utc_component_info_get_component_id_n(void);
+
+extern void utc_component_info_get_component_type_p_startup(void);
+extern void utc_component_info_get_component_type_p_cleanup(void);
+extern int utc_component_info_get_component_type_p(void);
+extern int utc_component_info_get_component_type_n(void);
+
+extern void utc_component_info_get_icon_p_startup(void);
+extern void utc_component_info_get_icon_p_cleanup(void);
+extern int utc_component_info_get_icon_p(void);
+extern int utc_component_info_get_icon_n(void);
+
+extern void utc_component_info_get_label_p_startup(void);
+extern void utc_component_info_get_label_p_cleanup(void);
+extern int utc_component_info_get_label_p(void);
+extern int utc_component_info_get_label_n(void);
+
+extern void utc_component_info_get_localized_label_p_startup(void);
+extern void utc_component_info_get_localized_label_p_cleanup(void);
+extern int utc_component_info_get_localized_label_p(void);
+extern int utc_component_info_get_localized_label_n(void);
+
+extern void utc_component_info_is_icon_display_p_startup(void);
+extern void utc_component_info_is_icon_display_p_cleanup(void);
+extern int utc_component_info_is_icon_display_p(void);
+extern int utc_component_info_is_icon_display_n(void);
+
+extern void utc_component_info_is_managed_by_task_manager_p_startup(void);
+extern void utc_component_info_is_managed_by_task_manager_p_cleanup(void);
+extern int utc_component_info_is_managed_by_task_manager_p(void);
+extern int utc_component_info_is_managed_by_task_manager_n(void);
+
+extern void utc_component_manager_is_running_p_startup(void);
+extern int utc_component_manager_is_running_p(void);
+extern int utc_component_manager_is_running_n(void);
+
+extern void utc_component_manager_foreach_component_info_p_startup(void);
+extern int utc_component_manager_foreach_component_info_p(void);
+extern int utc_component_manager_foreach_component_info_n(void);
+
+extern void utc_component_manager_get_component_context_p_startup(void);
+extern int utc_component_manager_get_component_context_p(void);
+extern int utc_component_manager_get_component_context_n(void);
+
+extern void utc_component_manager_get_component_info_p_startup(void);
+extern int utc_component_manager_get_component_info_p(void);
+extern int utc_component_manager_get_component_info_n(void);
+
+extern void utc_component_manager_foreach_component_context_p_startup(void);
+extern int utc_component_manager_foreach_component_context_p(void);
+extern int utc_component_manager_foreach_component_context_n(void);
+
+extern void utc_component_manager_resume_component_p_startup(void);
+extern void utc_component_manager_resume_component_p_cleanup(void);
+extern int utc_component_manager_resume_component_p(void);
+extern int utc_component_manager_resume_component_n(void);
+
+extern void utc_component_manager_terminate_bg_component_p_startup(void);
+extern void utc_component_manager_terminate_bg_component_p_cleanup(void);
+extern int utc_component_manager_terminate_bg_component_p(void);
+extern int utc_component_manager_terminate_bg_component_n(void);
+
+testcase tc_array[] = {
+ {"utc_component_context_clone_p", utc_component_context_clone_p, utc_component_context_clone_p_startup, utc_component_context_clone_p_cleanup},
+ {"utc_component_context_clone_n", utc_component_context_clone_n, NULL, NULL},
+ {"utc_component_context_destroy_p", utc_component_context_destroy_p, utc_component_context_destroy_p_startup, NULL},
+ {"utc_component_context_destroy_n", utc_component_context_destroy_n, NULL, NULL},
+ {"utc_component_context_get_app_id_p", utc_component_context_get_app_id_p, utc_component_context_get_app_id_p_startup, utc_component_context_get_app_id_p_cleanup},
+ {"utc_component_context_get_app_id_n", utc_component_context_get_app_id_n, NULL, NULL},
+ {"utc_component_context_get_component_id_p", utc_component_context_get_component_id_p, utc_component_context_get_component_id_p_startup, utc_component_context_get_component_id_p_cleanup},
+ {"utc_component_context_get_component_id_n", utc_component_context_get_component_id_n, NULL, NULL},
+ {"utc_component_context_get_component_state_p", utc_component_context_get_component_state_p, utc_component_context_get_component_state_p_startup, utc_component_context_get_component_state_p_cleanup},
+ {"utc_component_context_get_component_state_n", utc_component_context_get_component_state_n, NULL, NULL},
+ {"utc_component_context_get_instance_id_p", utc_component_context_get_instance_id_p, utc_component_context_get_instance_id_p_startup, utc_component_context_get_instance_id_p_cleanup},
+ {"utc_component_context_get_instance_id_n", utc_component_context_get_instance_id_n, NULL, NULL},
+ {"utc_component_context_is_subcomponent_p", utc_component_context_is_subcomponent_p, utc_component_context_is_subcomponent_p_startup, utc_component_context_is_subcomponent_p_cleanup},
+ {"utc_component_context_is_subcomponent_n", utc_component_context_is_subcomponent_n, NULL, NULL},
+ {"utc_component_context_is_terminated_p", utc_component_context_is_terminated_p, utc_component_context_is_terminated_p_startup, utc_component_context_is_terminated_p_cleanup},
+ {"utc_component_context_is_terminated_n", utc_component_context_is_terminated_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_is_managed_by_task_manager_p", utc_component_info_is_managed_by_task_manager_p, utc_component_info_is_managed_by_task_manager_p_startup, utc_component_info_is_managed_by_task_manager_p_cleanup},
+ {"utc_component_info_is_managed_by_task_manager_n", utc_component_info_is_managed_by_task_manager_n, NULL, NULL},
+ {"utc_component_manager_is_running_p", utc_component_manager_is_running_p, utc_component_manager_is_running_p_startup, NULL},
+ {"utc_component_manager_is_running_n", utc_component_manager_is_running_n, NULL, NULL},
+ {"utc_component_manager_foreach_component_info_p", utc_component_manager_foreach_component_info_p, utc_component_manager_foreach_component_info_p_startup, NULL},
+ {"utc_component_manager_foreach_component_info_n", utc_component_manager_foreach_component_info_n, NULL, NULL},
+ {"utc_component_manager_get_component_context_p", utc_component_manager_get_component_context_p, utc_component_manager_get_component_context_p_startup, NULL},
+ {"utc_component_manager_get_component_context_n", utc_component_manager_get_component_context_n, NULL, NULL},
+ {"utc_component_manager_get_component_info_p", utc_component_manager_get_component_info_p, utc_component_manager_get_component_info_p_startup, NULL},
+ {"utc_component_manager_get_component_info_n", utc_component_manager_get_component_info_n, NULL, NULL},
+ {"utc_component_manager_foreach_component_context_p", utc_component_manager_foreach_component_context_p, utc_component_manager_foreach_component_context_p_startup, NULL},
+ {"utc_component_manager_foreach_component_context_n", utc_component_manager_foreach_component_context_n, NULL, NULL},
+ {"utc_component_manager_resume_component_p", utc_component_manager_resume_component_p, utc_component_manager_resume_component_p_startup, utc_component_manager_resume_component_p_cleanup},
+ {"utc_component_manager_resume_component_n", utc_component_manager_resume_component_n, NULL, NULL},
+ {"utc_component_manager_terminate_bg_component_p", utc_component_manager_terminate_bg_component_p, utc_component_manager_terminate_bg_component_p_startup, utc_component_manager_terminate_bg_component_p_cleanup},
+ {"utc_component_manager_terminate_bg_component_n", utc_component_manager_terminate_bg_component_n, NULL, NULL},
+ {NULL, NULL}
+};
+
+#endif // __TCT_COMPONENT_MANAGER_NATIVE_H__
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TCT_COMPONENT_MANAGER_NATIVE_H__
+#define __TCT_COMPONENT_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+#include "tct_common.h"
+
+extern void utc_component_context_clone_p_startup(void);
+extern void utc_component_context_clone_p_cleanup(void);
+extern int utc_component_context_clone_p(void);
+extern int utc_component_context_clone_n(void);
+
+extern void utc_component_context_destroy_p_startup(void);
+extern int utc_component_context_destroy_p(void);
+extern int utc_component_context_destroy_n(void);
+
+extern void utc_component_context_get_app_id_p_startup(void);
+extern void utc_component_context_get_app_id_p_cleanup(void);
+extern int utc_component_context_get_app_id_p(void);
+extern int utc_component_context_get_app_id_n(void);
+
+extern void utc_component_context_get_component_id_p_startup(void);
+extern void utc_component_context_get_component_id_p_cleanup(void);
+extern int utc_component_context_get_component_id_p(void);
+extern int utc_component_context_get_component_id_n(void);
+
+extern void utc_component_context_get_component_state_p_startup(void);
+extern void utc_component_context_get_component_state_p_cleanup(void);
+extern int utc_component_context_get_component_state_p(void);
+extern int utc_component_context_get_component_state_n(void);
+
+extern void utc_component_context_get_instance_id_p_startup(void);
+extern void utc_component_context_get_instance_id_p_cleanup(void);
+extern int utc_component_context_get_instance_id_p(void);
+extern int utc_component_context_get_instance_id_n(void);
+
+extern void utc_component_context_is_subcomponent_p_startup(void);
+extern void utc_component_context_is_subcomponent_p_cleanup(void);
+extern int utc_component_context_is_subcomponent_p(void);
+extern int utc_component_context_is_subcomponent_n(void);
+
+extern void utc_component_context_is_terminated_p_startup(void);
+extern void utc_component_context_is_terminated_p_cleanup(void);
+extern int utc_component_context_is_terminated_p(void);
+extern int utc_component_context_is_terminated_n(void);
+
+extern void utc_component_info_clone_p_startup(void);
+extern void utc_component_info_clone_p_cleanup(void);
+extern int utc_component_info_clone_p(void);
+extern int utc_component_info_clone_n(void);
+
+extern void utc_component_info_create_p_startup(void);
+extern void utc_component_info_create_p_cleanup(void);
+extern int utc_component_info_create_p(void);
+extern int utc_component_info_create_n(void);
+
+extern void utc_component_info_destroy_p_startup(void);
+extern int utc_component_info_destroy_p(void);
+extern int utc_component_info_destroy_n(void);
+
+extern void utc_component_info_get_app_id_p_startup(void);
+extern void utc_component_info_get_app_id_p_cleanup(void);
+extern int utc_component_info_get_app_id_p(void);
+extern int utc_component_info_get_app_id_n(void);
+
+extern void utc_component_info_get_component_id_p_startup(void);
+extern void utc_component_info_get_component_id_p_cleanup(void);
+extern int utc_component_info_get_component_id_p(void);
+extern int utc_component_info_get_component_id_n(void);
+
+extern void utc_component_info_get_component_type_p_startup(void);
+extern void utc_component_info_get_component_type_p_cleanup(void);
+extern int utc_component_info_get_component_type_p(void);
+extern int utc_component_info_get_component_type_n(void);
+
+extern void utc_component_info_get_icon_p_startup(void);
+extern void utc_component_info_get_icon_p_cleanup(void);
+extern int utc_component_info_get_icon_p(void);
+extern int utc_component_info_get_icon_n(void);
+
+extern void utc_component_info_get_label_p_startup(void);
+extern void utc_component_info_get_label_p_cleanup(void);
+extern int utc_component_info_get_label_p(void);
+extern int utc_component_info_get_label_n(void);
+
+extern void utc_component_info_get_localized_label_p_startup(void);
+extern void utc_component_info_get_localized_label_p_cleanup(void);
+extern int utc_component_info_get_localized_label_p(void);
+extern int utc_component_info_get_localized_label_n(void);
+
+extern void utc_component_info_is_icon_display_p_startup(void);
+extern void utc_component_info_is_icon_display_p_cleanup(void);
+extern int utc_component_info_is_icon_display_p(void);
+extern int utc_component_info_is_icon_display_n(void);
+
+extern void utc_component_info_is_managed_by_task_manager_p_startup(void);
+extern void utc_component_info_is_managed_by_task_manager_p_cleanup(void);
+extern int utc_component_info_is_managed_by_task_manager_p(void);
+extern int utc_component_info_is_managed_by_task_manager_n(void);
+
+extern void utc_component_manager_is_running_p_startup(void);
+extern int utc_component_manager_is_running_p(void);
+extern int utc_component_manager_is_running_n(void);
+
+extern void utc_component_manager_foreach_component_info_p_startup(void);
+extern int utc_component_manager_foreach_component_info_p(void);
+extern int utc_component_manager_foreach_component_info_n(void);
+
+extern void utc_component_manager_get_component_context_p_startup(void);
+extern int utc_component_manager_get_component_context_p(void);
+extern int utc_component_manager_get_component_context_n(void);
+
+extern void utc_component_manager_get_component_info_p_startup(void);
+extern int utc_component_manager_get_component_info_p(void);
+extern int utc_component_manager_get_component_info_n(void);
+
+extern void utc_component_manager_foreach_component_context_p_startup(void);
+extern int utc_component_manager_foreach_component_context_p(void);
+extern int utc_component_manager_foreach_component_context_n(void);
+
+extern void utc_component_manager_resume_component_p_startup(void);
+extern void utc_component_manager_resume_component_p_cleanup(void);
+extern int utc_component_manager_resume_component_p(void);
+extern int utc_component_manager_resume_component_n(void);
+
+extern void utc_component_manager_terminate_bg_component_p_startup(void);
+extern void utc_component_manager_terminate_bg_component_p_cleanup(void);
+extern int utc_component_manager_terminate_bg_component_p(void);
+extern int utc_component_manager_terminate_bg_component_n(void);
+
+testcase tc_array[] = {
+ {"utc_component_context_clone_p", utc_component_context_clone_p, utc_component_context_clone_p_startup, utc_component_context_clone_p_cleanup},
+ {"utc_component_context_clone_n", utc_component_context_clone_n, NULL, NULL},
+ {"utc_component_context_destroy_p", utc_component_context_destroy_p, utc_component_context_destroy_p_startup, NULL},
+ {"utc_component_context_destroy_n", utc_component_context_destroy_n, NULL, NULL},
+ {"utc_component_context_get_app_id_p", utc_component_context_get_app_id_p, utc_component_context_get_app_id_p_startup, utc_component_context_get_app_id_p_cleanup},
+ {"utc_component_context_get_app_id_n", utc_component_context_get_app_id_n, NULL, NULL},
+ {"utc_component_context_get_component_id_p", utc_component_context_get_component_id_p, utc_component_context_get_component_id_p_startup, utc_component_context_get_component_id_p_cleanup},
+ {"utc_component_context_get_component_id_n", utc_component_context_get_component_id_n, NULL, NULL},
+ {"utc_component_context_get_component_state_p", utc_component_context_get_component_state_p, utc_component_context_get_component_state_p_startup, utc_component_context_get_component_state_p_cleanup},
+ {"utc_component_context_get_component_state_n", utc_component_context_get_component_state_n, NULL, NULL},
+ {"utc_component_context_get_instance_id_p", utc_component_context_get_instance_id_p, utc_component_context_get_instance_id_p_startup, utc_component_context_get_instance_id_p_cleanup},
+ {"utc_component_context_get_instance_id_n", utc_component_context_get_instance_id_n, NULL, NULL},
+ {"utc_component_context_is_subcomponent_p", utc_component_context_is_subcomponent_p, utc_component_context_is_subcomponent_p_startup, utc_component_context_is_subcomponent_p_cleanup},
+ {"utc_component_context_is_subcomponent_n", utc_component_context_is_subcomponent_n, NULL, NULL},
+ {"utc_component_context_is_terminated_p", utc_component_context_is_terminated_p, utc_component_context_is_terminated_p_startup, utc_component_context_is_terminated_p_cleanup},
+ {"utc_component_context_is_terminated_n", utc_component_context_is_terminated_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_is_managed_by_task_manager_p", utc_component_info_is_managed_by_task_manager_p, utc_component_info_is_managed_by_task_manager_p_startup, utc_component_info_is_managed_by_task_manager_p_cleanup},
+ {"utc_component_info_is_managed_by_task_manager_n", utc_component_info_is_managed_by_task_manager_n, NULL, NULL},
+ {"utc_component_manager_is_running_p", utc_component_manager_is_running_p, utc_component_manager_is_running_p_startup, NULL},
+ {"utc_component_manager_is_running_n", utc_component_manager_is_running_n, NULL, NULL},
+ {"utc_component_manager_foreach_component_info_p", utc_component_manager_foreach_component_info_p, utc_component_manager_foreach_component_info_p_startup, NULL},
+ {"utc_component_manager_foreach_component_info_n", utc_component_manager_foreach_component_info_n, NULL, NULL},
+ {"utc_component_manager_get_component_context_p", utc_component_manager_get_component_context_p, utc_component_manager_get_component_context_p_startup, NULL},
+ {"utc_component_manager_get_component_context_n", utc_component_manager_get_component_context_n, NULL, NULL},
+ {"utc_component_manager_get_component_info_p", utc_component_manager_get_component_info_p, utc_component_manager_get_component_info_p_startup, NULL},
+ {"utc_component_manager_get_component_info_n", utc_component_manager_get_component_info_n, NULL, NULL},
+ {"utc_component_manager_foreach_component_context_p", utc_component_manager_foreach_component_context_p, utc_component_manager_foreach_component_context_p_startup, NULL},
+ {"utc_component_manager_foreach_component_context_n", utc_component_manager_foreach_component_context_n, NULL, NULL},
+ {"utc_component_manager_resume_component_p", utc_component_manager_resume_component_p, utc_component_manager_resume_component_p_startup, utc_component_manager_resume_component_p_cleanup},
+ {"utc_component_manager_resume_component_n", utc_component_manager_resume_component_n, NULL, NULL},
+ {"utc_component_manager_terminate_bg_component_p", utc_component_manager_terminate_bg_component_p, utc_component_manager_terminate_bg_component_p_startup, utc_component_manager_terminate_bg_component_p_cleanup},
+ {"utc_component_manager_terminate_bg_component_n", utc_component_manager_terminate_bg_component_n, NULL, NULL},
+ {NULL, NULL}
+};
+
+#endif // __TCT_COMPONENT_MANAGER_NATIVE_H__
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TCT_COMPONENT_MANAGER_NATIVE_H__
+#define __TCT_COMPONENT_MANAGER_NATIVE_H__
+
+#include "testcase.h"
+#include "tct_common.h"
+
+extern void utc_component_context_clone_p_startup(void);
+extern void utc_component_context_clone_p_cleanup(void);
+extern int utc_component_context_clone_p(void);
+extern int utc_component_context_clone_n(void);
+
+extern void utc_component_context_destroy_p_startup(void);
+extern int utc_component_context_destroy_p(void);
+extern int utc_component_context_destroy_n(void);
+
+extern void utc_component_context_get_app_id_p_startup(void);
+extern void utc_component_context_get_app_id_p_cleanup(void);
+extern int utc_component_context_get_app_id_p(void);
+extern int utc_component_context_get_app_id_n(void);
+
+extern void utc_component_context_get_component_id_p_startup(void);
+extern void utc_component_context_get_component_id_p_cleanup(void);
+extern int utc_component_context_get_component_id_p(void);
+extern int utc_component_context_get_component_id_n(void);
+
+extern void utc_component_context_get_component_state_p_startup(void);
+extern void utc_component_context_get_component_state_p_cleanup(void);
+extern int utc_component_context_get_component_state_p(void);
+extern int utc_component_context_get_component_state_n(void);
+
+extern void utc_component_context_get_instance_id_p_startup(void);
+extern void utc_component_context_get_instance_id_p_cleanup(void);
+extern int utc_component_context_get_instance_id_p(void);
+extern int utc_component_context_get_instance_id_n(void);
+
+extern void utc_component_context_is_subcomponent_p_startup(void);
+extern void utc_component_context_is_subcomponent_p_cleanup(void);
+extern int utc_component_context_is_subcomponent_p(void);
+extern int utc_component_context_is_subcomponent_n(void);
+
+extern void utc_component_context_is_terminated_p_startup(void);
+extern void utc_component_context_is_terminated_p_cleanup(void);
+extern int utc_component_context_is_terminated_p(void);
+extern int utc_component_context_is_terminated_n(void);
+
+extern void utc_component_info_clone_p_startup(void);
+extern void utc_component_info_clone_p_cleanup(void);
+extern int utc_component_info_clone_p(void);
+extern int utc_component_info_clone_n(void);
+
+extern void utc_component_info_create_p_startup(void);
+extern void utc_component_info_create_p_cleanup(void);
+extern int utc_component_info_create_p(void);
+extern int utc_component_info_create_n(void);
+
+extern void utc_component_info_destroy_p_startup(void);
+extern int utc_component_info_destroy_p(void);
+extern int utc_component_info_destroy_n(void);
+
+extern void utc_component_info_get_app_id_p_startup(void);
+extern void utc_component_info_get_app_id_p_cleanup(void);
+extern int utc_component_info_get_app_id_p(void);
+extern int utc_component_info_get_app_id_n(void);
+
+extern void utc_component_info_get_component_id_p_startup(void);
+extern void utc_component_info_get_component_id_p_cleanup(void);
+extern int utc_component_info_get_component_id_p(void);
+extern int utc_component_info_get_component_id_n(void);
+
+extern void utc_component_info_get_component_type_p_startup(void);
+extern void utc_component_info_get_component_type_p_cleanup(void);
+extern int utc_component_info_get_component_type_p(void);
+extern int utc_component_info_get_component_type_n(void);
+
+extern void utc_component_info_get_icon_p_startup(void);
+extern void utc_component_info_get_icon_p_cleanup(void);
+extern int utc_component_info_get_icon_p(void);
+extern int utc_component_info_get_icon_n(void);
+
+extern void utc_component_info_get_label_p_startup(void);
+extern void utc_component_info_get_label_p_cleanup(void);
+extern int utc_component_info_get_label_p(void);
+extern int utc_component_info_get_label_n(void);
+
+extern void utc_component_info_get_localized_label_p_startup(void);
+extern void utc_component_info_get_localized_label_p_cleanup(void);
+extern int utc_component_info_get_localized_label_p(void);
+extern int utc_component_info_get_localized_label_n(void);
+
+extern void utc_component_info_is_icon_display_p_startup(void);
+extern void utc_component_info_is_icon_display_p_cleanup(void);
+extern int utc_component_info_is_icon_display_p(void);
+extern int utc_component_info_is_icon_display_n(void);
+
+extern void utc_component_info_is_managed_by_task_manager_p_startup(void);
+extern void utc_component_info_is_managed_by_task_manager_p_cleanup(void);
+extern int utc_component_info_is_managed_by_task_manager_p(void);
+extern int utc_component_info_is_managed_by_task_manager_n(void);
+
+extern void utc_component_manager_is_running_p_startup(void);
+extern int utc_component_manager_is_running_p(void);
+extern int utc_component_manager_is_running_n(void);
+
+extern void utc_component_manager_foreach_component_info_p_startup(void);
+extern int utc_component_manager_foreach_component_info_p(void);
+extern int utc_component_manager_foreach_component_info_n(void);
+
+extern void utc_component_manager_get_component_context_p_startup(void);
+extern int utc_component_manager_get_component_context_p(void);
+extern int utc_component_manager_get_component_context_n(void);
+
+extern void utc_component_manager_get_component_info_p_startup(void);
+extern int utc_component_manager_get_component_info_p(void);
+extern int utc_component_manager_get_component_info_n(void);
+
+extern void utc_component_manager_foreach_component_context_p_startup(void);
+extern int utc_component_manager_foreach_component_context_p(void);
+extern int utc_component_manager_foreach_component_context_n(void);
+
+extern void utc_component_manager_resume_component_p_startup(void);
+extern void utc_component_manager_resume_component_p_cleanup(void);
+extern int utc_component_manager_resume_component_p(void);
+extern int utc_component_manager_resume_component_n(void);
+
+extern void utc_component_manager_terminate_bg_component_p_startup(void);
+extern void utc_component_manager_terminate_bg_component_p_cleanup(void);
+extern int utc_component_manager_terminate_bg_component_p(void);
+extern int utc_component_manager_terminate_bg_component_n(void);
+
+testcase tc_array[] = {
+ {"utc_component_context_clone_p", utc_component_context_clone_p, utc_component_context_clone_p_startup, utc_component_context_clone_p_cleanup},
+ {"utc_component_context_clone_n", utc_component_context_clone_n, NULL, NULL},
+ {"utc_component_context_destroy_p", utc_component_context_destroy_p, utc_component_context_destroy_p_startup, NULL},
+ {"utc_component_context_destroy_n", utc_component_context_destroy_n, NULL, NULL},
+ {"utc_component_context_get_app_id_p", utc_component_context_get_app_id_p, utc_component_context_get_app_id_p_startup, utc_component_context_get_app_id_p_cleanup},
+ {"utc_component_context_get_app_id_n", utc_component_context_get_app_id_n, NULL, NULL},
+ {"utc_component_context_get_component_id_p", utc_component_context_get_component_id_p, utc_component_context_get_component_id_p_startup, utc_component_context_get_component_id_p_cleanup},
+ {"utc_component_context_get_component_id_n", utc_component_context_get_component_id_n, NULL, NULL},
+ {"utc_component_context_get_component_state_p", utc_component_context_get_component_state_p, utc_component_context_get_component_state_p_startup, utc_component_context_get_component_state_p_cleanup},
+ {"utc_component_context_get_component_state_n", utc_component_context_get_component_state_n, NULL, NULL},
+ {"utc_component_context_get_instance_id_p", utc_component_context_get_instance_id_p, utc_component_context_get_instance_id_p_startup, utc_component_context_get_instance_id_p_cleanup},
+ {"utc_component_context_get_instance_id_n", utc_component_context_get_instance_id_n, NULL, NULL},
+ {"utc_component_context_is_subcomponent_p", utc_component_context_is_subcomponent_p, utc_component_context_is_subcomponent_p_startup, utc_component_context_is_subcomponent_p_cleanup},
+ {"utc_component_context_is_subcomponent_n", utc_component_context_is_subcomponent_n, NULL, NULL},
+ {"utc_component_context_is_terminated_p", utc_component_context_is_terminated_p, utc_component_context_is_terminated_p_startup, utc_component_context_is_terminated_p_cleanup},
+ {"utc_component_context_is_terminated_n", utc_component_context_is_terminated_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_clone_p", utc_component_info_clone_p, utc_component_info_clone_p_startup, utc_component_info_clone_p_cleanup},
+ {"utc_component_info_clone_n", utc_component_info_clone_n, NULL, NULL},
+ {"utc_component_info_create_p", utc_component_info_create_p, utc_component_info_create_p_startup, utc_component_info_create_p_cleanup},
+ {"utc_component_info_create_n", utc_component_info_create_n, NULL, NULL},
+ {"utc_component_info_destroy_p", utc_component_info_destroy_p, utc_component_info_destroy_p_startup, NULL},
+ {"utc_component_info_destroy_n", utc_component_info_destroy_n, NULL, NULL},
+ {"utc_component_info_get_app_id_p", utc_component_info_get_app_id_p, utc_component_info_get_app_id_p_startup, utc_component_info_get_app_id_p_cleanup},
+ {"utc_component_info_get_app_id_n", utc_component_info_get_app_id_n, NULL, NULL},
+ {"utc_component_info_get_component_id_p", utc_component_info_get_component_id_p, utc_component_info_get_component_id_p_startup, utc_component_info_get_component_id_p_cleanup},
+ {"utc_component_info_get_component_id_n", utc_component_info_get_component_id_n, NULL, NULL},
+ {"utc_component_info_get_component_type_p", utc_component_info_get_component_type_p, utc_component_info_get_component_type_p_startup, utc_component_info_get_component_type_p_cleanup},
+ {"utc_component_info_get_component_type_n", utc_component_info_get_component_type_n, NULL, NULL},
+ {"utc_component_info_get_icon_p", utc_component_info_get_icon_p, utc_component_info_get_icon_p_startup, utc_component_info_get_icon_p_cleanup},
+ {"utc_component_info_get_icon_n", utc_component_info_get_icon_n, NULL, NULL},
+ {"utc_component_info_get_label_p", utc_component_info_get_label_p, utc_component_info_get_label_p_startup, utc_component_info_get_label_p_cleanup},
+ {"utc_component_info_get_label_n", utc_component_info_get_label_n, NULL, NULL},
+ {"utc_component_info_get_localized_label_p", utc_component_info_get_localized_label_p, utc_component_info_get_localized_label_p_startup, utc_component_info_get_localized_label_p_cleanup},
+ {"utc_component_info_get_localized_label_n", utc_component_info_get_localized_label_n, NULL, NULL},
+ {"utc_component_info_is_icon_display_p", utc_component_info_is_icon_display_p, utc_component_info_is_icon_display_p_startup, utc_component_info_is_icon_display_p_cleanup},
+ {"utc_component_info_is_icon_display_n", utc_component_info_is_icon_display_n, NULL, NULL},
+ {"utc_component_info_is_managed_by_task_manager_p", utc_component_info_is_managed_by_task_manager_p, utc_component_info_is_managed_by_task_manager_p_startup, utc_component_info_is_managed_by_task_manager_p_cleanup},
+ {"utc_component_info_is_managed_by_task_manager_n", utc_component_info_is_managed_by_task_manager_n, NULL, NULL},
+ {"utc_component_manager_is_running_p", utc_component_manager_is_running_p, utc_component_manager_is_running_p_startup, NULL},
+ {"utc_component_manager_is_running_n", utc_component_manager_is_running_n, NULL, NULL},
+ {"utc_component_manager_foreach_component_info_p", utc_component_manager_foreach_component_info_p, utc_component_manager_foreach_component_info_p_startup, NULL},
+ {"utc_component_manager_foreach_component_info_n", utc_component_manager_foreach_component_info_n, NULL, NULL},
+ {"utc_component_manager_get_component_context_p", utc_component_manager_get_component_context_p, utc_component_manager_get_component_context_p_startup, NULL},
+ {"utc_component_manager_get_component_context_n", utc_component_manager_get_component_context_n, NULL, NULL},
+ {"utc_component_manager_get_component_info_p", utc_component_manager_get_component_info_p, utc_component_manager_get_component_info_p_startup, NULL},
+ {"utc_component_manager_get_component_info_n", utc_component_manager_get_component_info_n, NULL, NULL},
+ {"utc_component_manager_foreach_component_context_p", utc_component_manager_foreach_component_context_p, utc_component_manager_foreach_component_context_p_startup, NULL},
+ {"utc_component_manager_foreach_component_context_n", utc_component_manager_foreach_component_context_n, NULL, NULL},
+ {"utc_component_manager_resume_component_p", utc_component_manager_resume_component_p, utc_component_manager_resume_component_p_startup, utc_component_manager_resume_component_p_cleanup},
+ {"utc_component_manager_resume_component_n", utc_component_manager_resume_component_n, NULL, NULL},
+ {"utc_component_manager_terminate_bg_component_p", utc_component_manager_terminate_bg_component_p, utc_component_manager_terminate_bg_component_p_startup, utc_component_manager_terminate_bg_component_p_cleanup},
+ {"utc_component_manager_terminate_bg_component_n", utc_component_manager_terminate_bg_component_n, NULL, NULL},
+ {NULL, NULL}
+};
+
+#endif // __TCT_COMPONENT_MANAGER_NATIVE_H__
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <unistd.h>
+#include <app_control.h>
+
+#include "log_private.h"
+#include "utc_common.h"
+
+static void __app_control_result_cb(app_control_h request,
+ app_control_error_e result, void *data)
+{
+ _I("Result: %d", result);
+}
+
+int common_send_launch_request(const char *app_id, const char *component_id,
+ const char *extra)
+{
+ app_control_h app_control;
+ int ret;
+
+ ret = app_control_create(&app_control);
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ _E("Failed to create app_control handle. error(%d)", ret);
+ return ret;
+ }
+
+ ret = app_control_set_app_id(app_control, app_id);
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ _E("Failed to set application ID. error(%d)", ret);
+ app_control_destroy(app_control);
+ return ret;
+ }
+
+ ret = app_control_set_component_id(app_control, component_id);
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ _E("Failed to set component ID. error(%d)", ret);
+ app_control_destroy(app_control);
+ return ret;
+ }
+
+ if (extra) {
+ ret = app_control_add_extra_data(app_control, "extra", extra);
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ _E("Failed to add extra data. error(%d)", ret);
+ app_control_destroy(app_control);
+ return ret;
+ }
+ }
+
+ ret = app_control_send_launch_request_async(app_control,
+ __app_control_result_cb, NULL, NULL);
+ app_control_destroy(app_control);
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ _E("Failed to send launch request. error(%d)", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+bool common_wait_until_done(common_do_cb callback, void *user_data)
+{
+ int retry_count = 0;
+
+ do {
+ if (callback(user_data))
+ return true;
+
+ usleep(500);
+ retry_count++;
+ } while (retry_count <= 10);
+
+ return false;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+typedef bool (*common_do_cb)(void *user_data);
+
+int common_send_launch_request(const char *app_id, const char *component_id,
+ const char *extra);
+
+bool common_wait_until_done(common_do_cb callback, void *user_data);
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_clone_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+}
+
+void utc_component_context_clone_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_context_clone_p
+ * @since_tizen 5.5
+ * @description Clones the component context handle.
+ * @scenario Calls the component_context_clone() and checks the return value.
+ */
+int utc_component_context_clone_p(void)
+{
+ component_context_h context;
+ int ret;
+
+ ret = component_context_clone(&context, __component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to clone component context. error(%d)", ret);
+ return ret;
+ }
+
+ component_context_destroy(context);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_clone_n
+ * @since_tizen 5.5
+ * @description Clones the component context handle.
+ * @scenario Calls the component_context_clone() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_clone_n(void)
+{
+ int ret;
+
+ ret = component_context_clone(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_destroy_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+}
+
+/**
+ * @testcase utc_component_context_destroy_p
+ * @since_tizen 5.5
+ * @description Destroys the component context handle.
+ * @scenario Destroys the component context handle and checks the return value.
+ */
+int utc_component_context_destroy_p(void)
+{
+ int ret;
+
+ ret = component_context_destroy(__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to destroy component context. error(%d)", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_destroy_n
+ * @since_tizen 5.5
+ * @description Destroys the component context handle.
+ * @scenario Calls the component_context_destroy() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_destroy_n(void)
+{
+ int ret;
+
+ ret = component_context_destroy(NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_get_app_id_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+}
+
+void utc_component_context_get_app_id_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_context_get_app_id_p
+ * @since_tizen 5.5
+ * @description Gets the application ID of the component.
+ * @scenario Calls the component_context_get_app_id() and checks the return value.
+ * The app_id must be "org.example.componentbased".
+ */
+int utc_component_context_get_app_id_p(void)
+{
+ char *app_id;
+ int ret;
+
+ ret = component_context_get_app_id(__component_context, &app_id);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get application ID. error(%d)", ret);
+ return ret;
+ }
+
+ if (strcmp(app_id, "org.example.componentbased") != 0) {
+ _E("app_id(%s) should be `org.example.componentbased`", app_id);
+ free(app_id);
+ return -1;
+ }
+ free(app_id);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_get_app_id_n
+ * @since_tizen 5.5
+ * @description Gets the application ID of the component.
+ * @scenario Calls the component_context_get_app_id() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_get_app_id_n(void)
+{
+ int ret;
+
+ ret = component_context_get_app_id(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_get_component_id_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+}
+
+void utc_component_context_get_component_id_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_context_get_component_id_p
+ * @since_tizen 5.5
+ * @description Gets the ID of the component.
+ * @scenario Calls the component_context_get_component_id() and checks the return value.
+ * The component_id must be "org.example.frame-component".
+ */
+int utc_component_context_get_component_id_p(void)
+{
+ char *component_id;
+ int ret;
+
+ ret = component_context_get_component_id(__component_context,
+ &component_id);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component ID. error(%d)", ret);
+ return ret;
+ }
+
+ if (strcmp(component_id, "org.example.frame-component") != 0) {
+ _E("component_id(%s) should be `org.example.frame-component`",
+ component_id);
+ free(component_id);
+ return -1;
+ }
+
+ free(component_id);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_get_component_id_n
+ * @since_tizen 5.5
+ * @description Gets the ID of the component.
+ * @scenario Calls the component_context_get_component_id() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_get_component_id_n(void)
+{
+ int ret;
+
+ ret = component_context_get_component_id(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_get_component_state_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+}
+
+void utc_component_context_get_component_state_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_context_get_component_state_p
+ * @since_tizen 5.5
+ * @description Gets the state of the component.
+ * @scenario Calls the component_context_get_component_state() and checks the return value.
+ * The state must not be "COMPONENT_STATE_SERVICE".
+ */
+int utc_component_context_get_component_state_p(void)
+{
+ component_state_e state;
+ int ret;
+
+ ret = component_context_get_component_state(__component_context,
+ &state);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component state. error(%d)", ret);
+ return ret;
+ }
+
+ if (state == COMPONENT_STATE_SERVICE) {
+ _E("state(%d) should not be `COMPONENT_STATE_SERVICE`", state);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_get_component_state_n
+ * @since_tizen 5.5
+ * @description Gets the state of the component.
+ * @scenario Calls the component_context_get_component_state() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_get_component_state_n(void)
+{
+ int ret;
+
+ ret = component_context_get_component_state(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_get_instance_id_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+}
+
+void utc_component_context_get_instance_id_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_context_get_instance_id_p
+ * @since_tizen 5.5
+ * @description Gets the instance ID of the component.
+ * @scenario Calls the component_context_get_instance_id() and checks the return value.
+ */
+int utc_component_context_get_instance_id_p(void)
+{
+ char *instance_id;
+ int ret;
+
+ ret = component_context_get_instance_id(__component_context,
+ &instance_id);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get instance ID. error(%d)", ret);
+ return ret;
+ }
+
+ free(instance_id);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_get_instance_id_n
+ * @since_tizen 5.5
+ * @description Gets the instance ID of the component.
+ * @scenario Calls the component_context_get_instance_id() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_get_instance_id_n(void)
+{
+ int ret;
+
+ ret = component_context_get_instance_id(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_is_subcomponent_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+}
+
+void utc_component_context_is_subcomponent_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_context_is_subcomponent_p
+ * @since_tizen 5.5
+ * @description Checks the component is running as sub component of the group.
+ * @scenario Calls the component_context_is_subcomponent() and checks the return value.
+ * The is_subcomponent must not be "true".
+ */
+int utc_component_context_is_subcomponent_p(void)
+{
+ bool is_subcomponent;
+ int ret;
+
+ ret = component_context_is_subcomponent(__component_context,
+ &is_subcomponent);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component running state. error(%d)", ret);
+ return ret;
+ }
+
+ if (is_subcomponent) {
+ _E("is_subcomponent(%d) should be `false`", is_subcomponent);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_is_subcomponent_n
+ * @since_tizen 5.5
+ * @description Checks the component is running as sub component of the group.
+ * @scenario Calls the component_context_is_subcomponent() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_is_subcomponent_n(void)
+{
+ int ret;
+
+ ret = component_context_is_subcomponent(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+static bool __check_not_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (!running) {
+ _I("component is not running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_context_is_terminated_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component context. error(%d)", ret);
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", "terminate");
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_not_running, NULL);
+}
+
+void utc_component_context_is_terminated_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_context_is_terminated_p
+ * @since_tizen 5.5
+ * @description Checks whether the component is terminated or not.
+ * @scenario Calls the component_context_is_terminated() and checks the return value.
+ * The terminated must not be "true".
+ */
+int utc_component_context_is_terminated_p(void)
+{
+ bool terminated;
+ int ret;
+
+ ret = component_context_is_terminated(__component_context, &terminated);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component running state. error(%d)", ret);
+ return ret;
+ }
+
+ if (!terminated) {
+ _E("terminated(%d) should be `true`", terminated);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_context_is_terminated_n
+ * @since_tizen 5.5
+ * @description Checks whether the component is terminated or not.
+ * @scenario Calls the component_context_is_terminated() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_context_is_terminated_n(void)
+{
+ int ret;
+
+ ret = component_context_is_terminated(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_clone_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_clone_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_clone_p
+ * @since_tizen 5.5
+ * @description Clones the component information handle.
+ * @scenario Calls the component_info_clone() and checks the return value.
+ */
+int utc_component_info_clone_p(void)
+{
+ component_info_h info;
+ int ret;
+
+ ret = component_info_clone(&info, __component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to clone component info. error(%d)", ret);
+ return ret;
+ }
+
+ component_info_destroy(info);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_clone_n
+ * @since_tizen 5.5
+ * @description Clones the component information handle.
+ * @scenario Calls the component_info_clone() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_clone_n(void)
+{
+ int ret;
+
+ ret = component_info_clone(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_create_p_startup(void)
+{
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+}
+
+void utc_component_info_create_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_create_p
+ * @since_tizen 5.5
+ * @description Creates the component information handle.
+ * @scenario Calls the component_info_create() and checks the return value.
+ */
+int utc_component_info_create_p(void)
+{
+ int ret;
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to create component info. error(%d)", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_create_n
+ * @since_tizen 5.5
+ * @description Creates the component information handle.
+ * @scenario Calls the component_info_create() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_create_n(void)
+{
+ int ret;
+
+ ret = component_info_create(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_destroy_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+/**
+ * @testcase utc_component_info_destroy_p
+ * @since_tizen 5.5
+ * @description Destroys the component information handle.
+ * @scenario Calls the component_info_destroy() and checks the return value.
+ */
+int utc_component_info_destroy_p(void)
+{
+ int ret;
+
+ ret = component_info_destroy(__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to destroy component info. error(%d)", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_destroy_n
+ * @since_tizen 5.5
+ * @description Destroys the component information handle.
+ * @scenario Calls the component_info_destroy() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_destroy_n(void)
+{
+ int ret;
+
+ ret = component_info_destroy(NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_get_app_id_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_get_app_id_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_get_app_id_p
+ * @since_tizen 5.5
+ * @description Gets the application ID of the component.
+ * @scenario Calls the component_info_get_appid() and checks the return value.
+ * The app_id must be "org.example.componentbased".
+ */
+int utc_component_info_get_app_id_p(void)
+{
+ char *app_id;
+ int ret;
+
+ ret = component_info_get_app_id(__component_info, &app_id);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get application ID. error(%d)", ret);
+ return ret;
+ }
+
+ if (strcmp(app_id, "org.example.componentbased") != 0) {
+ _E("app_id(%s) is not `org.example.component-based`", app_id);
+ free(app_id);
+ return -1;
+ }
+
+ free(app_id);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_get_app_id_n
+ * @since_tizen 5.5
+ * @description Gets the application ID of the component.
+ * @scenario Calls the component_info_get_appid() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_get_app_id_n(void)
+{
+ int ret;
+
+ ret = component_info_get_app_id(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_get_component_id_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_get_component_id_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_get_component_id_p
+ * @since_tizen 5.5
+ * @description Gets the ID of the component.
+ * @scenario Calls the component_info_get_component_id() and checks the return value.
+ * The component_id must be "org.example.frame-component".
+ */
+int utc_component_info_get_component_id_p(void)
+{
+ char *component_id;
+ int ret;
+
+ ret = component_info_get_component_id(__component_info, &component_id);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component ID. error(%d)", ret);
+ return ret;
+ }
+
+ if (strcmp(component_id, "org.example.frame-component") != 0) {
+ _E("component_id(%s) is not `org.example.frame-component`",
+ component_id);
+ free(component_id);
+ return -1;
+ }
+
+ free(component_id);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_get_component_id_n
+ * @since_tizen 5.5
+ * @description Gets the ID of the component.
+ * @scenario Calls the component_info_get_component_id() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_get_component_id_n(void)
+{
+ int ret;
+
+ ret = component_info_get_component_id(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_get_component_type_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_get_component_type_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_get_component_type_p
+ * @since_tizen 5.5
+ * @description Gets the type of the component.
+ * @scenario Calls the component_info_get_component_type() and checks the return value.
+ * The type must not be "COMPONENT_INFO_COMPONENT_TYPE_FRAME".
+ */
+int utc_component_info_get_component_type_p(void)
+{
+ component_info_component_type_e type;
+ int ret;
+
+ ret = component_info_get_component_type(__component_info, &type);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component type. error(%d)", ret);
+ return ret;
+ }
+
+ if (type != COMPONENT_INFO_COMPONENT_TYPE_FRAME) {
+ _E("type(%d) is not `COMPONENT_INFO_COMPONENT_TYPE_FRAME`",
+ type);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_get_component_type_n
+ * @since_tizen 5.5
+ * @description Gets the type of the component.
+ * @scenario Calls the component_info_get_component_type() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_get_component_type_n(void)
+{
+ int ret;
+
+ ret = component_info_get_component_type(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_get_icon_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_get_icon_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_get_icon_p
+ * @since_tizen 5.5
+ * @description Gets the icon path of the component.
+ * @scenario Calls the component_info_get_icon() and checks the return value.
+ */
+int utc_component_info_get_icon_p(void)
+{
+ char *icon;
+ int ret;
+
+ ret = component_info_get_icon(__component_info, &icon);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get icon. error(%d)", ret);
+ return ret;
+ }
+
+ free(icon);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_get_icon_n
+ * @since_tizen 5.5
+ * @description Gets the icon path of the component.
+ * @scenario Calls the component_info_get_icon() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_get_icon_n(void)
+{
+ int ret;
+
+ ret = component_info_get_icon(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_get_label_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_get_label_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_get_label_p
+ * @since_tizen 5.5
+ * @description Gets the label of the component.
+ * @scenario Calls the component_info_get_label() and checks the return value.
+ */
+int utc_component_info_get_label_p(void)
+{
+ char *label;
+ int ret;
+
+ ret = component_info_get_label(__component_info, &label);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to check taskmanage. error(%d)", ret);
+ return ret;
+ }
+
+ free(label);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_get_label_n
+ * @since_tizen 5.5
+ * @description Gets the label of the component.
+ * @scenario Calls the component_info_get_label() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_get_label_n(void)
+{
+ int ret;
+
+ ret = component_info_get_label(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_get_localized_label_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_get_localized_label_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_get_localized_label_p
+ * @since_tizen 5.5
+ * @description Gets the localized label of the component.
+ * @scenario Calls the component_info_get_localized_label() and checks the return value.
+ */
+int utc_component_info_get_localized_label_p(void)
+{
+ char *label;
+ int ret;
+
+ ret = component_info_get_localized_label(__component_info, "ko-kr",
+ &label);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to check taskmanage. error(%d)", ret);
+ return ret;
+ }
+
+ free(label);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_get_localized_label_n
+ * @since_tizen 5.5
+ * @description Gets the localized label of the component.
+ * @scenario Calls the component_info_get_localized_label() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_get_localized_label_n(void)
+{
+ int ret;
+
+ ret = component_info_get_localized_label(NULL, NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_is_icon_display_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_is_icon_display_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_is_icon_display_p
+ * @since_tizen 5.5
+ * @description Checks whether the icon of the component should be displayed or not.
+ * @scenario Calls the component_info_is_icon_display() and checks the return value.
+ * The icon_display must be "true".
+ */
+int utc_component_info_is_icon_display_p(void)
+{
+ bool icon_display;
+ int ret;
+
+ ret = component_info_is_icon_display(__component_info, &icon_display);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to check icon display. error(%d)", ret);
+ return ret;
+ }
+
+ if (!icon_display) {
+ _E("icon_display(%d) is not `true`", icon_display);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_is_icon_display_n
+ * @since_tizen 5.5
+ * @description Checks whether the icon of the component should be displayed or not.
+ * @scenario Calls the component_info_is_icon_display() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_is_icon_display_n(void)
+{
+ int ret;
+
+ ret = component_info_is_icon_display(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+static component_info_h __component_info;
+
+void utc_component_info_is_managed_by_task_manager_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = component_info_create("org.example.frame-component",
+ &__component_info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to create component info. error(%d)", ret);
+}
+
+void utc_component_info_is_managed_by_task_manager_p_cleanup(void)
+{
+ component_info_destroy(__component_info);
+}
+
+/**
+ * @testcase utc_component_info_is_managed_by_task_manager_p
+ * @since_tizen 5.5
+ * @description Checks whether the component should be managed by task-manager or not.
+ * @scenario Calls the component_info_is_managed_by_task_manager() and checks the return value.
+ * The managed must be "true".
+ */
+int utc_component_info_is_managed_by_task_manager_p(void)
+{
+ bool managed;
+ int ret;
+
+ ret = component_info_is_managed_by_task_manager(__component_info,
+ &managed);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to check taskmanage. error(%d)", ret);
+ return ret;
+ }
+
+ if (!managed) {
+ _E("managed(%d) is not `true`", managed);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_info_is_managed_by_task_manager_n
+ * @since_tizen 5.5
+ * @description Checks whether the component should be managed by task-manager or not.
+ * @scenario Calls the component_info_is_managed_by_task_manager() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_info_is_managed_by_task_manager_n(void)
+{
+ int ret;
+
+ ret = component_info_is_managed_by_task_manager(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_manager_foreach_component_context_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+}
+
+static bool __component_context_cb(component_context_h context, void *data)
+{
+ bool *matched = (bool *)data;
+ char *component_id;
+ int ret;
+
+ ret = component_context_get_component_id(context, &component_id);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component ID. error(%d)", ret);
+ return false;
+ }
+
+ if (!strcmp(component_id, "org.example.frame-component")) {
+ _I("Matched");
+ *matched = true;
+ free(component_id);
+ return false;
+ }
+
+ free(component_id);
+
+ return true;
+}
+
+/**
+ * @testcase utc_component_manager_foreach_component_context_p
+ * @since_tizen 5.5
+ * @description Retrieves all component contexts of running components.
+ * @scenario Calls the component_manager_foreach_component_context() and checks the return value.
+ * The matched is "true" if the component(org.example.frame-component) is running,
+ * otherwise "false" if not running.
+ * The matched must be "true" in this testcase.
+ */
+int utc_component_manager_foreach_component_context_p(void)
+{
+ bool matched = false;
+ int ret;
+
+ ret = component_manager_foreach_component_context(
+ __component_context_cb, (void *)&matched);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to retrieve running component contexts. error(%d)",
+ ret);
+ return ret;
+ }
+
+ if (!matched) {
+ _E("`org.example.frame-component` is not running");
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_manager_foreach_component_context_n
+ * @since_tizen 5.5
+ * @description Retrieves all component contexts of running components.
+ * @scenario Calls the component_manager_foreach_component_context() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_manager_foreach_component_context_n(void)
+{
+ int ret;
+
+ ret = component_manager_foreach_component_context(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+void utc_component_manager_foreach_component_info_p_startup(void)
+{
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+}
+
+static bool __component_info_cb(component_info_h info, void *data)
+{
+ bool *matched = (bool *)data;
+ char *component_id;
+ int ret;
+
+ ret = component_info_get_component_id(info, &component_id);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get component ID. error(%d)", ret);
+ return false;
+ }
+
+ if (!strcmp(component_id, "org.example.frame-component")) {
+ _I("Matched");
+ *matched = true;
+ free(component_id);
+ return false;
+ }
+
+ free(component_id);
+
+ return true;
+}
+
+/**
+ * @testcase utc_component_manager_foreach_component_info_p
+ * @since_tizen 5.5
+ * @description Retrieves all installed components information.
+ * @scenario Calls the component_manager_foreach_component_info() and checks the return value.
+ * The matched is "true" if the component(org.example.frame-component) is installed,
+ * otherwise "false" if not installed.
+ * The matched must be "true" in this testcase.
+ */
+int utc_component_manager_foreach_component_info_p(void)
+{
+ bool matched = false;
+ int ret;
+
+ ret = component_manager_foreach_component_info(__component_info_cb,
+ (void *)&matched);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to retrieve installed component info. error(%d)",
+ ret);
+ return ret;
+ }
+
+ if (!matched) {
+ _E("`org.example.frame-component` is not installed");
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_manager_foreach_component_info_n
+ * @since_tizen 5.5
+ * @description Retrieves all installed components information.
+ * @scenario Calls the component_manager_foreach_component_info() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_manager_foreach_component_info_n(void)
+{
+ int ret;
+
+ ret = component_manager_foreach_component_info(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_manager_get_component_context_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+}
+
+/**
+ * @testcase utc_component_manager_get_component_context_p
+ * @since_tizen 5.5
+ * @description Gets the component context for the given component ID.
+ * @scenario Calls the component_manager_get_component_context() and checks the return value.
+ */
+int utc_component_manager_get_component_context_p(void)
+{
+ component_context_h context;
+ int ret;
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get running component context. error(%d)", ret);
+ return ret;
+ }
+
+ component_context_destroy(context);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_manager_get_component_context_n
+ * @since_tizen 5.5
+ * @description Gets the component context for the given component ID.
+ * @scenario Calls the component_manager_get_component_context() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_manager_get_component_context_n(void)
+{
+ int ret;
+
+ ret = component_manager_get_component_context(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+
+void utc_component_manager_get_component_info_p_startup(void)
+{
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+}
+
+/**
+ * @testcase utc_component_manager_get_component_info_p
+ * @since_tizen 5.5
+ * @description Gets the component information for the given component ID.
+ * @scenario Calls the component_manager_get_component_info() and checks the return value.
+ */
+int utc_component_manager_get_component_info_p(void)
+{
+ component_info_h info;
+ int ret;
+
+ ret = component_manager_get_component_info(
+ "org.example.frame-component", &info);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to get installed component info. error(%d)", ret);
+ return ret;
+ }
+
+ component_info_destroy(info);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_manager_get_component_info_n
+ * @since_tizen 5.5
+ * @description Gets the component information for the given component ID.
+ * @scenario Calls the component_manager_get_component_info() with nullptrs.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_manager_get_component_info_n(void)
+{
+ int ret;
+
+ ret = component_manager_get_component_info(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_manager_is_running_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ common_wait_until_done(__check_running, NULL);
+}
+
+/**
+ * @testcase utc_component_manager_is_running_p
+ * @since_tizen 5.5
+ * @description Checks whether the component is running or not.
+ * @scenario Calls the component_manager_is_running() and checks the return value.
+ * The running should be "true".
+ */
+int utc_component_manager_is_running_p(void)
+{
+ bool running;
+ int ret;
+
+ ret = component_manager_is_running("org.example.frame-component",
+ &running);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to check running state. error(%d)", ret);
+ return ret;
+ }
+
+ if (!running) {
+ _E("`org.example.frame-component` is not running");
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_manager_is_running_n
+ * @since_tizen 5.5
+ * @description checks whether the component is running or not.
+ * @scenario calls the component_manager_is_running() with nullptr.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_manager_is_running_n(void)
+{
+ int ret;
+
+ ret = component_manager_is_running(NULL, NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdbool.h>
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.frame-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_manager_resume_component_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.frame-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ if (!common_wait_until_done(__check_running, NULL)) {
+ _W("component is not running");
+ return;
+ }
+
+ ret = component_manager_get_component_context(
+ "org.example.frame-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to get running component context. error(%d)", ret);
+}
+
+void utc_component_manager_resume_component_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_manager_resume_component_p
+ * @since_tizen 5.5
+ * @description Resumes the component.
+ * @scenario Calls the component_manager_resume_component() and checks the return value.
+ */
+int utc_component_manager_resume_component_p(void)
+{
+ int ret;
+
+ ret = component_manager_resume_component(__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to send resume request. error(%d)", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_manager_resume_component_n
+ * @since_tizen 5.5
+ * @description Resumes the component.
+ * @scenario Calls the component_manager_resume_component() with nullptr.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_manager_resume_component_n(void)
+{
+ int ret;
+
+ ret = component_manager_resume_component(NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app_control.h>
+#include <component_manager.h>
+
+#include "assert.h"
+#include "tct_app_common.h"
+#include "log_private.h"
+#include "utc_common.h"
+
+static component_context_h __component_context;
+
+static bool __check_running(void *data)
+{
+ bool running = false;
+
+ component_manager_is_running("org.example.service-component", &running);
+ if (running) {
+ _I("component is running");
+ return true;
+ }
+
+ return false;
+}
+
+void utc_component_manager_terminate_bg_component_p_startup(void)
+{
+ int ret;
+
+ TCT_UTCCheckInstalledApp(1, "org.example.componentbased");
+
+ ret = common_send_launch_request("org.example.componentbased",
+ "org.example.service-component", NULL);
+ if (ret < 0) {
+ _E("Failed to send launch request");
+ return;
+ }
+
+ if (!common_wait_until_done(__check_running, NULL)) {
+ _W("component is not running");
+ return;
+ }
+
+ ret = component_manager_get_component_context(
+ "org.example.service-component", &__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE)
+ _E("Failed to get running component context. error(%d)", ret);
+}
+
+void utc_component_manager_terminate_bg_component_p_cleanup(void)
+{
+ component_context_destroy(__component_context);
+}
+
+/**
+ * @testcase utc_component_manager_terminate_bg_component_p
+ * @since_tizen 5.5
+ * @description Terminates the background component.
+ * @scenario Calls the component_manager_terminate_bg_component() and checks the return value.
+ */
+int utc_component_manager_terminate_bg_component_p(void)
+{
+ int ret;
+
+ ret = component_manager_terminate_bg_component(__component_context);
+ if (ret != COMPONENT_MANAGER_ERROR_NONE) {
+ _E("Failed to send resume request. error(%d)", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+/**
+ * @testcase utc_component_manager_terminate_bg_component_n
+ * @since_tizen 5.5
+ * @description Terminates the background component.
+ * @scenario Calls the component_manager_terminate_bg_component() with nullptr.
+ * The return value must be COMPONENT_MANAGER_ERROR_INVALID_PARAMETER.
+ */
+int utc_component_manager_terminate_bg_component_n(void)
+{
+ int ret;
+
+ ret = component_manager_terminate_bg_component(NULL);
+ if (ret != COMPONENT_MANAGER_ERROR_INVALID_PARAMETER) {
+ _E("The return value(%d) is not invalid parameter", ret);
+ return ret;
+ }
+
+ return 0;
+}