/*
* This API is only for Appfw internally.
*/
-void aul_app_group_add(int leader_pid, int pid, int wid);
-
-/*
- * This API is only for Appfw internally.
- */
-void aul_app_group_remove(int pid);
-
-/*
- * This API is only for Appfw internally.
- */
-void aul_app_group_attach_window(int parent_wid, int child_wid);
-
-/*
- * This API is only for Appfw internally.
- */
-void aul_app_group_detach_window(int child_wid);
-
-/*
- * This API is only for Appfw internally.
- */
-int aul_app_group_get_window(int pid);
-
-/*
- * This API is only for Appfw internally.
- */
int aul_app_group_get_window(int pid);
/*
*/
void aul_app_group_get_idle_pids(int *cnt, int **pids);
+/**
+ * @par Description:
+ * This API puts some app below the caller app
+ * @par Purpose:
+ * This API's purpose is to reorder window stack limitedly.
+ *
+ * @param[in] below_appid The appid to be reordered below the caller app
+ * @return Loader ID if success, negative value(<0) if fail
+ *
+ * @remark
+ * The caller app should be resumed before calling this API.
+ * below_appid should be main app which have been launched before.
+ * This API is only available in User Session.
+*/
+int aul_app_group_activate_below(const char *below_appid);
+
/*
* This API is only for Appfw internally.
*/
APP_GROUP_GET_IDLE_PIDS,
APP_GROUP_LOWER,
APP_GROUP_CLEAR_TOP,
+ APP_GROUP_ACTIVATE_BELOW,
APP_GET_STATUS,
APP_ADD_LOADER,
APP_REMOVE_LOADER,
#define AUL_SVC_K_REROUTE "__K_REROUTE__"
#define AUL_SVC_K_SHIFT_WINDOW "__K_SHIFT_WINDOW"
#define AUL_SVC_K_RECYCLE "__K_RECYCLE"
+#define AUL_SVC_K_RELOCATE_BELOW "__K_RELOCATE_BELOW"
#define PAD_LOADER_ID_DIRECT 1
char buf[128];
b = bundle_create();
+ if (b == NULL) {
+ _E("out of memory");
+ return -1;
+ }
+
snprintf(buf, 128, "%d", pid);
bundle_add_str(b, AUL_K_PID, buf);
ret = app_send_cmd(AUL_UTIL_PID, APP_GROUP_GET_WINDOW, b);
char buf[128];
b = bundle_create();
+
+ if (b == NULL) {
+ _E("out of memory");
+ return -1;
+ }
+
snprintf(buf, 128, "%d", wid);
bundle_add_str(b, AUL_K_WID, buf);
ret = app_send_cmd(AUL_UTIL_PID, APP_GROUP_SET_WINDOW, b);
char buf[128];
b = bundle_create();
+
+ if (b == NULL) {
+ _E("out of memory");
+ return -1;
+ }
+
snprintf(buf, 128, "%d", pid);
bundle_add_str(b, AUL_K_PID, buf);
ret = app_send_cmd(AUL_UTIL_PID, APP_GROUP_GET_LEADER_PID, b);
char buf[128];
b = bundle_create();
+
+ if (b == NULL) {
+ _E("out of memory");
+ return -1;
+ }
+
snprintf(buf, 128, "%d", pid);
bundle_add_str(b, AUL_K_PID, buf);
ret = app_send_cmd(AUL_UTIL_PID, APP_GROUP_GET_FG, b);
free(pkt);
}
+API int aul_app_group_activate_below(const char *below_appid)
+{
+ int ret;
+ bundle *b;
+
+ if (below_appid == NULL)
+ return -1;
+
+ b = bundle_create();
+
+ if (b == NULL) {
+ _E("out of memory");
+ return -1;
+ }
+
+ bundle_add_str(b, AUL_K_APPID, below_appid);
+ ret = app_send_cmd(AUL_UTIL_PID, APP_GROUP_ACTIVATE_BELOW, b);
+ bundle_free(b);
+
+ return ret;
+}
+
+