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 __RUA_INFO_H__
18 #define __RUA_INFO_H__
21 #include <sys/types.h>
23 #include <rua_types.h>
30 * @brief The RUA information handle.
33 typedef struct rua_info_s *rua_info_h;
36 * @brief Gets the ID of the application.
38 * @remarks You should release @a app_id using free().
40 * @param[in] info The RUA information handle
41 * @param[out] app_id The application ID
42 * @return @c 0 on success,
43 * otherwise a negative error value
45 * @see rua_info_foreach()
46 * @see rua_info_usr_foreach()
48 int rua_info_get_app_id(rua_info_h info, char **app_id);
51 * @brief Gets the path of the application.
53 * @remarks You should release @a app_path using free().
55 * @param[in] info The RUA information handle
56 * @param[out] app_path The application path
57 * @return @c 0 on success,
58 * otherwise a negative error value
60 * @see rua_info_foreach()
61 * @see rua_info_usr_foreach()
63 int rua_info_get_app_path(rua_info_h info, char **app_path);
66 * @brief Gets the arguments of the application.
68 * @remarks You should release @a args using free().
70 * @param[in] info The RUA information handle
71 * @param[out] args The arguments
72 * @return @c 0 on success,
73 * otherwise a negative error value
75 * @see rua_info_foreach()
76 * @see rua_info_usr_foreach()
78 int rua_info_get_args(rua_info_h info, char **args);
81 * @brief Gets the launch time of the application.
84 * @param[in] info The RUA information handle
85 * @param[out] launch_time The launch time
86 * @return @c 0 on success,
87 * otherwise a negative error value
89 * @see rua_info_foreach()
90 * @see rua_info_usr_foreach()
92 int rua_info_get_launch_time(rua_info_h info, time_t *launch_time);
95 * @brief Gets the instance ID of the application.
96 * @details The function returns RUA_ERROR_NONE, event if @a instance_id is null.
98 * @remarks You should release @a instance_id using free().
100 * @param[in] info The RUA information handle
101 * @param[out] instance_id The instance ID
102 * @return @c 0 on success,
103 * otherwise a negative error value
105 * @see rua_info_foreach()
106 * @see rua_info_usr_foreach()
108 int rua_info_get_instance_id(rua_info_h info, char **instance_id);
111 * @brief Gets the instance name of the application.
112 * @details The function returns RUA_ERROR_NONE, event if @a instance_name is null.
114 * @remarks You should release @a instance_name using free().
116 * @param[in] info The RUA information handle
117 * @param[out] instance_name The instance name
118 * @return @c 0 on success,
119 * otherwise a negative error value
121 * @see rua_info_foreach()
122 * @see rua_info_usr_foreach()
124 int rua_info_get_instance_name(rua_info_h info, char **instance_name);
127 * @brief Gets the icon path of the application.
128 * @details The function returns RUA_ERROR_NONE, event if @a icon is null.
131 * @privilege %http://tizen.org/privilege/packagemanager.info
132 * @remarks You should release @a icon using free().
134 * @param[in] info The RUA information handle
135 * @param[out] icon The icon path
136 * @return @c 0 on success,
137 * otherwise a negative error value
139 * @see rua_info_foreach()
140 * @see rua_info_usr_foreach()
142 int rua_info_get_icon(rua_info_h info, char **icon);
145 * @brief Gets the URI of the application.
146 * @details The function returns RUA_ERROR_NONE, event if @a uri is null.
148 * @remarks You should release @a uri using free().
150 * @param[in] info The RUA information handle
151 * @param[out] uri The URI
152 * @return @c 0 on success,
153 * otherwise a negative error value
155 * @see rua_info_foreach()
156 * @see rua_info_usr_foreach()
158 int rua_info_get_uri(rua_info_h info, char **uri);
161 * @brief Gets the image path of the application.
162 * @details The function returns RUA_ERROR_NONE, event if @a image is null.
164 * @remarks You should release @a image using free().
166 * @param[in] info The RUA information handle
167 * @param[out] image The image path
168 * @return @c 0 on success,
169 * otherwise a negative error value
171 * @see rua_info_foreach()
172 * @see rua_info_usr_foreach()
174 int rua_info_get_image(rua_info_h info, char **image);
177 * @brief Gets the component ID of the application.
178 * @details The function returns RUA_ERROR_NONE, event if @a component_id is null.
180 * @remarks You should release @a component_id using free().
182 * @param[in] info The RUA information handle
183 * @param[out] component_id The component ID
184 * @return @c 0 on success,
185 * otherwise a negative error value
187 * @see rua_info_foreach()
188 * @see rua_info_usr_foreach()
190 int rua_info_get_component_id(rua_info_h info, char **component_id);
193 * @brief Checks whether the application should be managed by task-manager or not.
196 * @param[in] info The RUA information handle
197 * @param[out] managed @c true if the application should be managed by task-manager, \n
199 * @return @c 0 on success,
200 * otherwise a negative error value
202 * @see rua_info_foreach()
203 * @see rua_info_usr_forach()
205 int rua_info_is_managed_by_task_manager(rua_info_h info, bool *managed);
208 * @brief Gets the label.
209 * @details The function returns RUA_ERROR_NONE, event if @a label is null.
211 * @remarks You should release @a label using free().
213 * @param[in] info The RUA information handle
214 * @param[out] label The label
215 * @return @c 0 on success,
216 * otherwise a negative error value
218 * @see rua_info_foreach()
219 * @see rua_info_usr_foreach()
221 int rua_info_get_label(rua_info_h info, char **label);
224 * @brief Destroyes the RUA information handle.
227 * @param[in] info The RUA information handle
228 * @return @c 0 on success,
229 * otherwise a negative error value
231 int rua_info_destroy(rua_info_h info);
234 * @brief Creates and returns a copy of the given RUA information handle.
236 * @remarks You should release @a clone using rua_info_destroy().
238 * @param[in] info The RUA information handle
239 * @param[out] clone If successful, a newly created RUA information handle will be returned
240 * @return @c 0 on success,
241 * otherwise a negative error value
243 * @see rua_info_destroy()
245 int rua_info_clone(rua_info_h info, rua_info_h *clone);
251 #endif /*__RUA_INFO_H__*/