/**
* @remarks This function is only for App Framework internally.
*/
-int aul_unset_auto_restart();
+int aul_unset_auto_restart(void);
/**
* @remarks This function is only for App Framework internally.
*/
int aul_package_pre_event_send(uid_t uid, bundle *b);
+/**
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_launch_worker_init(void);
+
+/**
+ * @remarks This function is only for App Framework internally.
+ */
+void aul_launch_worker_fini(void);
+
#ifdef __cplusplus
}
#endif
__context.touch_argv_handler = false;
- if (__context.worker) {
- aul_worker_destroy(__context.worker);
- __context.worker = NULL;
- }
+ aul_launch_worker_fini();
if (__context.tizen_context) {
g_main_context_unref(__context.tizen_context);
else
__context.tizen_context = NULL;
- __context.worker = aul_worker_create("aul+");
- if (!__context.worker) {
+ if (aul_launch_worker_init() != AUL_R_OK) {
__finalize_context();
return AUL_R_ERROR;
}
return AUL_R_OK;
}
+API int aul_launch_worker_init(void)
+{
+ if (__context.worker != NULL)
+ return AUL_R_OK;
+
+ __context.worker = aul_worker_create("aul+");
+ if (__context.worker == NULL)
+ return AUL_R_ERROR;
+
+ return AUL_R_OK;
+}
+
+API void aul_launch_worker_fini(void)
+{
+ if (__context.worker == NULL)
+ return;
+
+ aul_worker_destroy(__context.worker);
+ __context.worker = NULL;
+}
+
API int aul_launch_init(aul_handler_fn callback, void *user_data)
{
int ret;