4 * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
24 #include <sys/types.h>
31 * @brief Return values in AUL.
33 typedef enum _aul_return_val {
34 AUL_R_EREJECTED = -14, /**< App disable for mode */
35 AUL_R_ENOAPP = -13, /**< Failed to find app ID or pkg ID */
36 AUL_R_EHIDDENFORGUEST = -11, /**< App hidden for guest mode */
37 AUL_R_ENOLAUNCHPAD = -10, /**< no launchpad */
38 AUL_R_ETERMINATING = -9, /**< application terminating */
39 AUL_R_EILLACC = -8, /**< Illegal Access */
40 AUL_R_LOCAL = -7, /**< Launch by himself */
41 AUL_R_ETIMEOUT = -6, /**< Timeout */
42 AUL_R_ECANCELED = -5, /**< Operation canceled */
43 AUL_R_EINVAL = -4, /**< Invalid argument */
44 AUL_R_ECOMM = -3, /**< Comunication Error */
45 AUL_R_ENOINIT = -2, /**< AUL handler NOT initialized */
46 AUL_R_ERROR = -1, /**< General error */
47 AUL_R_OK = 0 /**< General success */
62 typedef enum _aul_type{
70 /** AUL public key - To check caller's secuirty */
71 #define AUL_K_CALLER_PID "__AUL_CALLER_PID__"
72 /** AUL public key - To check callee's secuirty */
73 #define AUL_K_CALLEE_PID "__AUL_CALLEE_PID__"
74 /** AUL public key - added for multiuser mode */
75 #define AUL_K_CALLER_UID "__AUL_CALLER_UID__"
76 /** AUL public key - added for multiuser mode */
77 #define AUL_K_CALLEE_UID "__AUL_CALLEE_UID__"
78 /** AUL public key - added for multiuser mode */
79 #define AUL_K_TARGET_UID "__AUL_TARGET_UID__"
80 /** AUL public key - To check caller's secuirty */
81 #define AUL_K_CALLER_APPID "__AUL_CALLER_APPID__"
82 /** AUL public key - To check caller's secuirty */
83 #define AUL_K_CALLEE_APPID "__AUL_CALLEE_APPID__"
84 /** AUL public key - To find argv0 */
85 #define AUL_K_ARGV0 "__AUL_ARGV0__"
86 /** AUL public key - To measure launching time */
87 #define AUL_K_STARTTIME "__AUL_STARTTIME__"
88 /** AUL public key - To support launching based on mime type */
89 #define AUL_K_MIME_TYPE "__AUL_MIME_TYPE__"
90 /** AUL public key - To support launching based on mime type */
91 #define AUL_K_UNALIASED_MIME_TYPE "__AUL_UNALIASED_MIME_TYPE__"
92 /** AUL public key - To support launching based on mime type */
93 #define AUL_K_MIME_CONTENT "__AUL_MIME_CONTENT__"
94 /** AUL public key - To support launching based on service */
95 #define AUL_K_SERVICE_NAME "__AUL_SERVICE_NAME__"
96 /** AUL public key - To force launch app selector instead of lauchingn default app */
97 #define AUL_K_FORCE_LAUNCH_APP_SELECTOR "__AUL_FORCE_LAUNCH_APP_SELECTOR__"
98 /** AUL public key - To support debug argument */
99 #define AUL_K_DEBUG "__AUL_DEBUG__"
100 /** AUL public key - To support SDK */
101 #define AUL_K_SDK "__AUL_SDK__"
102 /** AUL public key - To support Media key */
103 #define AUL_K_MULTI_KEY "__AUL_MULTI_KEY__"
104 /** AUL public key - To support Media key */
105 #define AUL_K_MULTI_KEY_EVENT "__AUL_MULTI_KEY_EVENT__"
106 /** AUL public bundle value */
107 #define AUL_K_PRIVACY_APPID "__AUL_PRIVACY_APPID__"
108 /** AUL public bundle value - To support Media key*/
109 #define AUL_V_KEY_PRESSED "__AUL_KEY_PRESSED__"
110 /** AUL public bundle value - To support Media key*/
111 #define AUL_V_KEY_RELEASED "__AUL_KEY_RELEASED__"
112 /** AUL public key - To support rua stat */
113 #define AUL_SVC_K_RUA_STAT_CALLER "__K_RUA_STAT_CALLER__"
114 #define AUL_SVC_K_RUA_STAT_TAG "__K_RUA_STAT_TAG__"
115 /** AUL public key - To support rua delete */
116 #define AUL_K_RUA_PKGNAME "__K_RUA_PKGNAME"
117 /** AUL public key - To support rua delete */
118 #define AUL_K_RUA_APPPATH "__K_RUA_APPPATH"
122 /** AUL internal private key */
123 #define AUL_K_PKG_NAME "__AUL_PKG_NAME__"
124 /** AUL internal private key */
125 #define AUL_K_WAIT_RESULT "__AUL_WAIT_RESULT__"
126 /** AUL internal private key */
127 #define AUL_K_SEND_RESULT "__AUL_SEND_RESULT__"
128 /** AUL internal private key */
129 #define AUL_K_TASK_MANAGE "__AUL_TASK_MANAGE__"
130 /** AUL internal private key */
131 #define AUL_K_APP_TYPE "__AUL_APP_TYPE__"
132 /** AUL internal private key - To check original caller's identity */
133 #define AUL_K_ORG_CALLER_PID "__AUL_ORG_CALLER_PID__"
134 /** AUL internal private key - To check forwarded callee app's pid */
135 #define AUL_K_FWD_CALLEE_PID "__AUL_FWD_CALLEE_PID__"
136 /** AUL internal private key */
137 #define AUL_K_NO_CANCEL "__AUL_NO_CANCEL__"
138 /** AUL internal private key */
139 #define AUL_K_EXEC "__AUL_EXEC__"
140 /** AUL internal private key */
141 #define AUL_K_MULTIPLE "__AUL_MULTIPLE__"
142 /** AUL internal private key */
143 #define AUL_K_PACKAGETYPE "__AUL_PACKAGETYPE__"
144 /** AUL internal private key */
145 #define AUL_K_HWACC "__AUL_HWACC__"
146 /** AUL internal private key */
147 #define AUL_K_APPID "__AUL_APPID__"
148 /** AUL internal private key */
149 #define AUL_K_PID "__AUL_PID__"
150 /** AUL internal private key */
151 #define AUL_K_WID "__AUL_WID__"
152 /** AUL internal private key */
153 #define AUL_K_LEADER_PID "__AUL_LEADER_PID__"
154 /** AUL internal private key - To support data control */
155 #define AUL_K_DATA_CONTROL_TYPE "__AUL_DATA_CONTROL_TYPE__"
156 /** AUL internal private key */
157 #define AUL_K_PKGID "__AUL_PKGID_"
158 /** AUL internal private key */
159 #define AUL_K_INTERNAL_POOL "__AUL_INTERNAL_POOL__"
160 /** AUL internal private key */
161 #define AUL_TEP_PATH "_AUL_TEP_PATH_"
162 /** AUL internal private key */
163 #define AUL_K_COMP_TYPE "__AUL_COMP_TYPE__"
164 /** AUL internal private key */
165 #define AUL_K_LOADER_ID "__AUL_LOADER_ID__"
166 /** AUL internal private key */
167 #define AUL_K_LOADER_PATH "__AUL_LOADER_PATH__"
168 /** AUL internal private key */
169 #define AUL_K_WAYLAND_DISPLAY "__AUL_WAYLAND_DISPLAY__"
170 /** AUL internal private key */
171 #define AUL_K_WAYLAND_WORKING_DIR "__AUL_WAYLAND_WORKING_DIR__"
174 * @brief This is callback function for aul_launch_init
175 * @param[in] type event's type received from system
176 * @param[in] b In case of RESET events, bundle which is received from peer
177 * @param[in] data user-supplied data
179 typedef int (*aul_handler_fn) (aul_type type, bundle * b, void *data);
183 * This API install your AUL handler and setup AUL internal connection.
185 * AUL receive START(RESET), RESUME, TERMINATE events from system.\n
186 * This API use to handle the events. \n
187 * @par Typical use case:
188 * In general, you need not use this API.
189 * If you use AppCore, you should NOT use this API.
190 * AppCore will set default aul_handler.
192 * @param[in] handler aul main callback handler function
193 * @param[in] data user-supplied data for start_handler
194 * @return 0 if success, negative value(<0) if fail\n
195 * @retval AUL_R_OK - success
196 * @retval AUL_R_ECANCELD - aul handler was installed already by others
197 * @retval AUL_R_ECOMM - error to create internal ipc
198 * @retval AUL_R_ERROR - error to attach glib main loop
200 * @warning If you use AppCore, you should NOT use this API.\n
201 * You need glib main loop.\n
203 * you must have aul handler to use this API.
204 * aul_luanch_init register aul handler.
207 * #include <bundle.h>
209 * static int aul_handler(aul_type type, bundle *kb,void *data)
214 * // process RESET event
217 * // process RESUME event
219 * case AUL_TERMINATE:
220 * // preocess TERMINATE event
226 * static GMainLoop *mainloop = NULL;
228 * int main(int argc, char **argv)
230 * aul_launch_init(aul_handler,NULL);
231 * aul_launch_argv_handler(argc, argv);
233 * mainloop = g_main_loop_new(NULL, FALSE);
234 * g_main_loop_run(mainloop);
239 * This API is only available in User Session.
241 int aul_launch_init(aul_handler_fn handler, void *data);
245 * This API create internal RESET events with given argc, argv \n
247 * This API's purpose is to generate reset event.
248 * If you want to generate local RESET events with argument vector format, use this API
249 * @par Typical use case:
250 * In general, you need not use this API.
251 * AppCore use this API to create internal reset event.
253 * @param[in] argc # of args
254 * @param[in] argv list of arg strings
255 * @return 0 if success, negative value(<0) if fail
256 * @retval AUL_R_OK - success
257 * @retval AUL_R_ENOINIT - aul handler was NOT yet installed
258 * @retval AUL_R_ECANCLED - error to create internal bundle with given argc,argv.
259 * @retval AUL_R_ERROR - general error
262 * you must have aul handler to use this API.
263 * aul_luanch_init register aul handler.
268 * #include <bundle.h>
270 * int send_local_reset_event()
274 * argv[0] = "local.app";
275 * argv[1] = "event_type";
276 * argv[2] = "my_reset";
278 * aul_launch_argv_handler(argc,argv);
283 * If you use AppCore, you NEED NOT use this API.
284 * This API is only available in User Session.
286 int aul_launch_argv_handler(int argc, char **argv);
290 * This API creates internal RESET events with given bundle \n
292 * This API's purpose is to generate reset event.
293 * If you want to generate local RESET events with argument vector format, first use
294 * bundle_import_from_argv to create a bundle from the argument vector and then use this API
295 * Eventually, this API will replace aul_launch_argv_handler().
296 * @par Typical use case:
297 * In general, you need not use this API.
298 * AppCore use this API to create internal reset event.
300 * @param[in] b bundle
301 * @return 0 if success, negative value(<0) if fail
302 * @retval AUL_R_OK - success
303 * @retval AUL_R_ENOINIT - aul handler was NOT yet installed
304 * @retval AUL_R_ERROR - general error
307 * you must have aul handler to use this API.
308 * aul_luanch_init register aul handler.
312 * aul_launch_init, bundle_import_from_argv
315 * #include <bundle.h>
317 * int send_local_reset_event()
322 * argv[0] = "local.app";
323 * argv[1] = "event_type";
324 * argv[2] = "my_reset";
327 * b = bundle_import_from_argv(argc,argv);
328 * aul_launch_local(b);
333 * If you use AppCore, you NEED NOT to use this API.
334 * This API is only available in User Session.
336 int aul_launch_local(bundle *b);
340 * This API launches application with the given bundle.
341 * If the application is not running or a multiple-instance one, this API launches with the given bundle.
342 * If the application is running, this API sends a RESET event to the App.
343 * While the application is running, if the application cannot receive the RESET event,
344 * this API returns a general error(AUL_R_ERROR).\n
346 * This API is for caller.
347 * This API's purpose is to launch/reset application with given bundle.
348 * @par Typical use case:
349 * If you know the target application's pkgname and bundle types,
350 * you can use this API to launch/reset the application.
352 * @param[in] pkgname package name to be run as callee
353 * @param[in] kb bundle to be passed to callee
354 * @return callee's pid if success, negative value(<0) if fail
355 * @retval AUL_R_OK - success
356 * @retval AUL_R_EINVAL - invaild package name
357 * @retval AUL_R_ECOM - internal AUL IPC error
358 * @retval AUL_R_ERROR - general error
364 * #include <bundle.h>
366 * int launch_inhouse_contact_app()
369 * b = bundle_create();
370 * bundle_add(b,"type","SIM");
371 * aul_launch_app("org.tizen.contact",b);
376 * This API is only available in User Session.
378 int aul_launch_app(const char *appid, bundle *kb);
382 * This API launches application with the given bundle.
383 * If the application is not running or a multiple-instance one, this API launches with the given bundle.
384 * If the application is running, this API sends a RESET event to the App.
385 * While the application is running, if the application cannot receive the RESET event,
386 * this API returns a general error(AUL_R_ERROR).\n
388 * This API is for caller.
389 * This API's purpose is to launch/reset application with given bundle.
390 * @par Typical use case:
391 * If you know the target application's pkgname and bundle types,
392 * you can use this API to launch/reset the application.
394 * @param[in] pkgname package name to be run as callee
395 * @param[in] kb bundle to be passed to callee
396 * @param[in] uid User ID to launch
397 * @return callee's pid if success, negative value(<0) if fail
398 * @retval AUL_R_OK - success
399 * @retval AUL_R_EINVAL - invaild package name
400 * @retval AUL_R_ECOM - internal AUL IPC error
401 * @retval AUL_R_ERROR - general error
406 * This API is also available in System Session.
408 int aul_launch_app_for_uid(const char *appid, bundle *kb, uid_t uid);
412 * This API launches application, as menu screen launches the app.
413 * Thus, if the applocation is running, this API sends a RESUME event to the app.
414 * If the application is not running, this API launches the app.
415 * While the application is running, if the application cannot receive the RESUME event,
416 * AUL tries to raise the application's default window.
419 * This API is for caller.
420 * This API's purpose is to resume/launch application
421 * @par Typical use case:
422 * If you only want to show application with previous state or default state, Use this API.
424 * @param[in] pkgname package name to be resume as callee
425 * @return callee's pid if success, negative value(<0) if fail
426 * @retval AUL_R_OK - success
427 * @retval AUL_R_EINVAL - invaild package name
428 * @retval AUL_R_ECOM - internal AUL IPC error
429 * @retval AUL_R_ERROR - general error
432 * aul_launch_app, aul_app_is_running, aul_resume_pid
435 * #include <bundle.h>
437 * int open_inhouse_contact_app()
439 * if(aul_app_is_running("org.tizen.contact"))
440 * aul_open_app("org.tizen.contact");
445 * If you don't want to launch the app,
446 * you should check app's running state with aul_app_is_running.
447 * This API will launch the application if the application is not running.
448 * This API is only available in User Session.
450 int aul_open_app(const char *appid);
454 * This API trigger to resume application
455 * If the application is running, this API send a resume event to the App.
456 * If the application is not running, this API returns fail.
457 * Although the application is running, if the application cannot receive resume event,
458 * AUL try to raise the application's default windows.
460 * This API is for caller.
461 * This API's purpose is to send resume event.
462 * @par Typical use case:
463 * If you only want to show application with previous state or default state, Use this API.
465 * @param[in] pkgname package name to be resume as callee
466 * @return callee's pid if success, negative value(<0) if fail
467 * @retval AUL_R_OK - success
468 * @retval AUL_R_EINVAL - invaild package name
469 * @retval AUL_R_ECOM - internal AUL IPC error
470 * @retval AUL_R_ERROR - general error
473 * aul_launch_app, aul_app_is_running, aul_resume_pid
475 * This function will be deprecated. Use aul_open_add() instead.
478 * #include <bundle.h>
480 * int resume_inhouse_contact_app()
482 * if(aul_app_is_running("org.tizen.contact"))
483 * aul_resume_app("org.tizen.contact");
488 * If you don't want to launch the app,
489 * you should check app's running state with aul_app_is_running.
490 * This API will launch the application if the application is not running.
491 * If you want to only resume without launching in multiple instance application model,
492 * you should use aul_resume_pid.
493 * This API is only available in User Session.
495 int aul_resume_app(const char *appid);
499 * This API trigger to resume application
500 * If the application is running, this API send a resume event to the App.
501 * If the application is not running, this API return AUL_R_ERROR.
502 * Although the application is running, if the application cannot receive resume event,
503 * AUL try to raise the application's default windows.
505 * This API is for caller.
506 * This API's purpose is to send resume event.
507 * @par Typical use case:
508 * In multiple application model, If you want to only resume specific application, Use this API
510 * @param[in] pid application's pid to be resumed
511 * @return 0 if success, negative value(<0) if fail
512 * @retval AUL_R_OK - success
513 * @retval AUL_R_EINVAL - invaild pid
514 * @retval AUL_R_ECOM - internal AUL IPC error
515 * @retval AUL_R_ERROR - general error (include application is not running)
516 * @warning This API need to require root or inhouse permisssion \n
517 * If you have not the permission, this API return AUL_R_ERROR. \n
522 * #include <bundle.h>
524 * int iterfunc(const aul_app_info *info, void *data)
526 * if(strcmp(info->pkg_name,"org.tizen.contact")==0)
527 * aul_resume_pid(info->pid);
530 * int iterate_running_apps()
532 * return aul_app_get_running_app_info(iterfunc,NULL);
537 * This API is only available in User Session.
539 int aul_resume_pid(int pid);
543 * This API trigger to terminate application
545 * If the application is running, this API send a terminate event to the App. \n
546 * If the app cannot receive the event, AUL kill forcely the application.\n
548 * This API's purpose is to kill application
549 * @par Typical use case:
550 * In general, Application like Task Manager use this API.
552 * This API need to require root or inhouse permisssion. \n
554 * @param[in] pid application's pid to be terminated
555 * @return 0 if success, negative value(<0) if fail
556 * @retval AUL_R_OK - success
557 * @retval AUL_R_EINVAL - invaild pid
558 * @retval AUL_R_ECOM - internal AUL IPC error
559 * @retval AUL_R_ERROR - general error
560 * @warning This API need to require root or inhouse permisssion. \n
564 * #include <bundle.h>
566 * int iterfunc(const aul_app_info *info, void *data)
568 * if(strcmp(info->pkg_name,"org.tizen.contact")==0)
569 * aul_terminate_pid(info->pid);
572 * int iterate_running_apps()
574 * return aul_app_get_running_app_info(iterfunc,NULL);
579 * If you have not the permission, this API return AUL_R_ERROR. \n
580 * This API is only available in User Session.
582 int aul_terminate_pid(int pid);
586 * This API trigger to terminate application asynchronously
588 * If the application is running, this API send a terminate event to the App. \n
589 * If the app cannot receive the event, AUL kill forcely the application.\n
591 * This API's purpose is to kill application
592 * @par Typical use case:
593 * In general, Application like Task Manager use this API.
595 * This API need to require root or inhouse permisssion. \n
597 * @param[in] pid application's pid to be terminated
598 * @return 0 if success, negative value(<0) if fail
599 * @retval AUL_R_OK - success
600 * @retval AUL_R_EINVAL - invaild pid
601 * @retval AUL_R_ECOM - internal AUL IPC error
602 * @retval AUL_R_ERROR - general error
603 * @warning This API need to require root or inhouse permisssion. \n
605 * If you have not the permission, this API return AUL_R_ERROR. \n
606 * This API is only available in User Session.
608 int aul_terminate_pid_async(int pid);
611 *@brief Running application's information structure retrieved by AUL
613 typedef struct _aul_app_info {
614 int pid; /**< app's pid if running*/
615 char* pkg_name; /**< application id */
616 char* app_path; /**< application excutable path */
621 * @brief iterator function running with aul_app_get_running_app_info
622 * @param[out] ainfo aul_app_info retreived by aul_app_get_running_app_info
623 * @param[out] data user-supplied data
625 typedef int (*aul_app_info_iter_fn)(const aul_app_info *ainfo, void *data);
629 * This API ask a application is running by application package name.
631 * To know whether some application is running or not, use this API
632 * @par Typical use case:
633 * For example, If you want to know browser application running,
634 * you can check it by using this API.
636 * @param[in] pkgname application package name
637 * @return true / false
638 * @retval 1 app_name is running now.
639 * @retval 0 app_name is NOT running now.
644 * int is_running_browser_app()
646 * return aul_app_is_running("org.tizen.browser");
651 * This API is only available in User Session.
654 int aul_app_is_running(const char *appid);
658 * This API ask a application is running by application package name.
660 * To know whether some application is running or not, use this API
661 * @par Typical use case:
662 * For example, If you want to know browser application running,
663 * you can check it by using this API.
665 * @param[in] pkgname application package name
666 * @param[in] uid User ID
667 * @return true / false
668 * @retval 1 app_name is running now.
669 * @retval 0 app_name is NOT running now.
673 * This API is only available in System Session.
675 int aul_app_is_running_for_uid(const char *appid, uid_t uid);
679 * This API use to get running application list.
680 * This API call iter_fn with each aul_app_info of running apps when running application is found.
682 * If you want to get running application list, use this API
683 * This API give you running applications which has SLP desktop file.
684 * @par Typical use case:
685 * In general, this API is used by task manager appllication. (running application list viewer)
687 * @param[in] iter_fn iterator function
688 * @param[in] data user-supplied data for iter_fn
689 * @return 0 if success, negative value(<0) if fail
690 * @retval AUL_R_OK - success
691 * @retval AUL_R_ERROR - internal error
696 * int iterfunc(const aul_app_info* info, void* data)
698 * printf("\t==========================\n");
699 * printf("\t pkg_name: %s\n", info->appid);
700 * printf("\t app_path: %s\n", info->app_path);
701 * printf("\t running pid: %d\n", info->pid);
702 * printf("\t==========================\n");
706 * int iterate_running_apps()
708 * return aul_app_get_running_app_info(iterfunc,NULL);
713 * This API should use if you want to know running application which has desktop files.
714 * If you want to get all process list, you must iterate process information by using proc filesystem
715 * Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs
716 * This API is only available in User Session.
718 int aul_app_get_running_app_info(aul_app_info_iter_fn iter_fn, void *data);
722 * This API get application package name by pid
724 * If you want to get package name of running application, use this API
725 * @par Typical use case:
726 * In general, You can use this API when you want to know caller's information.
728 * @param[in] pid given pid
729 * @param[out] pkgname pkgname to be get
730 * @param[in] len length of pkgname
731 * @return 0 if success, negative value(<0) if fail
732 * @retval AUL_R_OK - success
733 * @retval AUL_R_ERROR - no such a package name
736 * #include <bundle.h>
738 * static int app_reset(bundle *b, void *data)
743 * pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID));
744 * aul_app_get_pkgname_bypid(pid, appname, sizeof(appname));
749 * This API is only available in User Session.
751 int aul_app_get_pkgname_bypid(int pid, char *pkgname, int len);
755 * This API get application pkgid by pid
757 * If you want to get pkgid of running application, use this API
758 * @par Typical use case:
759 * In general, You can use this API when you want to know caller's information.
761 * @param[in] pid given pid
762 * @param[out] pkgid package id
763 * @param[in] len length of pkgid
764 * @return 0 if success, negative value(<0) if fail
765 * @retval AUL_R_OK - success
766 * @retval AUL_R_ERROR - no such a appid
770 * #include <bundle.h>
772 * static int app_reset(bundle *b, void *data)
777 * pid = atoi(bundle_get_val(b, AUL_K_CALLER_PID));
778 * aul_app_get_pkgid_bypid(pid, pkgid, sizeof(pkgid));
783 * This API is only available in User Session.
785 int aul_app_get_pkgid_bypid(int pid, char *pkgid, int len);
789 * This API get application pkgid by pid
791 * If you want to get pkgid of running application, use this API
792 * @par Typical use case:
793 * In general, You can use this API when you want to know caller's information.
795 * @param[in] pid given pid
796 * @param[out] pkgid package id
797 * @param[in] len length of pkgid
798 * @param[in] uid User ID
799 * @return 0 if success, negative value(<0) if fail
800 * @retval AUL_R_OK - success
801 * @retval AUL_R_ERROR - no such a appid
804 * This API is also available in System Session.
806 int aul_app_get_pkgid_bypid_for_uid(int pid, char *pkgid, int len, uid_t uid);
810 * This API get application appid by pid
812 * If you want to get appid of running application, use this API
813 * @par Typical use case:
814 * In general, You can use this API when you want to know caller's information.
816 * @param[in] pid given pid
817 * @param[out] appid application id
818 * @param[in] len length of pkgname
819 * @return 0 if success, negative value(<0) if fail
820 * @retval AUL_R_OK - success
821 * @retval AUL_R_ERROR - no such a appid
824 * #include <bundle.h>
826 * static int app_reset(bundle *b, void *data)
831 * pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID));
832 * aul_app_get_appid_bypid(pid, appid, sizeof(appid));
837 * This API is only available in User Session.
839 int aul_app_get_appid_bypid(int pid, char *appid, int len);
843 * This API get application appid by pid
845 * If you want to get appid of running application, use this API
846 * @par Typical use case:
847 * In general, You can use this API when you want to know caller's information.
849 * @param[in] pid given pid
850 * @param[out] appid application id
851 * @param[in] len length of pkgname
852 * @param[in] uid User ID
853 * @return 0 if success, negative value(<0) if fail
854 * @retval AUL_R_OK - success
855 * @retval AUL_R_ERROR - no such a appid
857 * This API is also available in System Session.
859 int aul_app_get_appid_bypid_for_uid(int pid, char *appid, int len, uid_t uid);
863 * This API launch application associated with given filename
865 * This API is for caller.
866 * This API launch application based on mime type.
867 * This API find mime_type associated with file name,
868 * and then find default app associated with found mime_type
869 * and then launch the app with filename argument.
870 * @par Typical use case:
871 * You can launch application to process given filename.
872 * That is, Even if you don't know the specific application's pkgname,
873 * you can launch the applicaiton processing given filename .
874 * For example, If you want to process image file, you can simply launch image viewer.
875 * At that time, you can use this APIs like aul_open_file("myimage.jpg");
877 * @param[in] filename filename
878 * @return callee's pid or 0 if success, negative value if fail\n
879 * (when no found default app, return 0)
880 * @retval AUL_R_OK - success
881 * @retval AUL_R_EINVAL - invalid argument(filename)
882 * @retval AUL_R_ECOM - internal AUL IPC error
883 * @retval AUL_R_ERROR - general error
888 * int view_image_file(char *filename)
890 * aul_open_file(filename);
895 * This API is only available in User Session.
898 int aul_open_file(const char* filename);
902 * This API launch application associated with given specific mimetype
904 * This API is for caller.
905 * This API launch application based on mime type like aul_open_file API.
906 * But, This API don't find mime_type associated with file name.
907 * This API use mimetype given by user. By using given mimetype, find default application.
908 * and then launch the app with filename argument.
909 * @par Typical use case:
910 * Some files cannot extract exact mimetype automatically.
911 * For example, To know mime type of files with DRM lock, first we should unlock DRM file.
912 * In this case, You can use this API.
913 * First, unlock DRM file, and extract mimetype from unlock file by using aul_get_mime_from_file,
914 * and then, use this API with DRM file and extracted mime type.
916 * @param[in] filename filename
917 * @param[in] mimetype specific mimetype
918 * @return callee's pid or 0 if success, negative value if fail\n
919 * (when no found default app, return 0)
920 * @retval AUL_R_OK - success
921 * @retval AUL_R_EINVAL - invalid argument(filename,mimetype)
922 * @retval AUL_R_ECOM - internal AUL IPC error
923 * @retval AUL_R_ERROR - general error
926 * aul_open_file, aul_get_mime_from_file
930 * int view_drm_image_file(char *drm_filename)
933 * // you must implement this function
934 * mimetype = get_mimetype_from_drmfile(drm_filename);
936 * aul_open_file_with_mimetype(drm_filename,mimetype);
941 * This API is only available in User Session.
943 int aul_open_file_with_mimetype(const char *filename, const char *mimetype);
947 * This API launch application associated with content like "http://www.samsung.com"
949 * This API is for caller.
950 * This API launch application based on mime type.
951 * This API find mime_type associated with content,
952 * and then find default app associated with found mime_type,
953 * and then launch the app with content argument.
954 * @par Typical use case:
955 * You can launch application to process given content.
956 * That is, Even if you don't know the specific application's pkgname,
957 * you can launch the applicaiton processing given content.
958 * For example, If you want to process URL "http://www.samsung.com",
959 * you can simply launch browser.
960 * At that time, you can use this APIs like aul_open_content("http://www.samsung.com");
962 * @param[in] content content
963 * @return callee's pid or 0 if success, negative value if fail\n
964 * (when no found default app, return 0)
965 * @retval AUL_R_OK - success
966 * @retval AUL_R_EINVAL - invalid argument(content)
967 * @retval AUL_R_ECOM - internal AUL IPC error
968 * @retval AUL_R_ERROR - general error or no found mimetype
973 * int view_url(char *url)
975 * aul_open_content(url);
980 * This API is only available in User Session.
983 int aul_open_content(const char* content);
987 * This API get the default application(appid) associated with MIME type
989 * This API use to get default application associteted with mimetype
990 * In general, Setting Application need this API.
991 * @par Typical use case:
992 * Setting Application show mapping of default application / mimetype
994 * @param[in] mimetype a mime type
995 * @param[out] defapp a application appid of the app
996 * @param[in] len length of defapp
997 * @return 0 if success, negative value if fail
998 * @retval AUL_R_OK - success
999 * @retval AUL_R_EINVAL - invalid argument(mimetype)
1000 * @retval AUL_R_ERROR - general error or no found mimetype
1003 * aul_set_defapp_with_mime
1007 * void get_text_html_defapp()
1009 * char appname[255];
1010 * aul_get_defapp_from_mime("text/html",appname,sizeof(appname));
1015 * This API is only available in User Session.
1018 int aul_get_defapp_from_mime(const char *mimetype, char *defapp, int len);
1022 * This API set the default application(appid) associated with MIME type
1024 * This API use to change default application associteted with mimetype
1025 * In general, Setting Application or Installer need this API.
1026 * @par Typical use case:
1027 * Default Application associated with mimetype can be changed by Setting Application or installer
1028 * So, application to process specific mimetype can be substituted.
1030 * @param[in] mimetype a mime type
1031 * @param[in] defapp a application appid of the app to be set
1032 * @return 0 if success, negative value if fail
1033 * @retval AUL_R_OK - success
1034 * @retval AUL_R_EINVAL - invalid argument(mimetype)
1035 * @retval AUL_R_ERROR - general error
1038 * aul_get_defapp_from_mime
1042 * void set_text_html_defapp()
1044 * aul_set_defapp_with_mime("text/html","org.tizen.browser");
1049 * This API is only available in User Session.
1051 int aul_set_defapp_with_mime(const char *mimetype, const char *defapp);
1055 * This API get the mimetype associated with filename
1057 * This API use to get mimetype associteted with given filename
1058 * In general, This API use when you want to know only mimetype given filename.
1059 * @par Typical use case:
1060 * For example, In trasfering data through bluetooth,
1061 * additional information like mimetype should be added.
1062 * In such situation, You can get mimetype by using this API.
1064 * @param[in] filename file name
1065 * @param[out] mimetype a mime type
1066 * @param[in] len length of mimetype
1067 * @return 0 if success, negative value if fail
1068 * @retval AUL_R_OK - success
1069 * @retval AUL_R_EINVAL - invalid argument(filename)
1070 * @retval AUL_R_ERROR - general error
1075 * void get_mimetype()
1077 * char mimetype[255];
1078 * aul_get_mime_from_file("image.jpg",mimetype,sizeof(mimetype));
1083 * This API is only available in User Session.
1085 int aul_get_mime_from_file(const char *filename, char *mimetype, int len);
1089 * This API get the mimetype associated with given content
1091 * This API use to get mimetype associteted with given content
1092 * In general, This API use when you want to know only mimetype given content
1093 * @par Typical use case:
1094 * For example, In trasfering data through bluetooth,
1095 * additional information like mimetype should be added.
1096 * In such situation, You can get mimetype by using this API.
1098 * @param[in] content content string like "011-0000-0000"
1099 * @param[out] mimetype a mime type
1100 * @param[in] len length of mimetype
1101 * @return 0 if success, negative value if fail
1102 * @retval AUL_R_OK - success
1103 * @retval AUL_R_EINVAL - invalid argument(content)
1104 * @retval AUL_R_ERROR - general error
1109 * void get_mimetype()
1111 * char mimetype[255];
1112 * aul_get_mime_from_content("http://www.samsung.com",mimetype,sizeof(mimetype));
1117 * This API is only available in User Session.
1119 int aul_get_mime_from_content(const char *content, char *mimetype, int len);
1123 * This API get the icon's name associated with given mimetype
1125 * This API use to get icon's name associteted with given mimetype
1126 * @par Typical use case:
1127 * If you want to show mimetype's icon, use this API.
1129 * @param[in] mimetype a mime type
1130 * @param[out] iconname icon's name
1131 * @param[in] len length of iconname
1132 * @return 0 if success, negative value if fail
1133 * @retval AUL_R_OK - success
1134 * @retval AUL_R_EINVAL - invalid argument(content)
1135 * @retval AUL_R_ERROR - general error (no such mime type)
1140 * void get_mime_icon()
1143 * aul_get_mime_icon("text/html",icon,sizeof(icon));
1148 * This API is only available in User Session.
1150 int aul_get_mime_icon(const char *mimetype, char *iconname, int len);
1154 * This API get the extensions associated with given mimetype
1156 * This API use to get extensions associteted with given mimetype
1157 * @par Typical use case:
1158 * In general, user is not familiar with mimetype(text/html),
1159 * user is familiar with extenstions(*.html, *.htm)
1160 * So, To show mimetype information to user, use this API
1162 * @param[in] mimetype a mime type
1163 * @param[out] extlist extentions (ex> mpeg,mpg,mpe)
1164 * @param[in] len length of extlist
1165 * @return 0 if success, negative value if fail
1166 * @retval AUL_R_OK - success
1167 * @retval AUL_R_EINVAL - invalid argument(mimetype)
1168 * @retval AUL_R_ERROR - general error (no mimetype or no extenstion)
1171 * aul_get_mime_description
1175 * void get_extension()
1177 * char extlist[255];
1178 * aul_get_mime_extension("text/html",extlist,sizeof(extlist));
1183 * Some mimetype don't have extension.
1184 * In that case, You can use aul_get_mime_description.
1185 * This API is only available in User Session.
1187 int aul_get_mime_extension(const char *mimetype, char *extlist, int len);
1191 * This API get the description associated with given mimetype
1193 * This API use to get description associteted with given mimetype
1194 * @par Typical use case:
1195 * In general, user is not familiar with mimetype(text/html),
1196 * user is familiar with well-knowing information like extenstions(*.html, *.htm)
1197 * But, some mimetype don't have extenstion.
1198 * At that time,to show mimetype information to user, use this API
1200 * @param[in] mimetype a mime type
1201 * @param[out] desc description (ex> Call client)
1202 * @param[in] len length of desc
1203 * @return 0 if success, negative value if fail
1204 * @retval AUL_R_OK - success
1205 * @retval AUL_R_EINVAL - invalid argument(mimetype)
1206 * @retval AUL_R_ERROR - general error (no mimetype or no descrition)
1209 * aul_get_mime_extension
1213 * void get_information_from_mime()
1216 * if(aul_get_mime_extension("text/html",info,sizeof(info))<0){
1217 * aul_get_mime_description("text/html",info,sizeof(info));
1223 * This API is only available in User Session.
1225 int aul_get_mime_description(const char *mimetype, char *desc, int len);
1229 * This API create service result bundle based on bundle received in reset event.
1231 * This API use to create result bundle to send it to caller.
1232 * @par Typical use case:
1233 * This API is for callee which provide application service.\n
1234 * To send result to caller, You must create result bundle. \n
1235 * Callee(application providing the service) can send result by using this API and aul_send_service_result.
1237 * @param[in] inb bundle received in reset event
1238 * @param[out] outb bundle to use for returning result
1239 * @return 0 if success, negative value(<0) if fail
1240 * @retval AUL_R_OK - success
1241 * @retval AUL_R_EINVAL - inb is not bundle created by aul_open_service
1242 * @retval AUL_R_ERROR - general error
1245 * To create result bundle, You need received original bundle.
1246 * The original bundle can get from app_reset handler.
1250 * aul_send_service_result
1253 * #include <bundle.h>
1255 * int app_reset(bundle *b, void *data)
1257 * ad->recved_bundle = bundle_dup(b);
1262 * bundle* res_bundle;
1263 * aul_create_result_bundle(ad->recved_bundle,&res_bundle);
1264 * bundle_add(res_bundle, "result", "1");
1265 * aul_send_service_result(res_bundle);
1269 * This API is only available in User Session.
1272 int aul_create_result_bundle(bundle *inb, bundle **outb);
1276 * This API send service result to caller with bundle
1278 * This API is used to send result bundle to caller.
1279 * @par Typical use case:
1280 * This API is for callee which provide application service.\n
1281 * To send result to caller, You can use this API after creating result bundle. \n
1282 * Callee(application to provide service) can send result by using this API and aul_create_result_bundle.
1284 * @param[in] b Result data in bundle format
1285 * @return 0 if success, negative value(<0) if fail
1286 * @retval AUL_R_OK - success
1287 * @retval AUL_R_EINVAL - invalid result bundle
1288 * @retval AUL_R_ECOMM - internal AUL IPC error
1289 * @retval AUL_R_ERROR - general error
1292 * To send result bundle, You must create result bundle.
1293 * see aul_create_result_bundle
1297 * aul_create_result_bundle
1300 * #include <bundle.h>
1302 * int app_reset(bundle *b, void *data)
1304 * ad->recved_bundle = bundle_dup(b);
1309 * bundle* res_bundle;
1310 * aul_create_result_bundle(ad->recved_bundle,&res_bundle);
1311 * bundle_add(res_bundle, "result", "1");
1312 * aul_send_service_result(res_bundle);
1316 * This API is only available in User Session.
1319 int aul_send_service_result(bundle *b);
1323 * This API sets callback fuction that will be called when applications die.
1325 * This API's purpose is to listen the application dead event.
1326 * In general, task manager Application need this API.
1328 * @param[in] func callback function
1329 * @param[in] data user data
1330 * @return 0 if success, negative value if fail
1331 * @retval AUL_R_OK - success
1332 * @retval AUL_R_ERROR - general error
1335 * aul_listen_app_launch_signal
1339 * int app_dead_handler(int pid, void *data)
1341 * printf("===> %s : %d\n", __FUNCTION__, pid);
1345 * void dead_listen()
1347 * aul_listen_app_dead_signal(app_dead_handler, NULL);
1352 * This API is only available in User Session.
1355 int aul_listen_app_dead_signal(int (*func) (int, void *), void *data);
1359 * This API sets callback fuction that will be called when applications are launched.
1361 * This API's purpose is to listen the application launching event.
1362 * In general, task manager Application need this API.
1364 * @param[in] func callback function
1365 * @param[in] data user data
1366 * @return 0 if success, negative value if fail
1367 * @retval AUL_R_OK - success
1368 * @retval AUL_R_ERROR - general error
1371 * aul_listen_app_dead_signal
1375 * int app_launch_handler(int pid, void *data)
1377 * printf("===> %s : %d\n", __FUNCTION__, pid);
1381 * void dead_listen()
1383 * aul_listen_app_launch_signal(app_launch_handler, NULL);
1388 * This API is only available in User Session.
1391 int aul_listen_app_launch_signal(int (*func) (int, void *), void *data);
1395 * This API sets callback fuction that will be called when applications are launched.
1397 * This API's purpose is to listen the application launching event.
1398 * In general, task manager Application need this API.
1400 * @param[in] func callback function
1401 * @param[in] data user data
1402 * @return 0 if success, negative value if fail
1403 * @retval AUL_R_OK - success
1404 * @retval AUL_R_ERROR - general error
1407 * aul_listen_app_dead_signal
1411 * int app_launch_handler(int pid, const char *app_id, void *data)
1413 * printf("===> %s : %d, %s\n", __FUNCTION__, pid, app_id);
1417 * void dead_listen()
1419 * aul_listen_app_launch_signal(app_launch_handler, NULL);
1424 * This API is only available in User Session.
1427 int aul_listen_app_launch_signal_v2(int (*func) (int, const char *, void *), void *data);
1431 * This API gets status of specified application process id.
1433 * This API's purpose is to get the application's status.
1435 * @param[in] pid pid of application
1436 * @return 0 or greater if success, nagative value if fail
1437 * @retval STATUS_LAUNCHING
1438 * @retval STATUS_CREATED
1439 * @retval STATUS_FOCUS
1440 * @retval STATUS_VISIBLE
1442 * @retval STATUS_DYING
1443 * @retval STATUS_HOME
1444 * @retval STATUS_NORESTART
1450 * int iterfunc(const aul_app_info *info, void *data)
1453 * status = aul_app_get_status_bypid(info->pid);
1454 * if (status == STATUS_FOCUS) {
1455 * printf("%s has focus", info->app_id);
1456 * (int *)data = info->pid;
1462 * int find_focus_app_pid()
1465 * aul_app_get_running_app_info(iterfunc, &pid);
1470 * This API is only available in User Session.
1472 int aul_app_get_status_bypid(int pid);
1476 * This API sets callback function that on application status changed.
1478 * This API's purpose is to listen the application's status changed within
1479 * the caller process. In general, a library that required to release resource on
1480 * application's status may use this API.
1482 * @param[in] func callback function
1483 * @param[in] data user data
1484 * @return 0 if success, negative value if fail
1485 * @retval AUL_R_OK - success
1486 * @retval AUL_R_ERROR - general error
1488 * aul_remove_status_local_cb
1492 * int status_changed(int status, void *data)
1494 * if (status == STATUS_FOCUS)
1495 * printf("%d has focus\n", getpid());
1497 * if (status == STATUS_VISIBLE)
1498 * printf("%d resume\n", getpid());
1500 * if (status == STATUS_BG0
1501 * printf("%d pause\n", getpid());
1504 * void listen_app_status()
1506 * aul_add_status_local_cb(status_changed, NULL);
1510 * This API is only available in User Session.
1513 int aul_add_status_local_cb(int (*func) (int, void *), void *data);
1517 * This API unsets callback function that on application status changed.
1519 * This API's purpose is to remove callback that added by
1520 * aul_add_status_local_cb.
1522 * @param[in] func callback function
1523 * @param[in] data user data
1524 * @return 0 if success, negative value if fail
1525 * @retval AUL_R_OK - success
1526 * @retval AUL_R_ERROR - general error
1529 * aul_add_status_local_cb
1533 * int status_changed(int status, void *data)
1535 * if (status == STATUS_FOCUS)
1536 * printf("%d has focus\n", getpid());
1538 * if (status == STATUS_VISIBLE)
1539 * printf("%d resume\n", getpid());
1541 * if (status == STATUS_BG0
1542 * printf("%d pause\n", getpid());
1545 * void listen_app_status()
1547 * aul_add_status_local_cb(status_changed, NULL);
1550 * void ignore_app_status()
1552 * aul_remove_status_local_cb(status_changed, NULL);
1557 * This API is only available in User Session.
1560 int aul_remove_status_local_cb(int (*func) (int, void *), void *data);
1563 * This API is only for Appfw internally.
1565 int aul_terminate_bgapp_pid(int pid);
1568 * This API is only for Appfw internally.
1570 int aul_terminate_pid_without_restart(int pid);
1573 * This API is only for Appfw internally.
1575 const char *aul_get_app_external_root_path(void);
1578 * This API is only for Appfw internally.
1580 const char *aul_get_app_root_path(void);
1583 * This API is only for Appfw internally.
1585 const char *aul_get_app_data_path(void);
1588 * This API is only for Appfw internally.
1590 const char *aul_get_app_cache_path(void);
1593 * This API is only for Appfw internally.
1595 const char *aul_get_app_resource_path(void);
1598 * This API is only for Appfw internally.
1600 const char *aul_get_app_tep_resource_path(void);
1603 * This API is only for Appfw internally.
1605 const char *aul_get_app_shared_data_path(void);
1608 * This API is only for Appfw internally.
1610 const char *aul_get_app_shared_resource_path(void);
1613 * This API is only for Appfw internally.
1615 const char *aul_get_app_shared_trusted_path(void);
1618 * This API is only for Appfw internally.
1620 const char *aul_get_app_external_data_path(void);
1623 * This API is only for Appfw internally.
1625 const char *aul_get_app_external_cache_path(void);
1628 * This API is only for Appfw internally.
1630 const char *aul_get_app_external_shared_data_path(void);
1633 * This API is only for Appfw internally.
1635 const char *aul_get_app_specific_path(void);
1638 * This API is only for Appfw internally.
1640 const char *aul_get_app_external_specific_path(void);
1643 * This API is only for Appfw internally.
1645 int aul_get_app_shared_data_path_by_appid(const char *app_id, char **path);
1648 * This API is only for Appfw internally.
1650 int aul_get_app_shared_resource_path_by_appid(const char *app_id, char **path);
1653 * This API is only for Appfw internally.
1655 int aul_get_app_shared_trusted_path_by_appid(const char *app_id, char **path);
1658 * This API is only for Appfw internally.
1660 int aul_get_app_external_shared_data_path_by_appid(const char *app_id, char **path);
1663 * This API is only for Appfw internally.
1665 int aul_get_usr_app_shared_data_path_by_appid(const char *app_id, char **path, uid_t uid);
1668 * This API is only for Appfw internally.
1670 int aul_get_usr_app_shared_resource_path_by_appid(const char *app_id, char **path, uid_t uid);
1673 * This API is only for Appfw internally.
1675 int aul_get_usr_app_shared_trusted_path_by_appid(const char *app_id, char **path, uid_t uid);
1678 * This API is only for Appfw internally.
1680 int aul_get_usr_app_external_shared_data_path_by_appid(const char *app_id, char **path, uid_t uid);
1683 * This type is only for Appfw internally.
1685 typedef int (*subapp_fn)(void *data);
1688 * This API is only for Appfw internally.
1690 int aul_set_subapp(subapp_fn cb, void *data);
1693 * This API is only for Appfw internally.
1695 int aul_subapp_terminate_request_pid(int pid);
1698 * This API is only for Appfw internally.
1700 int aul_is_subapp(void);
1703 * This API is only for Appfw internally.
1705 int aul_kill_pid(int pid);
1708 * This API is only for Appfw internally.
1710 int aul_add_caller_cb(int pid, void (*caller_cb) (int, void *), void *data);
1713 * This API is only for Appfw internally.
1715 int aul_remove_caller_cb(int pid);
1718 * This API is only for Appfw internally.
1720 int aul_invoke_caller_cb(int pid);
1723 * This API is only for Appfw internally.
1725 void aul_set_preinit_window(void *evas_object);
1728 * This API is only for Appfw internally.
1730 void* aul_get_preinit_window(const char *win_name);
1733 * This API is only for Appfw internally.
1735 void aul_set_preinit_background(void *evas_object);
1738 * This API is only for Appfw internally.
1740 void* aul_get_preinit_background(void);
1743 * This API is only for Appfw internally.
1745 void aul_set_preinit_conformant(void *evas_object);
1748 * This API is only for Appfw internally.
1750 void* aul_get_preinit_conformant(void);
1753 * This API is only for Appfw internally.
1755 void aul_set_preinit_appid(const char *appid);
1758 * This API is only for Appfw internally.
1760 void aul_set_preinit_pkgid(const char *pkgid);
1763 * This API is only for Appfw internally.
1765 int aul_update_freezer_status(int pid, const char* type);
1768 * This API is only for Appfw internally.
1770 int aul_send_app_launch_request_signal(int pid, const char* appid, const char* pkgid, const char* type);
1773 * This API is only for Appfw internally.
1775 int aul_send_app_resume_request_signal(int pid, const char* appid, const char* pkgid, const char *type);
1778 * This API is only for Appfw internally.
1780 int aul_send_app_terminate_request_signal(int pid, const char* appid, const char* pkgid, const char *type);
1783 * This API is only for Appfw internally.
1785 int aul_send_app_status_change_signal(int pid, const char* appid, const char* pkgid, const char* status, const char *type);
1788 * This API is only for Appfw internally.
1790 int aul_send_app_terminated_signal(int pid);
1793 * This API is only for Appfw internally.
1795 int aul_send_app_group_signal(int owner_pid, int child_pid, const char *child_pkgid);
1798 * This API is only for Appfw internally.
1800 int aul_invoke_status_local_cb(int status);
1803 * This type is only for Appfw internally.
1805 typedef int (*data_control_provider_handler_fn) (bundle *b, int request_id, void *data);
1808 * This API is only for Appfw internally.
1810 int aul_set_data_control_provider_cb(data_control_provider_handler_fn handler);
1813 * This API is only for Appfw internally.
1815 int aul_unset_data_control_provider_cb(void);
1818 * This API is only for Appfw internally.
1820 int aul_pause_app(const char *appid);
1823 * This API is only for Appfw internally.
1825 int aul_pause_pid(int pid);
1828 * This API is only for Appfw internally.
1830 int aul_reload_appinfo(void);
1833 * This API is only for Appfw internally.
1835 int aul_status_update(int status);
1838 * This API is only for Appfw internally.
1840 int aul_running_list_update(char *appid, char *app_path, char *pid);
1843 * This API is only for Appfw internally.
1845 void aul_app_group_add(int leader_pid, int pid, int wid);
1848 * This API is only for Appfw internally.
1850 void aul_app_group_remove(int pid);
1853 * This API is only for Appfw internally.
1855 void aul_app_group_attach_window(int parent_wid, int child_wid);
1858 * This API is only for Appfw internally.
1860 void aul_app_group_detach_window(int child_wid);
1863 * This API is only for Appfw internally.
1865 int aul_app_group_get_window(int pid);
1868 * This API is only for Appfw internally.
1870 int aul_app_group_get_window(int pid);
1873 * This API is only for Appfw internally.
1875 int aul_app_group_set_window(int wid);
1878 * This API is only for Appfw internally.
1880 void aul_app_group_get_leader_pids(int *cnt, int **pids);
1883 * This API is only for Appfw internally.
1885 void aul_app_group_get_group_pids(int leader_pid, int *cnt, int **pids);
1888 * This API is only for Appfw internally.
1890 int aul_app_group_get_leader_pid(int pid);
1893 * This API is only for Appfw internally.
1895 int aul_app_group_clear_top(void);
1898 * This API is only for Appfw internally.
1900 int aul_app_group_is_top(void);
1903 * This API is only for Appfw internally.
1905 int aul_app_group_get_fg_flag(int pid);
1908 * This API is only for Appfw internally.
1910 void aul_app_group_lower(int *exit);
1913 * This API is only for Appfw internally.
1915 void aul_app_group_get_idle_pids(int *cnt, int **pids);
1918 * This API is only for Appfw internally.
1920 int aul_request_data_control_socket_pair(bundle *b, int *fd);
1922 * This API is only for Appfw internally.
1924 int aul_request_message_port_socket_pair(int *fd);
1926 * This API is only for Appfw internally.
1928 int aul_listen_booting_done_signal(int (*func) (int, void *), void *data);
1931 * This API is only for Appfw internally.
1933 int aul_listen_cooldown_signal(int (*func) (const char *, void *), void *data);
1936 * This API is only for Appfw internally.
1938 int aul_listen_app_status_signal(int (*func) (int, int, void *), void *data);
1941 * This API is only for Appfw internally.
1943 int aul_check_tep_mount(const char *tep_path);
1946 * This API is only for Appfw internally.
1948 int aul_is_tep_mount_dbus_done(const char *tep_string);
1951 * This API is only for Appfw internally.
1953 int aul_forward_app(const char *appid, bundle *kb);
1957 * This API create custom launchpad-loader
1959 * This API's purpose is to make a slot for custom loader.
1960 * Once it is made, added loader will make a candidate process to use.
1962 * @param[in] loader_path The file name of the custom loader binary including full path
1963 * @return Loader ID if success, negative value(<0) if fail
1966 * This API is only for Appfw internally.
1967 * This API is only available in User Session.
1969 int aul_add_loader(const char *loader_path);
1973 * This API destroy custom launchpad-loader
1975 * This API's purpose is to remove a slot for custom loader.
1976 * Once it is removed, the prepared process will be removed as well.
1978 * @param[in] loader_id Loader ID
1979 * @return 0 if success, negative value(<0) if fail
1982 * This API is only for Appfw internally.
1983 * This API is only available in User Session.
1985 int aul_remove_loader(int loader_id);
1989 * This API gets specified application process id.
1991 * The purpose of this API is to get the pid of specified application.
1993 * @param[in] appid application name
1994 * @return callee's pid if success, negative value(<0) if fail
1997 * This API is only available in User Session.
1999 int aul_app_get_pid(const char *appid);
2004 * This function delete rua history.
2006 * @param[in] b Bundle object Target Package name or app path. If NULL or has no value, delete all rua history.
2008 * @return 0 if success, negative value(<0) if fail
2010 * @remarks This API is only for Appfw internally.
2019 bundle *b = bundle_create();
2021 bundle_add_str(b, AUL_K_RUA_PKGNAME, pkg_name);
2023 bundle_add_str(b, AUL_K_RUA_APPPATH, app_path);
2025 r = aul_delete_rua_history(b);
2030 int aul_delete_rua_history(bundle *b);