2 * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __AUL_APP_GROUP_H__
18 #define __AUL_APP_GROUP_H__
21 #include <sys/types.h>
29 * @brief The AUL application group information handle.
32 typedef struct aul_app_group_info_s *aul_app_group_info_h;
37 * @remarks You should not release @a appid by using free().
39 * @param[in] h The app group info handle
40 * @param[out] id The ID
41 * @return @c 0 on success,
42 * otherwise a negative error value
44 * @remarks This function is only for App Framework internally.
46 int aul_app_group_info_get_id(aul_app_group_info_h h, const char **id);
49 * @brief Gets the process ID.
52 * @param[in] h The app group info handle
53 * @param[out] pid The process ID
54 * @return @c 0 on success,
55 * otherwise a negative error value
57 * @remarks This function is only for App Framework internally.
59 int aul_app_group_info_get_pid(aul_app_group_info_h h, pid_t *pid);
62 * @brief Gets the application ID.
64 * @remarks You should not release @a appid by using free().
66 * @param[in] h The app group info handle
67 * @param[out] appid The application ID
68 * @return @c 0 on success,
69 * otherwise a negative error value
71 * @remarks This function is only for App Framework internally.
73 int aul_app_group_info_get_appid(aul_app_group_info_h h, const char **appid);
76 * @brief Gets the package ID.
78 * @remarks You should not release @a appid by using free().
80 * @param[in] h The app group info handle
81 * @param[out] pkgid The package ID
82 * @return @c 0 on success,
83 * otherwise a negative error value
85 * @remarks This function is only for App Framework internally.
87 int aul_app_group_info_get_pkgid(aul_app_group_info_h h, const char **pkgid);
90 * @brief Gets the window ID.
93 * @param[in] h The app group info handle
94 * @param[out] wid The window ID
95 * @return @c 0 on success,
96 * otherwise a negative error value
98 * @remarks This function is only for App Framework internally.
100 int aul_app_group_info_get_window(aul_app_group_info_h h, int *wid);
103 * @brief Gets the flag that the group is running foreground.
106 * @param[in] h The app group info handle
107 * @param[out] fg_flag The flag of the foreground
108 * @return @c 0 on success,
109 * otherwise a negative error value
111 * @remarks This function is only for App Framework internally.
113 int aul_app_group_info_get_fg_flag(aul_app_group_info_h h, bool *fg_flag);
116 * @brief Gets the status of the instance.
119 * @param[in] h The app group info handle
120 * @param[out] status The status
121 * @return @c 0 on success,
122 * otherwise a negative error value
124 * @remarks This function is only for App Framework internally.
126 int aul_app_group_info_get_status(aul_app_group_info_h h, int *status);
129 * @brief Retrieves the leader instances.
132 * @param[in] callback The callback function
133 * @param[in] user_data The user data to be passed the callback function
134 * @return @c 0 on success,
135 * otherwise a negative error value
137 * @remarks This function is only for App Framework internally.
139 int aul_app_group_foreach_leader_ids(void (*callback)(const char *, void *),
143 * @brief Retrieves the group instances.
146 * @param[in] leader_id The leader ID of the app group.
147 * @param[in] callback The callback function
148 * @param[in] user_data The user data to be passed the callback function
149 * @return @c 0 on success,
150 * otherwise a negative error value
152 * @remarks This function is only for App Framework internally.
154 int aul_app_group_foreach_group_info(const char *leader_id,
155 void (*callback)(aul_app_group_info_h, void *),
159 * @brief Retrieves the idle instances.
162 * @param[in] callback The callback function
163 * @param[in] user_data The user data to be passed the callback function
164 * @return @c 0 on success,
165 * otherwise a negative error value
167 * @remarks This function is only for App Framework internally.
169 int aul_app_group_foreach_idle_info(
170 void (*callback)(aul_app_group_info_h, void *),
174 * @brief Sets the window.
177 * @param[in] id The instance ID
178 * @param[in] wid The window(surface) ID
179 * @return @c 0 on success,
180 * otherwise a negative error value
182 * @remarks This function is only for App Framework internally.
184 int aul_app_group_set_window_v2(const char *id, int wid);
187 * @brief Lowers the window.
190 * @param[in] id The instance ID
191 * @param[out] exit The flag if it's 'true', the instance should be terminated
192 * @return @c 0 on success,
193 * otherwise a negative error value
195 * @remarks This function is only for App Framework internally.
197 int aul_app_group_lower_v2(const char *id, bool *exit);
203 #endif /* __AUL_APP_GROUP_H__ */