*/
int aul_get_default_app(bundle *b, char **appid);
+/**
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_set_auto_restart(bundle *b);
+
+/**
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_unset_auto_restart();
+
#ifdef __cplusplus
}
#endif
* @since_tizen 6.5
*/
#define AUL_K_PROC_EXTRA "__AUL_PROC_EXTRA__"
+
+/**
+ * @brief Definition for AUL: The flag of the auto restart.
+ * @since_tizen 7.0
+ */
+#define AUL_K_AUTO_RESTART "__AUL_AUTO_RESTART__"
+
+/**
+ * @brief Definition for AUL: The bundle data for auto restart.
+ * @since_tizen 7.0
+ */
+#define AUL_K_RESTART_EXTRA "__AUL_RESTART_EXTRA__"
return AUL_R_OK;
}
+API int aul_set_auto_restart(bundle *b)
+{
+ int ret;
+ bundle *kb;
+ bundle_raw *raw;
+ int len;
+
+ kb = bundle_create();
+ if (!kb) {
+ _E("Out of memory");
+ return AUL_R_ENOMEM;
+ }
+
+ bundle_add(kb, AUL_K_AUTO_RESTART, "true");
+ if (b) {
+ ret = bundle_encode(b, &raw, &len);
+ if (ret != BUNDLE_ERROR_NONE) {
+ bundle_free(kb);
+ return AUL_R_EINVAL;
+ }
+
+ bundle_add(b, AUL_K_RESTART_EXTRA, (const char *)raw);
+ bundle_free_encoded_rawdata(&raw);
+ }
+ ret = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
+ APP_SET_AUTO_RESTART, kb, AUL_SOCK_NONE);
+ bundle_free(kb);
+ if (ret != AUL_R_OK)
+ return aul_error_convert(ret);
+
+ return AUL_R_OK;
+}
+
+API int aul_unset_auto_restart()
+{
+ int ret;
+ bundle *kb;
+
+ kb = bundle_create();
+ if (kb == NULL) {
+ _E("out of memory");
+ return AUL_R_ERROR;
+ }
+
+ bundle_add(kb, AUL_K_AUTO_RESTART, "false");
+
+ ret = aul_sock_send_bundle(AUL_UTIL_PID, getuid(),
+ APP_SET_AUTO_RESTART, kb, AUL_SOCK_NONE);
+ bundle_free(kb);
+ if (ret != AUL_R_OK)
+ return aul_error_convert(ret);
+
+ return AUL_R_OK;
+}
+
API int aul_enable_alias_info(const char *appid)
{
int ret;