[ITC][component-manager][ACR-1416][Add new API's to handle components of the componen... 89/213089/5
authormanoj <manoj.g2@samsung.com>
Fri, 30 Aug 2019 07:27:21 +0000 (12:57 +0530)
committershobhit verma <shobhit.v@samsung.com>
Tue, 3 Sep 2019 11:51:28 +0000 (11:51 +0000)
Change-Id: Ib81529d57a7ff15d7399b06ce501fe9dd299b62f
Signed-off-by: manoj <manoj.g2@samsung.com>
22 files changed:
packaging/itc/native-component-manager-itc.spec [new file with mode: 0755]
packaging/itc/native-component-manager-itc.xml [new file with mode: 0755]
src/itc/component-manager/CMakeLists.txt [new file with mode: 0755]
src/itc/component-manager/ITs-component-manager-common.c [new file with mode: 0755]
src/itc/component-manager/ITs-component-manager-common.h [new file with mode: 0755]
src/itc/component-manager/ITs-component-manager-context.c [new file with mode: 0644]
src/itc/component-manager/ITs-component-manager-info.c [new file with mode: 0755]
src/itc/component-manager/ITs-component-manager.c [new file with mode: 0644]
src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-arm.tpk [new file with mode: 0644]
src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-i386.tpk [new file with mode: 0644]
src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-arm.tpk [new file with mode: 0644]
src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-i386.tpk [new file with mode: 0644]
src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-arm.tpk [new file with mode: 0644]
src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-i386.tpk [new file with mode: 0644]
src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-arm.tpk [new file with mode: 0644]
src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-i386.tpk [new file with mode: 0644]
src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-arm.tpk [new file with mode: 0644]
src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-i386.tpk [new file with mode: 0644]
src/itc/component-manager/tct-component-manager-native.c [new file with mode: 0755]
src/itc/component-manager/tct-component-manager-native_mobile.h [new file with mode: 0755]
src/itc/component-manager/tct-component-manager-native_tizeniot.h [new file with mode: 0755]
src/itc/component-manager/tct-component-manager-native_wearable.h [new file with mode: 0755]

diff --git a/packaging/itc/native-component-manager-itc.spec b/packaging/itc/native-component-manager-itc.spec
new file mode 100755 (executable)
index 0000000..170ba68
--- /dev/null
@@ -0,0 +1,80 @@
+%define MODULE_NAME component-manager
+%define MODULE_LIBNAME capi-appfw-component-manager
+Name:       native-%{MODULE_NAME}-itc
+Summary:    Native API Integration TC (%{name})
+Version:    0.1
+Release:    0
+Group:      Development/Tools
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(%{MODULE_LIBNAME})
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(libsystemd-journal)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: cmake
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(capi-system-info)
+
+%description
+Native API Integration TC (%{name})
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX "%{_libdir}/%{name}"
+
+export LDFLAGS+="-Wl,--rpath=%{PREFIX} -Wl,--as-needed"
+
+%if %{?ASAN_BUILD:1}0
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="true" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+%else
+       %if %{?DEVICE_BUILD_TYPE_MOBILE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="mobile" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_WEARABLE:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="wearable" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TV:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tv" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+       %if %{?DEVICE_BUILD_TYPE_TIZENIOT:1}0
+       cmake . -DMODULE="%{MODULE_NAME}" -DBUILDTCTYPE="itc" -DDEVICE_BUILD_TYPE="tizeniot" -DASANBUILD="false" -DCMAKE_INSTALL_PREFIX=%{_prefix}
+       %endif
+%endif
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE %{buildroot}/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/usr/share/packages/
+cp packaging/itc/native-%{MODULE_NAME}-itc.xml %{buildroot}/usr/share/packages/
+mkdir -p %{buildroot}%{APP_PATH}%{name}/bin
+#cp templates/external_wrapper.sh %{buildroot}%{APP_PATH}%{name}/bin
+%post
+
+%postun
+
+
+%files
+%{APP_PATH}%{name}/*
+/usr/share/packages/native-%{MODULE_NAME}-itc.xml
+/usr/share/license/%{name}
diff --git a/packaging/itc/native-component-manager-itc.xml b/packaging/itc/native-component-manager-itc.xml
new file mode 100755 (executable)
index 0000000..1dddfb6
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="native-component-manager-itc" version="0.1.0" api-version="3.0">
+    <label>NativeDlogTest</label>
+    <author email="mymail@tizentest.com" href="www.tizentest.com">test</author>
+    <description>Native API test Application</description>
+    <ui-application appid="native.component-manager-itc" exec="/usr/apps/native-component-manager-itc/bin/tct-component-manager-native" 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>
diff --git a/src/itc/component-manager/CMakeLists.txt b/src/itc/component-manager/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..e6ff60b
--- /dev/null
@@ -0,0 +1,42 @@
+SET(PKG_NAME "component-manager")
+
+SET(EXEC_NAME "tct-${PKG_NAME}-native")
+SET(RPM_NAME "native-${PKG_NAME}-itc")
+
+SET(CAPI_LIB "capi-appfw-component-manager")
+SET(TC_SOURCES
+       ITs-component-manager-common.c
+       ITs-component-manager.c
+       ITs-component-manager-info.c
+       ITs-component-manager-context.c
+)
+
+PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
+    ${CAPI_LIB}
+       capi-appfw-application
+       libsystemd-journal
+       bundle
+       glib-2.0
+       capi-system-info
+)
+
+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}
+)
+
+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()
diff --git a/src/itc/component-manager/ITs-component-manager-common.c b/src/itc/component-manager/ITs-component-manager-common.c
new file mode 100755 (executable)
index 0000000..8aba62e
--- /dev/null
@@ -0,0 +1,138 @@
+//
+// 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 "ITs-component-manager-common.h"
+
+/** @addtogroup itc-component-manager
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            ComponentManagerGetError
+* @description         Maps component_manager_error_e enums
+* @parameter           error : error level
+* @return                      error string
+*/
+char* ComponentManagerGetError(component_manager_error_e error)
+{
+       char *szErrorVal = NULL;
+       switch ( error )
+       {
+       case COMPONENT_MANAGER_ERROR_NONE:                              szErrorVal = "COMPONENT_MANAGER_ERROR_NONE";                                    break;
+       case COMPONENT_MANAGER_ERROR_INVALID_PARAMETER: szErrorVal = "COMPONENT_MANAGER_ERROR_INVALID_PARAMETER";       break;
+       case COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY:             szErrorVal = "COMPONENT_MANAGER_ERROR_OUT_OF_MEMORY";           break;
+       case COMPONENT_MANAGER_ERROR_IO_ERROR:                          szErrorVal = "COMPONENT_MANAGER_ERROR_IO_ERROR";                                        break;
+       case COMPONENT_MANAGER_ERROR_DB_FAILED:         szErrorVal = "COMPONENT_MANAGER_ERROR_DB_FAILED";               break;
+       case COMPONENT_MANAGER_ERROR_INVALID_APPLICATION:                               szErrorVal = "COMPONENT_MANAGER_ERROR_INVALID_APPLICATION";                                     break;
+       case COMPONENT_MANAGER_ERROR_NOT_RUNNING:       szErrorVal = "COMPONENT_MANAGER_ERROR_NOT_RUNNING";     break;
+       case COMPONENT_MANAGER_ERROR_PERMISSION_DENIED:         szErrorVal = "COMPONENT_MANAGER_ERROR_PERMISSION_DENIED";               break;
+       default:                                                        szErrorVal = "Unknown Error";                                   break;
+       }
+
+       return szErrorVal;
+}
+
+/**
+* @function         AppControlResultAppCB
+* @description      callback for send launch request
+* @parameter        request : app_control request handle, result of callback, data : user data sent to callback
+* @return           None
+*/
+static void AppControlResultAppCB(app_control_h request,
+                app_control_error_e result, void *data)
+{
+       FPRINTF("[Line : %d][%s] \\n", __LINE__, API_NAMESPACE);
+}
+
+/**
+* @function         AppControlCommonLaunchRequest
+* @description      Function for application initial setting to launch app
+* @parameter        app_id : application id to launch, component_id : component id, extra: extra data to be sent during app launch
+* @return           error code
+*/
+int AppControlCommonLaunchRequest(const char *app_id, const char *component_id,
+                const char *extra)
+{
+        app_control_h app_control = NULL;
+        int nRet = -1;;
+
+        nRet = app_control_create(&app_control);
+        if (nRet != APP_CONTROL_ERROR_NONE) {
+               FPRINTF("[Line : %d][%s] Failed to create app_control handle. error(%d)\\n", __LINE__, API_NAMESPACE, nRet);
+                return nRet;
+        }
+
+       if(app_control == NULL) {
+               FPRINTF("[Line : %d][%s] app_control handle is NULL\\n", __LINE__, API_NAMESPACE);
+                return 1;
+       }
+
+        nRet = app_control_set_app_id(app_control, app_id);
+        if (nRet != APP_CONTROL_ERROR_NONE) {
+                FPRINTF("[Line : %d][%s] Failed to set application ID. error(%d)\\n", __LINE__, API_NAMESPACE, nRet);
+                app_control_destroy(app_control);
+                return nRet;
+        }
+
+        nRet = app_control_set_component_id(app_control, component_id);
+        if (nRet != APP_CONTROL_ERROR_NONE) {
+                FPRINTF("[Line : %d][%s] Failed to set component ID. error(%d)\\n", __LINE__, API_NAMESPACE, nRet);
+                app_control_destroy(app_control);
+                return nRet;
+        }
+
+        if (extra) {
+                nRet = app_control_add_extra_data(app_control, "extra", extra);
+                if (nRet != APP_CONTROL_ERROR_NONE) {
+                        FPRINTF("[Line : %d][%s] Failed to add extra data. error(%d)\\n", __LINE__, API_NAMESPACE, nRet);
+                        app_control_destroy(app_control);
+                        return nRet;
+                }
+        }
+
+        nRet = app_control_send_launch_request_async(app_control,
+                        AppControlResultAppCB, NULL, NULL);
+        app_control_destroy(app_control);
+        if (nRet != APP_CONTROL_ERROR_NONE) {
+                FPRINTF("[Line : %d][%s] Failed to send launch request. error(%d)\\n", __LINE__, API_NAMESPACE, nRet);
+                return nRet;
+        }
+
+        return 0;
+}
+
+/**
+* @function         CommonWaitUntilDone
+* @description      callback for waiting for specified operation
+* @parameter        common_do_cb: callback , user_data : user data sent to callback
+* @return           bool value
+*/
+bool CommonWaitUntilDone(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;
+}
+
+/** @} */
diff --git a/src/itc/component-manager/ITs-component-manager-common.h b/src/itc/component-manager/ITs-component-manager-common.h
new file mode 100755 (executable)
index 0000000..3dabc13
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// 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 _ITS_COMPONENT_MANAGER_COMMON_H_
+#define _ITS_COMPONENT_MANAGER_COMMON_H_
+
+//Add test package related includes here
+#include "tct_common.h"
+#include <fcntl.h>
+#include <dlog.h>
+#include <component_manager.h>
+#include "tct_app_common.h"
+#include <glib.h>
+#include <glib-object.h>
+/** @addtogroup itc-component-manager
+*  @ingroup itc
+*  @{
+*/
+
+bool g_bComponentManagerCreation;
+
+#define API_NAMESPACE                  "COMPONENT_MANAGER_ITC"
+#define MAXENUMSIZE                            50
+#define SETENUM                                        1
+#define GETENUM                                        0
+
+
+#define START_TEST {\
+       FPRINTF("[Line : %d][%s] Starting test : %s\\n", __LINE__, API_NAMESPACE, __FUNCTION__);\
+       if ( !g_bComponentManagerCreation )\
+{\
+       FPRINTF("[Line : %d][%s] Precondition of Component-manager failed so leaving test\\n", __LINE__, API_NAMESPACE);\
+       return 1;\
+}\
+}
+
+#define CHECK_HANDLE_CLEANUP(Handle, API, FreeResource) {\
+        if ( Handle == NULL )\
+        {\
+                FPRINTF("[Line : %d][%s] %s failed, error returned = Handle returned is NULL\\n", __LINE__, API_NAMESPACE, API);\
+                FreeResource;\
+                return 1;\
+        }\
+}
+
+char* ComponentManagerGetError(component_manager_error_e error);
+typedef bool (*common_do_cb)(void *user_data);
+int AppControlCommonLaunchRequest(const char *app_id, const char *component_id, const char *extra);
+bool CommonWaitUntilDone(common_do_cb callback, void *user_data);
+
+
+
+
+/** @} */
+#endif  //_ITS_COMPONENT_MANAGER_COMMON_H_
diff --git a/src/itc/component-manager/ITs-component-manager-context.c b/src/itc/component-manager/ITs-component-manager-context.c
new file mode 100644 (file)
index 0000000..3fb540d
--- /dev/null
@@ -0,0 +1,363 @@
+//
+// 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 "ITs-component-manager-common.h"
+/** @addtogroup itc-component-manager
+*  @ingroup itc
+*  @{
+*/
+/**
+* @function            IsComponentManagerRunning
+* @description         To check weather component manager running
+* @parameter           edata : user data sent to function
+* @return              Status of component manager weather its running or not(True/False)
+*/
+static bool IsComponentManagerRunning(void *data)
+{
+        bool isRunning = false;
+
+        component_manager_is_running("org.example.frame-component", &isRunning);
+        if (isRunning) {
+               FPRINTF("[Line : %d][%s] component is running\\n", __LINE__, API_NAMESPACE);
+                return true;
+        }
+
+        return false;
+}
+
+/**
+* @function            ITs_component_manager_context_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+
+
+void ITs_component_manager_context_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_component_manager_context_startup\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       TCT_CheckInstalledApp(1, "org.example.componentbased");
+       int nRet = AppControlCommonLaunchRequest("org.example.componentbased",
+                        "org.example.frame-component", NULL);
+        if (nRet < 0) {
+                FPRINTF("[Line : %d][%s] Failed to send launch request\\n", __LINE__, API_NAMESPACE);
+               g_bComponentManagerCreation = false;
+                return;
+        }
+
+        if(CommonWaitUntilDone(IsComponentManagerRunning, NULL))
+               g_bComponentManagerCreation = true;
+}
+
+/**
+* @function            ITs_component_manager_context_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return              NA
+*/
+void ITs_component_manager_context_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_component_manager_context_startup\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+/**
+* @testcase                    ITc_component_manager_context_clone_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Clone component context handle
+* @scenario                    Clone component context handle
+* @apicovered                  component_context_clone
+* @passcase                    When component_context_clone and Pre condition API successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Clone component context handle
+//& type: auto
+int ITc_component_manager_context_clone_p(void)
+{
+       START_TEST;
+       component_context_h hContext =  NULL;
+       component_context_h cContext = NULL;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_clone(&cContext, hContext);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_clone", ComponentManagerGetError(nRet),component_context_destroy(hContext));
+       CHECK_HANDLE_CLEANUP(cContext, "component_context_clone", component_context_destroy(hContext));
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       nRet = component_context_destroy(cContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_component_context_get_app_id_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Get Context APP ID
+* @scenario                    Get Context APP ID
+* @apicovered                  component_context_get_app_id
+* @passcase                    When component_context_get_app_id and Pre condition API successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Get Context APP ID
+//& type: auto
+int ITc_component_manager_component_context_get_app_id_p(void)
+{
+       START_TEST;
+       component_context_h hContext = NULL;
+       char *pszAppID = NULL;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_get_app_id(hContext, &pszAppID);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_get_app_id", ComponentManagerGetError(nRet),component_context_destroy(hContext));
+       CHECK_HANDLE_CLEANUP(pszAppID, "component_context_get_app_id", component_context_destroy(hContext));
+
+       if (strcmp(pszAppID, "org.example.componentbased") != 0) {
+                FPRINTF("[Line : %d][%s] get App ID %s and Set APP ID  %s is different\\n", __LINE__, API_NAMESPACE, pszAppID, "org.example.componentbased");
+                free(pszAppID);
+               component_context_destroy(hContext);
+                return 1;
+        }
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       free(pszAppID);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_component_context_get_component_id_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Get Context APP ID
+* @scenario                    Get Context APP ID
+* @apicovered                  component_context_get_component_id and Pre condition API successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Get Context component ID
+//& type: auto
+int ITc_component_manager_component_context_get_component_id_p(void)
+{
+       START_TEST;
+       component_context_h hContext = NULL;
+       char *pszComponentID = NULL;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_get_component_id(hContext, &pszComponentID);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_get_component_id", ComponentManagerGetError(nRet),component_context_destroy(hContext));
+       CHECK_HANDLE_CLEANUP(pszComponentID, "component_context_get_component_id", component_context_destroy(hContext));
+
+       if (strcmp(pszComponentID, "org.example.frame-component") != 0) {
+                FPRINTF("[Line : %d][%s] get App ID %s and Set APP ID  %s is different\\n", __LINE__, API_NAMESPACE, pszComponentID, "org.example.frame-component");
+                free(pszComponentID);
+               component_context_destroy(hContext);
+                return 1;
+        }
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       free(pszComponentID);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_component_context_get_component_state_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Get Context APP state
+* @scenario                    Get Context APP state
+* @apicovered                  component_context_get_component_state
+* @passcase                    When component_context_get_component_id and Pre condition API successful..
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Get Context component state
+//& type: auto
+int ITc_component_manager_component_context_get_component_state_p(void)
+{
+       START_TEST;
+       component_context_h hContext = NULL;
+       component_state_e estate = COMPONENT_STATE_INITIALIZED;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_get_component_state(hContext, &estate);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_get_component_state", ComponentManagerGetError(nRet),component_context_destroy(hContext));
+
+       if (estate == COMPONENT_STATE_INITIALIZED) {
+               FPRINTF("[Line : %d][%s] should not be `COMPONENT_STATE_INITIALIZED\\n", __LINE__, API_NAMESPACE);
+               component_context_destroy(hContext);
+                return 1;
+        }
+
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_component_context_get_instance_id_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Get Context instance ID
+* @scenario                    Get Context instance ID
+* @apicovered                  component_context_get_instance_id
+* @passcase                    When component_context_get_instance_id and Pre condition API successful..
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Get Context instance ID
+//& type: auto
+int ITc_component_manager_component_context_get_instance_id_p(void)
+{
+       START_TEST;
+       component_context_h hContext = NULL;
+       char *pszInstanceID = NULL;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_get_instance_id(hContext, &pszInstanceID);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_get_instance_id", ComponentManagerGetError(nRet),component_context_destroy(hContext));
+       CHECK_HANDLE_CLEANUP(pszInstanceID, "component_context_get_instance_id", component_context_destroy(hContext));
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       free(pszInstanceID);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_component_context_is_terminated__p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @scenario                    Check weather context is terminated
+* @apicovered                  component_context_is_terminated
+* @passcase                    When component_context_is_terminated and Pre condition API successful..
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Check weather context is terminated
+//& type: auto
+int ITc_component_manager_component_context_is_terminated_p(void)
+{
+       START_TEST;
+       component_context_h hContext = NULL;
+       bool isTerminated = NULL;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_is_terminated(hContext, &isTerminated);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_is_terminated", ComponentManagerGetError(nRet),component_context_destroy(hContext));
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+
+/**
+* @testcase                    ITc_component_manager_component_context_is_subcomponent__p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @scenario                    Check weather context is subcomponent
+* @apicovered                  component_context_is_subcomponent
+* @passcase                    When component_context_is_subcomponent and Pre condition API successful..
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Check weather context is subcomponent
+//& type: auto
+int ITc_component_manager_component_context_is_subcomponent_p(void)
+{
+       START_TEST;
+       component_context_h hContext = NULL;
+       bool isSubComponent = false;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_is_subcomponent(hContext, &isSubComponent);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_is_subcomponent", ComponentManagerGetError(nRet),component_context_destroy(hContext));
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+
+
diff --git a/src/itc/component-manager/ITs-component-manager-info.c b/src/itc/component-manager/ITs-component-manager-info.c
new file mode 100755 (executable)
index 0000000..f8170d0
--- /dev/null
@@ -0,0 +1,415 @@
+//
+// 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 "ITs-component-manager-common.h"
+static component_info_h gComponentInfoHandle;
+
+/** @addtogroup itc-component-manager
+*  @ingroup itc
+*  @{
+*/
+
+//& set: Component-manager
+
+/**
+* @function            ITs_component_manager_info_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_component_manager_info_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_component_manager_info_startup\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       TCT_CheckInstalledApp(1, "org.example.componentbased");
+       g_bComponentManagerCreation = true;
+}
+
+/**
+* @function            ITs_component_manager_info_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_component_manager_info_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_component_manager_info_cleanup\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+
+/** @addtogroup itc-component-manager-testcases
+*  @brief              Integration testcases for module component-manager
+*  @ingroup    itc-dlog
+*  @{
+*/
+
+/**
+* @testcase                    ITc_component_manager_create_destroy_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To create and destroy component manager handle
+* @scenario                    create and destroy component manager handle
+* @apicovered                  component_info_create, component_info_destroy
+* @passcase                    When component_info_create and component_info_destroy successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: API create and destroy component manager handle
+//& type: auto
+int ITc_component_manager_create_destroy_p(void)
+{
+       START_TEST;
+       component_info_h hComponentInfoHandle = NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create" );
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_get_app_id_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To get component manager app id
+* @scenario                    To get component manager app id
+* @apicovered                  component_info_get_app_id
+* @passcase                    When Precondition and target API  successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: API To get component manager app id
+//& type: auto
+int ITc_component_manager_info_get_app_id_p(void)
+{
+       START_TEST;
+       component_info_h hComponentInfoHandle = NULL;
+       char *pszAppID = NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create");
+
+       nRet = component_info_get_app_id(hComponentInfoHandle, &pszAppID);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_get_app_id", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+       CHECK_HANDLE_CLEANUP(pszAppID, "component_info_get_app_id", component_info_destroy(hComponentInfoHandle));
+
+       if (strcmp(pszAppID, "org.example.componentbased") != 0) {
+                FPRINTF("[Line : %d][%s] get App ID %s and Set APP ID  %s is different\\n", __LINE__, API_NAMESPACE, pszAppID, "org.example.componentbased");
+                free(pszAppID);
+               component_info_destroy(hComponentInfoHandle);
+                return 1;
+        }
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       free(pszAppID);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_get_component_id_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To get component manager component id
+* @scenario                    to get component manager component id
+* @apicovered                  component_info_get_component_id
+* @passcase                    When Precondition and target API  successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: To get component manager component id
+//& type: auto
+int ITc_component_manager_info_get_component_id_p(void)
+{
+       START_TEST;
+       component_info_h hComponentInfoHandle = NULL;
+       char *pszComponentID = NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create");
+
+       nRet = component_info_get_component_id(hComponentInfoHandle, &pszComponentID);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_get_component_id", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+       CHECK_HANDLE_CLEANUP(pszComponentID, "component_info_get_component_id", component_info_destroy(hComponentInfoHandle));
+
+       if (strcmp(pszComponentID, "org.example.frame-component") != 0) {
+                FPRINTF("[Line : %d][%s] get Component ID %s and Set Component ID  %s is different\\n", __LINE__, API_NAMESPACE, pszComponentID, "org.example.frame-component");
+                free(pszComponentID);
+               component_info_destroy(hComponentInfoHandle);
+                return 1;
+        }
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       free(pszComponentID);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_get_component_type_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To get component manager component type
+* @scenario                    to get component manager component type
+* @apicovered                  component_info_get_component_type
+* @passcase                    When Precondition and target API  successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: To get component manager component type
+//& type: auto
+int ITc_component_manager_info_get_component_type_p(void)
+{
+       START_TEST;
+       component_info_h hComponentInfoHandle = NULL;
+       component_info_component_type_e etype = -1;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create");
+
+       nRet = component_info_get_component_type(hComponentInfoHandle, &etype);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_get_component_type", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+
+       if (etype != COMPONENT_INFO_COMPONENT_TYPE_FRAME) {
+                FPRINTF("[Line : %d][%s] get Component type and Set Component type is different\\n", __LINE__, API_NAMESPACE);
+               component_info_destroy(hComponentInfoHandle);
+                return 1;
+        }
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_get_icon_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To get component manager icon
+* @scenario                    to get component manager icon
+* @apicovered                  component_info_get_icon
+* @passcase                    When Precondition and target API  successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: To get component manager component icon
+//& type: auto
+int ITc_component_manager_info_get_icon_p(void)
+{
+       START_TEST;
+       char *pszComponentIcon = NULL;
+       component_info_h hComponentInfoHandle = NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create");
+
+       nRet = component_info_get_icon(hComponentInfoHandle, &pszComponentIcon);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_get_icon", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+       CHECK_HANDLE_CLEANUP(pszComponentIcon, "component_info_get_icon", component_info_destroy(hComponentInfoHandle));
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       free(pszComponentIcon);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_get_localized_label_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To get component manager localized_label
+* @scenario                    to get component manager localized_label
+* @apicovered                  component_info_get_localized_label
+* @passcase                    When Precondition and target API  successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: To get component manager component localized_label
+//& type: auto
+int ITc_component_manager_info_get_localized_label_p(void)
+{
+       START_TEST;
+       char *pszLocalizedLabel = NULL;
+       component_info_h hComponentInfoHandle = NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create");
+
+       nRet = component_info_get_localized_label(hComponentInfoHandle, "ko-kr", &pszLocalizedLabel);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_get_localized_label", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+       CHECK_HANDLE_CLEANUP(pszLocalizedLabel, "component_info_get_localized_label", component_info_destroy(hComponentInfoHandle));
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       free(pszLocalizedLabel);
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_clone_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To clone component manager handle
+* @scenario                    clone component manager handle
+* @apicovered                  component_info_clone
+* @passcase                    hen Precondition and target API  successful
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: API clone component info handle
+//& type: auto
+int ITc_component_manager_info_clone_p(void)
+{
+       START_TEST;
+       component_info_h hComponentInfoHandle = NULL;
+       component_info_h hCloneinfo = NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create" );
+
+       nRet = component_info_clone(&hCloneinfo, hComponentInfoHandle);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_clone", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+       CHECK_HANDLE_CLEANUP(hCloneinfo, "component_info_clone", component_info_destroy(hComponentInfoHandle));
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       nRet = component_info_destroy(hCloneinfo);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_is_icon_display_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To check icon display status
+* @scenario                    To check icon display status
+* @apicovered                   component_info_is_icon_display
+* @passcase                    When Precondition and target API  successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: To check icon display status
+//& type: auto
+int ITc_component_manager_info_is_icon_display_p(void)
+{
+       START_TEST;
+       bool isIconDisplay = false;
+       component_info_h hComponentInfoHandle = NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create");
+
+       nRet = component_info_is_icon_display(hComponentInfoHandle, &isIconDisplay);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_is_icon_display", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_info_is_managed_by_task_manager_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To check weather it is managed by task manager
+* @scenario                    To check weather it is managed by task manager
+* @apicovered                   component_info_is_managed_by_task_manager
+* @passcase                    When Precondition and target API  successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        component manager handle should be created
+* @postcondition               component manager handle should be destroyed
+*/
+//& purpose: To check weather it is managed by task manager
+//& type: auto
+int ITc_component_manager_info_is_managed_by_task_manager_p(void)
+{
+       START_TEST;
+       bool isManagedbyTask = false;
+       component_info_h hComponentInfoHandle =  NULL;
+
+       int nRet = component_info_create("org.example.frame-component", &hComponentInfoHandle);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_create", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hComponentInfoHandle, "component_info_create");
+
+       nRet = component_info_is_managed_by_task_manager(hComponentInfoHandle, &isManagedbyTask);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_is_managed_by_task_manager", ComponentManagerGetError(nRet), component_info_destroy(hComponentInfoHandle));
+
+       nRet = component_info_destroy(hComponentInfoHandle);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/** @} */
+/** @} */
diff --git a/src/itc/component-manager/ITs-component-manager.c b/src/itc/component-manager/ITs-component-manager.c
new file mode 100644 (file)
index 0000000..404da33
--- /dev/null
@@ -0,0 +1,373 @@
+//
+// 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 "ITs-component-manager-common.h"
+bool g_CallbackComponent = false;
+
+/** @addtogroup itc-component-manager
+*  @ingroup itc
+*  @{
+*/
+
+/**
+* @function            IsComponentManagerRunning
+* @description         To check weather component manager running
+* @parameter           edata : user data sent to function
+* @return              Status of component manager weather its running or not(True/False)
+*/
+static bool IsComponentManagerRunning(void *data)
+{
+        bool isRunning = false;
+
+        component_manager_is_running("org.example.frame-component", &isRunning);
+        if (isRunning) {
+               FPRINTF("[Line : %d][%s] component is running\\n", __LINE__, API_NAMESPACE);
+                return true;
+        }
+
+        return false;
+}
+
+/**
+* @function            ComponentInfoCB
+* @description         callback for foreach component info
+* @parameter           info: component info handle,data : user data sent to function
+* @return              Callback which will call and return status of callback
+*/
+static bool ComponentInfoCB(component_info_h info, void *data)
+{
+        bool *isMatched = (bool *)data;
+        char *pszComponentID =  NULL;
+       g_CallbackComponent = true;
+
+       FPRINTF("[Line : %d][%s] Inside callback ComponentInfoCB\\n", __LINE__, API_NAMESPACE);
+
+        int nRet = component_info_get_component_id(info, &pszComponentID);
+        if (nRet != COMPONENT_MANAGER_ERROR_NONE) {
+               FPRINTF("[Line : %d][%s] Failed to get component ID. error(%d)\\n", __LINE__, API_NAMESPACE, nRet);
+                FREE_MEMORY(pszComponentID);
+                return false;
+        }
+
+        if (!strcmp(pszComponentID, "org.example.frame-component")) {
+               FPRINTF("[Line : %d][%s] Matched\\n", __LINE__, API_NAMESPACE);
+                *isMatched = true;
+                FREE_MEMORY(pszComponentID);
+                return false;
+        }
+       
+        FREE_MEMORY(pszComponentID);
+
+        return true;
+}
+
+/**
+* @function            ComponentContextCB
+* @description         callback for foreach component context
+* @parameter           info: component context handle,data : user data sent to function
+* @return              Callback which will call and return status of callback
+*/
+static bool ComponentContextCB(component_context_h context, void *data)
+{
+        bool *matched = (bool *)data;
+        char *pszComponentID = NULL;
+       g_CallbackComponent = true;
+
+       FPRINTF("[Line : %d][%s] Inside callback ComponentContextCB\\n", __LINE__, API_NAMESPACE);
+        int nRet = component_context_get_component_id(context, &pszComponentID);
+        if (nRet != COMPONENT_MANAGER_ERROR_NONE) {
+                FPRINTF("[Line : %d][%s] Failed to get component ID. error(%d)\\n", __LINE__, API_NAMESPACE, nRet);
+               FREE_MEMORY(pszComponentID);
+                return false;
+        }
+
+        if (!strcmp(pszComponentID, "org.example.frame-component")) {
+                FPRINTF("[Line : %d][%s] Matched\\n", __LINE__, API_NAMESPACE);
+                *matched = true;
+               FREE_MEMORY(pszComponentID);
+                return false;
+        }
+
+        FREE_MEMORY(pszComponentID);
+
+        return true;
+}
+
+//& set: Component-manager
+
+/**
+* @function            ITs_component_manager_startup
+* @description         Called before each test, set the service boolean true
+* @parameter           NA
+* @return                      NA
+*/
+
+void ITs_component_manager_startup(void)
+{
+       struct stat buf;
+       if ( stat(ERR_LOG, &buf) == 0 )
+       {
+               remove(ERR_LOG);
+       }
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_component_manager_startup\\n", __LINE__, API_NAMESPACE);
+#endif
+
+       TCT_CheckInstalledApp(1, "org.example.componentbased");
+       int nRet = AppControlCommonLaunchRequest("org.example.componentbased",
+                        "org.example.frame-component", NULL);
+        if (nRet < 0) {
+                FPRINTF("[Line : %d][%s] Failed to send launch request\\n", __LINE__, API_NAMESPACE);
+               g_bComponentManagerCreation = false;
+                return;
+        }
+
+        if(CommonWaitUntilDone(IsComponentManagerRunning, NULL))
+               g_bComponentManagerCreation = true;
+}
+
+/**
+* @function            ITs_component_manager_cleanup
+* @description         Called after each test
+* @parameter           NA
+* @return                      NA
+*/
+void ITs_component_manager_cleanup(void)
+{
+#if DEBUG
+       FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_component_manager_startup\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+/** @addtogroup itc-component-manager-testcases
+*  @brief              Integration testcases for module component-manager
+*  @ingroup    itc-dlog
+*  @{
+*/
+
+/**
+* @testcase                    ITc_component_manager_is_running_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To Check weather component manager running
+* @scenario                    To Check weather component manager running
+* @apicovered                  component_manager_is_running
+* @passcase                    When component_manager_is_running successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: API To Check weather component manager running
+//& type: auto
+int ITc_component_manager_is_running_p(void)
+{
+       START_TEST;
+       bool isRunning = false;
+       int nRet = component_manager_is_running("org.example.frame-component", &isRunning);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_is_running", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_get_component_info_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Get Component manager component info handle
+* @scenario                    Get Component manager component info handle
+* @apicovered                  ccomponent_manager_get_component_info
+* @passcase                    When component_manager_is_running successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               Info handle should be destroy
+*/
+//& purpose: Get Component manager component info handle
+//& type: auto
+int ITc_component_manager_get_component_info_p(void)
+{
+       START_TEST;
+       component_info_h hinfo;
+
+       int nRet = component_manager_get_component_info("org.example.frame-component", &hinfo);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_info", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hinfo, "component_manager_get_component_info");
+
+       nRet = component_info_destroy(hinfo);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_info_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_get_component_context_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Get Component manager component info context
+* @scenario                    Get Component manager component info context
+* @apicovered                  component_manager_get_component_context
+* @passcase                    When component_manager_get_component_context successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Get Component manager component info context
+//& type: auto
+int ITc_component_manager_get_component_context_p(void)
+{
+       START_TEST;
+       component_context_h hContext;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_resume_component_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Resume Component Manager Component
+* @scenario                    Resume Component Manager Component
+* @apicovered                  component_manager_resume_component
+* @passcase                    When component_manager_resume_component and Precondition API successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Resume Component Manager Component
+//& type: auto
+int ITc_component_manager_resume_component_p(void)
+{
+       START_TEST;
+       component_context_h hContext;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_manager_resume_component(hContext);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_resume_component", ComponentManagerGetError(nRet), component_context_destroy(hContext));
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_terminate_bg_component_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 Terminate Component Manager Bg Component
+* @scenario                    Terminate Component Manager Bg Component
+* @apicovered                  component_manager_terminate_bg_component
+* @passcase                    When component_manager_terminate_bg_component and Precondition API successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               context handle should be destroy
+*/
+//& purpose: Terminate Component Manager Bg Component
+//& type: auto
+int ITc_component_manager_terminate_bg_component_p(void)
+{
+       START_TEST;
+       component_context_h hContext;
+
+       int nRet = component_manager_get_component_context("org.example.frame-component", &hContext);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_get_component_context", ComponentManagerGetError(nRet));
+       CHECK_HANDLE(hContext, "component_manager_get_component_context");
+
+       nRet = component_manager_terminate_bg_component(hContext);
+       PRINT_RESULT_CLEANUP(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_terminate_bg_component", ComponentManagerGetError(nRet), component_context_destroy(hContext));
+
+       nRet = component_context_destroy(hContext);
+       PRINT_RESULT_NORETURN(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_context_destroy", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_foreach_component_info_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To Foreach Component manager info
+* @scenario                    To Foreach Component manager info
+* @apicovered                  component_manager_foreach_component_info
+* @passcase                    When component_manager_foreach_component_info successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: To Foreach Component manager info
+//& type: auto
+int ITc_component_manager_foreach_component_info_p(void)
+{
+       START_TEST;
+       bool isMatched = false;
+
+       g_CallbackComponent = false;
+       int nRet = component_manager_foreach_component_info(ComponentInfoCB, (void *)&isMatched);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_foreach_component_info", ComponentManagerGetError(nRet));
+       PRINT_RESULT(g_CallbackComponent, true, "callback not invoked for component_manager_foreach_component_info API", ComponentManagerGetError(nRet));
+
+       return 0;
+}
+
+/**
+* @testcase                    ITc_component_manager_foreach_component_context_p
+* @since_tizen                 5.5
+* @author                      SRID(manoj.g2)
+* @reviewer                    SRID(shobhit.v)
+* @type                        Auto
+* @description                 To Foreach Component manager context
+* @scenario                    To Foreach Component manager context
+* @apicovered                  component_manager_foreach_component_context
+* @passcase                    When component_manager_foreach_component_context successful.
+* @failcase                    If target API fails or any precondition API fails
+* @precondition                        None
+* @postcondition               None
+*/
+//& purpose: To Foreach Component manager context
+//& type: auto
+int ITc_component_manager_foreach_component_context_p(void)
+{
+       START_TEST;
+       bool isMatched = false;
+
+       g_CallbackComponent = false;
+       int nRet = component_manager_foreach_component_context(ComponentContextCB, (void *)&isMatched);
+       PRINT_RESULT(COMPONENT_MANAGER_ERROR_NONE, nRet, "component_manager_foreach_component_context", ComponentManagerGetError(nRet));
+       PRINT_RESULT(g_CallbackComponent, true, "callback not invoked for component_manager_foreach_component_context API", ComponentManagerGetError(nRet));
+
+       return 0;
+}
diff --git a/src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-arm.tpk b/src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..bf7119a
Binary files /dev/null and b/src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-arm.tpk differ
diff --git a/src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-i386.tpk b/src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..190f7cc
Binary files /dev/null and b/src/itc/component-manager/res/mobile/org.example.componentbased-1.0.0-i386.tpk differ
diff --git a/src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-arm.tpk b/src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..bf7119a
Binary files /dev/null and b/src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-arm.tpk differ
diff --git a/src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-i386.tpk b/src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..190f7cc
Binary files /dev/null and b/src/itc/component-manager/res/tizeniot/mobile/org.example.componentbased-1.0.0-i386.tpk differ
diff --git a/src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-arm.tpk b/src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..f0f7a68
Binary files /dev/null and b/src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-arm.tpk differ
diff --git a/src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-i386.tpk b/src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..dc0c883
Binary files /dev/null and b/src/itc/component-manager/res/tizeniot/org.example.componentbased-1.0.0-i386.tpk differ
diff --git a/src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-arm.tpk b/src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..f0f7a68
Binary files /dev/null and b/src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-arm.tpk differ
diff --git a/src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-i386.tpk b/src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..dc0c883
Binary files /dev/null and b/src/itc/component-manager/res/tv/org.example.componentbased-1.0.0-i386.tpk differ
diff --git a/src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-arm.tpk b/src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..f0f7a68
Binary files /dev/null and b/src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-arm.tpk differ
diff --git a/src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-i386.tpk b/src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..dc0c883
Binary files /dev/null and b/src/itc/component-manager/res/wearable/org.example.componentbased-1.0.0-i386.tpk differ
diff --git a/src/itc/component-manager/tct-component-manager-native.c b/src/itc/component-manager/tct-component-manager-native.c
new file mode 100755 (executable)
index 0000000..b34448d
--- /dev/null
@@ -0,0 +1,137 @@
+//
+// 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 <stdio.h>
+#include <string.h>
+#include "tct_common.h"
+
+#ifdef MOBILE  //Starts MOBILE
+#include "tct-component-manager-native_mobile.h"
+#endif  //MOBILE       //End MOBILE
+
+#ifdef WEARABLE        //Starts WEARABLE
+#include "tct-component-manager-native_wearable.h"
+#endif  //WEARABLE     //End WEARABLE
+
+#ifdef TV      //Starts TV
+#include "tct-component-manager-native_tv.h"
+#endif  //TV   //End TV
+
+#ifdef TIZENIOT        //Starts TIZENIOT
+#include "tct-component-manager-native_tizeniot.h"
+#endif  //TIZENIOT     //End TIZENIOT
+
+#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 <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+
+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)) )
+               {
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup begin", pszGetTCName);
+                       if ( tc_array[i].startup )
+                       {
+                               tc_array[i].startup();
+                       }
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Startup end", pszGetTCName);
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body begin", pszGetTCName);
+                       result = tc_array[i].function();
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s returns value = %d", pszGetTCName, result);
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Body end", pszGetTCName);
+
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup begin", pszGetTCName);
+                       if ( tc_array[i].cleanup )
+                       {
+                               tc_array[i].cleanup();
+                       }
+                       dlog_print(DLOG_INFO, "NativeTCT", "%s : Cleanup end", pszGetTCName);
+                       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;
+
+       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, NULL);
+       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;
+}
diff --git a/src/itc/component-manager/tct-component-manager-native_mobile.h b/src/itc/component-manager/tct-component-manager-native_mobile.h
new file mode 100755 (executable)
index 0000000..51506c8
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// 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 ITs_component_manager_startup(void);
+extern void ITs_component_manager_cleanup(void);
+extern void ITs_component_manager_info_startup(void);
+extern void ITs_component_manager_info_cleanup(void);
+extern void ITs_component_manager_context_startup(void);
+extern void ITs_component_manager_context_cleanup(void);
+
+
+extern int ITc_component_manager_is_running_p(void);
+extern int ITc_component_manager_get_component_info_p(void);
+extern int ITc_component_manager_get_component_context_p(void);
+extern int ITc_component_manager_resume_component_p(void);
+extern int ITc_component_manager_terminate_bg_component_p(void);
+extern int ITc_component_manager_foreach_component_info_p(void);
+extern int ITc_component_manager_foreach_component_context_p(void);
+extern int ITc_component_manager_create_destroy_p(void);
+extern int ITc_component_manager_info_get_app_id_p(void);
+extern int ITc_component_manager_info_get_component_id_p(void);
+extern int ITc_component_manager_info_get_component_type_p(void);
+extern int ITc_component_manager_info_get_icon_p(void);
+extern int ITc_component_manager_info_get_localized_label_p(void);
+extern int ITc_component_manager_info_clone_p(void);
+extern int ITc_component_manager_info_is_icon_display_p(void);
+extern int ITc_component_manager_info_is_managed_by_task_manager_p(void);
+extern int ITc_component_manager_context_clone_p(void);
+extern int ITc_component_manager_component_context_get_app_id_p(void);
+extern int ITc_component_manager_component_context_get_component_id_p(void);
+extern int ITc_component_manager_component_context_get_component_state_p(void);
+extern int ITc_component_manager_component_context_get_instance_id_p(void);
+extern int ITc_component_manager_component_context_is_terminated_p(void);
+extern int ITc_component_manager_component_context_is_subcomponent_p(void);
+
+
+testcase tc_array[] = {
+       {"ITc_component_manager_is_running_p",ITc_component_manager_is_running_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_get_component_info_p",ITc_component_manager_get_component_info_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_get_component_context_p",ITc_component_manager_get_component_context_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_resume_component_p",ITc_component_manager_resume_component_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_terminate_bg_component_p",ITc_component_manager_terminate_bg_component_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_foreach_component_info_p",ITc_component_manager_foreach_component_info_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_foreach_component_context_p",ITc_component_manager_foreach_component_context_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_create_destroy_p",ITc_component_manager_create_destroy_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_app_id_p",ITc_component_manager_info_get_app_id_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_component_id_p",ITc_component_manager_info_get_component_id_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_component_type_p",ITc_component_manager_info_get_component_type_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_icon_p",ITc_component_manager_info_get_icon_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_localized_label_p",ITc_component_manager_info_get_localized_label_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_clone_p",ITc_component_manager_info_clone_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_is_icon_display_p",ITc_component_manager_info_is_icon_display_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_is_managed_by_task_manager_p",ITc_component_manager_info_is_managed_by_task_manager_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_context_clone_p",ITc_component_manager_context_clone_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_app_id_p",ITc_component_manager_component_context_get_app_id_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_component_id_p",ITc_component_manager_context_clone_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_component_state_p",ITc_component_manager_component_context_get_component_state_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_instance_id_p",ITc_component_manager_component_context_get_instance_id_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_is_terminated_p",ITc_component_manager_component_context_is_terminated_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_is_subcomponent_p",ITc_component_manager_component_context_is_subcomponent_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {NULL, NULL}
+};
+
+#endif // __TCT_COMPONENT_MANAGER-NATIVE_H__
diff --git a/src/itc/component-manager/tct-component-manager-native_tizeniot.h b/src/itc/component-manager/tct-component-manager-native_tizeniot.h
new file mode 100755 (executable)
index 0000000..51506c8
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// 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 ITs_component_manager_startup(void);
+extern void ITs_component_manager_cleanup(void);
+extern void ITs_component_manager_info_startup(void);
+extern void ITs_component_manager_info_cleanup(void);
+extern void ITs_component_manager_context_startup(void);
+extern void ITs_component_manager_context_cleanup(void);
+
+
+extern int ITc_component_manager_is_running_p(void);
+extern int ITc_component_manager_get_component_info_p(void);
+extern int ITc_component_manager_get_component_context_p(void);
+extern int ITc_component_manager_resume_component_p(void);
+extern int ITc_component_manager_terminate_bg_component_p(void);
+extern int ITc_component_manager_foreach_component_info_p(void);
+extern int ITc_component_manager_foreach_component_context_p(void);
+extern int ITc_component_manager_create_destroy_p(void);
+extern int ITc_component_manager_info_get_app_id_p(void);
+extern int ITc_component_manager_info_get_component_id_p(void);
+extern int ITc_component_manager_info_get_component_type_p(void);
+extern int ITc_component_manager_info_get_icon_p(void);
+extern int ITc_component_manager_info_get_localized_label_p(void);
+extern int ITc_component_manager_info_clone_p(void);
+extern int ITc_component_manager_info_is_icon_display_p(void);
+extern int ITc_component_manager_info_is_managed_by_task_manager_p(void);
+extern int ITc_component_manager_context_clone_p(void);
+extern int ITc_component_manager_component_context_get_app_id_p(void);
+extern int ITc_component_manager_component_context_get_component_id_p(void);
+extern int ITc_component_manager_component_context_get_component_state_p(void);
+extern int ITc_component_manager_component_context_get_instance_id_p(void);
+extern int ITc_component_manager_component_context_is_terminated_p(void);
+extern int ITc_component_manager_component_context_is_subcomponent_p(void);
+
+
+testcase tc_array[] = {
+       {"ITc_component_manager_is_running_p",ITc_component_manager_is_running_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_get_component_info_p",ITc_component_manager_get_component_info_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_get_component_context_p",ITc_component_manager_get_component_context_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_resume_component_p",ITc_component_manager_resume_component_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_terminate_bg_component_p",ITc_component_manager_terminate_bg_component_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_foreach_component_info_p",ITc_component_manager_foreach_component_info_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_foreach_component_context_p",ITc_component_manager_foreach_component_context_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_create_destroy_p",ITc_component_manager_create_destroy_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_app_id_p",ITc_component_manager_info_get_app_id_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_component_id_p",ITc_component_manager_info_get_component_id_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_component_type_p",ITc_component_manager_info_get_component_type_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_icon_p",ITc_component_manager_info_get_icon_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_localized_label_p",ITc_component_manager_info_get_localized_label_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_clone_p",ITc_component_manager_info_clone_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_is_icon_display_p",ITc_component_manager_info_is_icon_display_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_is_managed_by_task_manager_p",ITc_component_manager_info_is_managed_by_task_manager_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_context_clone_p",ITc_component_manager_context_clone_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_app_id_p",ITc_component_manager_component_context_get_app_id_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_component_id_p",ITc_component_manager_context_clone_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_component_state_p",ITc_component_manager_component_context_get_component_state_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_instance_id_p",ITc_component_manager_component_context_get_instance_id_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_is_terminated_p",ITc_component_manager_component_context_is_terminated_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_is_subcomponent_p",ITc_component_manager_component_context_is_subcomponent_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {NULL, NULL}
+};
+
+#endif // __TCT_COMPONENT_MANAGER-NATIVE_H__
diff --git a/src/itc/component-manager/tct-component-manager-native_wearable.h b/src/itc/component-manager/tct-component-manager-native_wearable.h
new file mode 100755 (executable)
index 0000000..51506c8
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// 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 ITs_component_manager_startup(void);
+extern void ITs_component_manager_cleanup(void);
+extern void ITs_component_manager_info_startup(void);
+extern void ITs_component_manager_info_cleanup(void);
+extern void ITs_component_manager_context_startup(void);
+extern void ITs_component_manager_context_cleanup(void);
+
+
+extern int ITc_component_manager_is_running_p(void);
+extern int ITc_component_manager_get_component_info_p(void);
+extern int ITc_component_manager_get_component_context_p(void);
+extern int ITc_component_manager_resume_component_p(void);
+extern int ITc_component_manager_terminate_bg_component_p(void);
+extern int ITc_component_manager_foreach_component_info_p(void);
+extern int ITc_component_manager_foreach_component_context_p(void);
+extern int ITc_component_manager_create_destroy_p(void);
+extern int ITc_component_manager_info_get_app_id_p(void);
+extern int ITc_component_manager_info_get_component_id_p(void);
+extern int ITc_component_manager_info_get_component_type_p(void);
+extern int ITc_component_manager_info_get_icon_p(void);
+extern int ITc_component_manager_info_get_localized_label_p(void);
+extern int ITc_component_manager_info_clone_p(void);
+extern int ITc_component_manager_info_is_icon_display_p(void);
+extern int ITc_component_manager_info_is_managed_by_task_manager_p(void);
+extern int ITc_component_manager_context_clone_p(void);
+extern int ITc_component_manager_component_context_get_app_id_p(void);
+extern int ITc_component_manager_component_context_get_component_id_p(void);
+extern int ITc_component_manager_component_context_get_component_state_p(void);
+extern int ITc_component_manager_component_context_get_instance_id_p(void);
+extern int ITc_component_manager_component_context_is_terminated_p(void);
+extern int ITc_component_manager_component_context_is_subcomponent_p(void);
+
+
+testcase tc_array[] = {
+       {"ITc_component_manager_is_running_p",ITc_component_manager_is_running_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_get_component_info_p",ITc_component_manager_get_component_info_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_get_component_context_p",ITc_component_manager_get_component_context_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_resume_component_p",ITc_component_manager_resume_component_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_terminate_bg_component_p",ITc_component_manager_terminate_bg_component_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_foreach_component_info_p",ITc_component_manager_foreach_component_info_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_foreach_component_context_p",ITc_component_manager_foreach_component_context_p,ITs_component_manager_startup,ITs_component_manager_cleanup},
+       {"ITc_component_manager_create_destroy_p",ITc_component_manager_create_destroy_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_app_id_p",ITc_component_manager_info_get_app_id_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_component_id_p",ITc_component_manager_info_get_component_id_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_component_type_p",ITc_component_manager_info_get_component_type_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_icon_p",ITc_component_manager_info_get_icon_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_get_localized_label_p",ITc_component_manager_info_get_localized_label_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_clone_p",ITc_component_manager_info_clone_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_is_icon_display_p",ITc_component_manager_info_is_icon_display_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_info_is_managed_by_task_manager_p",ITc_component_manager_info_is_managed_by_task_manager_p,ITs_component_manager_info_startup,ITs_component_manager_info_cleanup},
+       {"ITc_component_manager_context_clone_p",ITc_component_manager_context_clone_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_app_id_p",ITc_component_manager_component_context_get_app_id_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_component_id_p",ITc_component_manager_context_clone_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_component_state_p",ITc_component_manager_component_context_get_component_state_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_get_instance_id_p",ITc_component_manager_component_context_get_instance_id_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_is_terminated_p",ITc_component_manager_component_context_is_terminated_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {"ITc_component_manager_component_context_is_subcomponent_p",ITc_component_manager_component_context_is_subcomponent_p,ITs_component_manager_context_startup,ITs_component_manager_context_cleanup},
+       {NULL, NULL}
+};
+
+#endif // __TCT_COMPONENT_MANAGER-NATIVE_H__