+#define WORKER_PKG_MGR "org.tizen.package-manager-worker"
+#define WORKER_INFO_SYS "org.tizen.ttsd-worker-system"
+#define WORKER_INFO_TASK "org.tizen.task-worker"
+
+int __worker_launch_info(ttd_cmd_data *c_data)
+{
+ app_control_h ac_h = NULL;
+ int ac_ret = APP_CONTROL_ERROR_NONE;
+ int ret = 0;
+ const char *cmd_id = NULL;
+ const char *app_id = NULL;
+
+ cmd_id = ttd_cmd_get_id(c_data);
+
+ switch (ttd_cmd_get_command(c_data)) {
+ case TTD_CMD_INFO_GET_SYSINFO:
+ app_id = WORKER_INFO_SYS;
+ break;
+ case TTD_CMD_INFO_GET_TASKINFO:
+ app_id = WORKER_INFO_TASK;
+ break;
+ case TTD_CMD_INFO_GET_MAX:
+ default:
+ return -1;
+ break;
+ }
+
+ ac_ret = app_control_create(&ac_h);
+ if (ac_ret != APP_CONTROL_ERROR_NONE) {
+ ret = -1;
+ goto FREE_N_RETURN;
+ }
+ app_control_set_operation(ac_h, APP_CONTROL_OPERATION_DEFAULT);
+ app_control_set_app_id(ac_h, app_id);
+
+ if (cmd_id)
+ app_control_add_extra_data(ac_h, "id", cmd_id);
+
+ ac_ret = app_control_send_launch_request(ac_h, NULL, NULL);
+ if (ac_ret != APP_CONTROL_ERROR_NONE) {
+ ret = -1;
+ goto FREE_N_RETURN;
+ }
+
+FREE_N_RETURN:
+ if (ac_h)
+ app_control_destroy(ac_h);
+
+ return ret;
+}
+
+int __worker_launch_pkgmgr(ttd_cmd_data *c_data)
+{
+ app_control_h ac_h = NULL;
+ int ac_ret = APP_CONTROL_ERROR_NONE;
+ const char *op = NULL;
+ char *extra = NULL;
+ unsigned int length = 0;
+ const char *cmd_id = NULL;
+ int ret = 0;
+
+ cmd_id = ttd_cmd_get_id(c_data);
+
+ switch (ttd_cmd_get_command(c_data)) {
+ case TTD_CMD_PACKAGE_INSTALL:
+ op = "install";
+ ttd_cmd_get_data(c_data, (void *)&extra, &length);
+ break;
+ case TTD_CMD_PACKAGE_REMOVE:
+ op = "uninstall";
+ break;
+ case TTD_CMD_PACKAGE_GET_APP_LIST:
+ op = "application";
+ break;
+ case TTD_CMD_PACKAGE_GET_PACKAGE_LIST:
+ op = "package";
+ break;
+ case TTD_CMD_PACKAGE_MAX:
+ default:
+ _E("unknown command - %d", ttd_cmd_get_command(c_data));
+ return -1;
+ }
+
+ ac_ret = app_control_create(&ac_h);
+ if (ac_ret != APP_CONTROL_ERROR_NONE) {
+ ret = -1;
+ goto FREE_N_RETURN;
+ }
+ app_control_set_operation(ac_h, APP_CONTROL_OPERATION_DEFAULT);
+ app_control_set_app_id(ac_h, WORKER_PKG_MGR);
+ app_control_add_extra_data(ac_h, "operation", op);
+
+ if (cmd_id)
+ app_control_add_extra_data(ac_h, "id", cmd_id);
+
+ if (extra)
+ app_control_add_extra_data(ac_h, "meta", extra);
+
+ ac_ret = app_control_send_launch_request(ac_h, NULL, NULL);
+ if (ac_ret != APP_CONTROL_ERROR_NONE) {
+ ret = -1;
+ goto FREE_N_RETURN;
+ }
+
+FREE_N_RETURN:
+ if (ac_h)
+ app_control_destroy(ac_h);
+
+ if (extra)
+ g_free(extra);
+
+ return ret;
+}
+
+int ttd_worker_launch(ttd_cmd_data *cmd_data)