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.
25 #include <sys/types.h>
32 * @brief Return values in AUL.
34 typedef enum _aul_return_val {
35 AUL_R_EREJECTED = -14, /**< App disable for mode */
36 AUL_R_ENOAPP = -13, /**< Failed to find app ID or pkg ID */
37 AUL_R_EHIDDENFORGUEST = -11, /**< App hidden for guest mode */
38 AUL_R_ENOLAUNCHPAD = -10, /**< no launchpad */
39 AUL_R_ETERMINATING = -9, /**< application terminating */
40 AUL_R_EILLACC = -8, /**< Illegal Access */
41 AUL_R_LOCAL = -7, /**< Launch by himself */
42 AUL_R_ETIMEOUT = -6, /**< Timeout */
43 AUL_R_ECANCELED = -5, /**< Operation canceled */
44 AUL_R_EINVAL = -4, /**< Invalid argument */
45 AUL_R_ECOMM = -3, /**< Comunication Error */
46 AUL_R_ENOINIT = -2, /**< AUL handler NOT initialized */
47 AUL_R_ERROR = -1, /**< General error */
48 AUL_R_OK = 0 /**< General success */
63 typedef enum _aul_type{
71 /** AUL public key - To check caller's secuirty */
72 #define AUL_K_CALLER_PID "__AUL_CALLER_PID__"
73 /** AUL public key - To check callee's secuirty */
74 #define AUL_K_CALLEE_PID "__AUL_CALLEE_PID__"
75 /** AUL public key - added for multiuser mode */
76 #define AUL_K_CALLER_UID "__AUL_CALLER_UID__"
77 /** AUL public key - added for multiuser mode */
78 #define AUL_K_CALLEE_UID "__AUL_CALLEE_UID__"
79 /** AUL public key - added for multiuser mode */
80 #define AUL_K_TARGET_UID "__AUL_TARGET_UID__"
81 /** AUL public key - To check caller's secuirty */
82 #define AUL_K_CALLER_APPID "__AUL_CALLER_APPID__"
83 /** AUL public key - To check caller's secuirty */
84 #define AUL_K_CALLEE_APPID "__AUL_CALLEE_APPID__"
85 /** AUL public key - To find argv0 */
86 #define AUL_K_ARGV0 "__AUL_ARGV0__"
87 /** AUL public key - To measure launching time */
88 #define AUL_K_STARTTIME "__AUL_STARTTIME__"
89 /** AUL public key - To support launching based on mime type */
90 #define AUL_K_MIME_TYPE "__AUL_MIME_TYPE__"
91 /** AUL public key - To support launching based on mime type */
92 #define AUL_K_UNALIASED_MIME_TYPE "__AUL_UNALIASED_MIME_TYPE__"
93 /** AUL public key - To support launching based on mime type */
94 #define AUL_K_MIME_CONTENT "__AUL_MIME_CONTENT__"
95 /** AUL public key - To support launching based on service */
96 #define AUL_K_SERVICE_NAME "__AUL_SERVICE_NAME__"
97 /** AUL public key - To force launch app selector instead of lauchingn default app */
98 #define AUL_K_FORCE_LAUNCH_APP_SELECTOR "__AUL_FORCE_LAUNCH_APP_SELECTOR__"
99 /** AUL public key - To support debug argument */
100 #define AUL_K_DEBUG "__AUL_DEBUG__"
101 /** AUL public key - To support SDK */
102 #define AUL_K_SDK "__AUL_SDK__"
103 /** AUL public key - To support Media key */
104 #define AUL_K_MULTI_KEY "__AUL_MULTI_KEY__"
105 /** AUL public key - To support Media key */
106 #define AUL_K_MULTI_KEY_EVENT "__AUL_MULTI_KEY_EVENT__"
107 /** AUL public bundle value */
108 #define AUL_K_PRIVACY_APPID "__AUL_PRIVACY_APPID__"
109 /** AUL public bundle value - To support Media key*/
110 #define AUL_V_KEY_PRESSED "__AUL_KEY_PRESSED__"
111 /** AUL public bundle value - To support Media key*/
112 #define AUL_V_KEY_RELEASED "__AUL_KEY_RELEASED__"
113 /** AUL public key - To support rua stat */
114 #define AUL_SVC_K_RUA_STAT_CALLER "__K_RUA_STAT_CALLER__"
115 #define AUL_SVC_K_RUA_STAT_TAG "__K_RUA_STAT_TAG__"
118 /** AUL internal private key */
119 #define AUL_K_PKG_NAME "__AUL_PKG_NAME__"
120 /** AUL internal private key */
121 #define AUL_K_WAIT_RESULT "__AUL_WAIT_RESULT__"
122 /** AUL internal private key */
123 #define AUL_K_SEND_RESULT "__AUL_SEND_RESULT__"
124 /** AUL internal private key */
125 #define AUL_K_TASK_MANAGE "__AUL_TASK_MANAGE__"
126 /** AUL internal private key */
127 #define AUL_K_APP_TYPE "__AUL_APP_TYPE__"
128 /** AUL internal private key - To check original caller's identity */
129 #define AUL_K_ORG_CALLER_PID "__AUL_ORG_CALLER_PID__"
130 /** AUL internal private key - To check forwarded callee app's pid */
131 #define AUL_K_FWD_CALLEE_PID "__AUL_FWD_CALLEE_PID__"
132 /** AUL internal private key */
133 #define AUL_K_NO_CANCEL "__AUL_NO_CANCEL__"
134 /** AUL internal private key */
135 #define AUL_K_EXEC "__AUL_EXEC__"
136 /** AUL internal private key */
137 #define AUL_K_MULTIPLE "__AUL_MULTIPLE__"
138 /** AUL internal private key */
139 #define AUL_K_PACKAGETYPE "__AUL_PACKAGETYPE__"
140 /** AUL internal private key */
141 #define AUL_K_HWACC "__AUL_HWACC__"
142 /** AUL internal private key */
143 #define AUL_K_APPID "__AUL_APPID__"
144 /** AUL internal private key */
145 #define AUL_K_PID "__AUL_PID__"
146 /** AUL internal private key */
147 #define AUL_K_WID "__AUL_WID__"
148 /** AUL internal private key */
149 #define AUL_K_LEADER_PID "__AUL_LEADER_PID__"
150 /** AUL internal private key - To support data control */
151 #define AUL_K_DATA_CONTROL_TYPE "__AUL_DATA_CONTROL_TYPE__"
152 /** AUL internal private key */
153 #define AUL_K_PKGID "__AUL_PKGID_"
154 /** AUL internal private key */
155 #define AUL_K_INTERNAL_POOL "__AUL_INTERNAL_POOL__"
156 /** AUL internal private key */
157 #define AUL_TEP_PATH "_AUL_TEP_PATH_"
158 /** AUL internal private key */
159 #define AUL_K_COMP_TYPE "__AUL_COMP_TYPE__"
160 /** AUL internal private key */
161 #define AUL_K_LOADER_ID "__AUL_LOADER_ID__"
162 /** AUL internal private key */
163 #define AUL_K_LOADER_PATH "__AUL_LOADER_PATH__"
166 * @brief This is callback function for aul_launch_init
167 * @param[in] type event's type received from system
168 * @param[in] b In case of RESET events, bundle which is received from peer
169 * @param[in] data user-supplied data
171 typedef int (*aul_handler_fn) (aul_type type, bundle * b, void *data);
175 * This API install your AUL handler and setup AUL internal connection.
177 * AUL receive START(RESET), RESUME, TERMINATE events from system.\n
178 * This API use to handle the events. \n
179 * @par Typical use case:
180 * In general, you need not use this API.
181 * If you use AppCore, you should NOT use this API.
182 * AppCore will set default aul_handler.
184 * @param[in] handler aul main callback handler function
185 * @param[in] data user-supplied data for start_handler
186 * @return 0 if success, negative value(<0) if fail\n
187 * @retval AUL_R_OK - success
188 * @retval AUL_R_ECANCELD - aul handler was installed already by others
189 * @retval AUL_R_ECOMM - error to create internal ipc
190 * @retval AUL_R_ERROR - error to attach glib main loop
192 * @warning If you use AppCore, you should NOT use this API.\n
193 * You need glib main loop.\n
195 * you must have aul handler to use this API.
196 * aul_luanch_init register aul handler.
199 * #include <bundle.h>
201 * static int aul_handler(aul_type type, bundle *kb,void *data)
206 * // process RESET event
209 * // process RESUME event
211 * case AUL_TERMINATE:
212 * // preocess TERMINATE event
218 * static GMainLoop *mainloop = NULL;
220 * int main(int argc, char **argv)
222 * aul_launch_init(aul_handler,NULL);
223 * aul_launch_argv_handler(argc, argv);
225 * mainloop = g_main_loop_new(NULL, FALSE);
226 * g_main_loop_run(mainloop);
231 * This API is only available in User Session.
233 int aul_launch_init(aul_handler_fn handler, void *data);
237 * This API create internal RESET events with given argc, argv \n
239 * This API's purpose is to generate reset event.
240 * If you want to generate local RESET events with argument vector format, use this API
241 * @par Typical use case:
242 * In general, you need not use this API.
243 * AppCore use this API to create internal reset event.
245 * @param[in] argc # of args
246 * @param[in] argv list of arg strings
247 * @return 0 if success, negative value(<0) if fail
248 * @retval AUL_R_OK - success
249 * @retval AUL_R_ENOINIT - aul handler was NOT yet installed
250 * @retval AUL_R_ECANCLED - error to create internal bundle with given argc,argv.
251 * @retval AUL_R_ERROR - general error
254 * you must have aul handler to use this API.
255 * aul_luanch_init register aul handler.
260 * #include <bundle.h>
262 * int send_local_reset_event()
266 * argv[0] = "local.app";
267 * argv[1] = "event_type";
268 * argv[2] = "my_reset";
270 * aul_launch_argv_handler(argc,argv);
275 * If you use AppCore, you NEED NOT use this API.
276 * This API is only available in User Session.
278 int aul_launch_argv_handler(int argc, char **argv);
282 * This API creates internal RESET events with given bundle \n
284 * This API's purpose is to generate reset event.
285 * If you want to generate local RESET events with argument vector format, first use
286 * bundle_import_from_argv to create a bundle from the argument vector and then use this API
287 * Eventually, this API will replace aul_launch_argv_handler().
288 * @par Typical use case:
289 * In general, you need not use this API.
290 * AppCore use this API to create internal reset event.
292 * @param[in] b bundle
293 * @return 0 if success, negative value(<0) if fail
294 * @retval AUL_R_OK - success
295 * @retval AUL_R_ENOINIT - aul handler was NOT yet installed
296 * @retval AUL_R_ERROR - general error
299 * you must have aul handler to use this API.
300 * aul_luanch_init register aul handler.
304 * aul_launch_init, bundle_import_from_argv
307 * #include <bundle.h>
309 * int send_local_reset_event()
314 * argv[0] = "local.app";
315 * argv[1] = "event_type";
316 * argv[2] = "my_reset";
319 * b = bundle_import_from_argv(argc,argv);
320 * aul_launch_local(b);
325 * If you use AppCore, you NEED NOT to use this API.
326 * This API is only available in User Session.
328 int aul_launch_local(bundle *b);
332 * This API launches application with the given bundle.
333 * If the application is not running or a multiple-instance one, this API launches with the given bundle.
334 * If the application is running, this API sends a RESET event to the App.
335 * While the application is running, if the application cannot receive the RESET event,
336 * this API returns a general error(AUL_R_ERROR).\n
338 * This API is for caller.
339 * This API's purpose is to launch/reset application with given bundle.
340 * @par Typical use case:
341 * If you know the target application's pkgname and bundle types,
342 * you can use this API to launch/reset the application.
344 * @param[in] pkgname package name to be run as callee
345 * @param[in] kb bundle to be passed to callee
346 * @return callee's pid if success, negative value(<0) if fail
347 * @retval AUL_R_OK - success
348 * @retval AUL_R_EINVAL - invaild package name
349 * @retval AUL_R_ECOM - internal AUL IPC error
350 * @retval AUL_R_ERROR - general error
356 * #include <bundle.h>
358 * int launch_inhouse_contact_app()
361 * b = bundle_create();
362 * bundle_add(b,"type","SIM");
363 * aul_launch_app("org.tizen.contact",b);
368 * This API is only available in User Session.
370 int aul_launch_app(const char *appid, bundle *kb);
374 * This API launches application with the given bundle.
375 * If the application is not running or a multiple-instance one, this API launches with the given bundle.
376 * If the application is running, this API sends a RESET event to the App.
377 * While the application is running, if the application cannot receive the RESET event,
378 * this API returns a general error(AUL_R_ERROR).\n
380 * This API is for caller.
381 * This API's purpose is to launch/reset application with given bundle.
382 * @par Typical use case:
383 * If you know the target application's pkgname and bundle types,
384 * you can use this API to launch/reset the application.
386 * @param[in] pkgname package name to be run as callee
387 * @param[in] kb bundle to be passed to callee
388 * @param[in] uid User ID to launch
389 * @return callee's pid if success, negative value(<0) if fail
390 * @retval AUL_R_OK - success
391 * @retval AUL_R_EINVAL - invaild package name
392 * @retval AUL_R_ECOM - internal AUL IPC error
393 * @retval AUL_R_ERROR - general error
398 * This API is also available in System Session.
400 int aul_launch_app_for_uid(const char *appid, bundle *kb, uid_t uid);
404 * This API launches application, as menu screen launches the app.
405 * Thus, if the applocation is running, this API sends a RESUME event to the app.
406 * If the application is not running, this API launches the app.
407 * While the application is running, if the application cannot receive the RESUME event,
408 * AUL tries to raise the application's default window.
411 * This API is for caller.
412 * This API's purpose is to resume/launch application
413 * @par Typical use case:
414 * If you only want to show application with previous state or default state, Use this API.
416 * @param[in] pkgname package name to be resume as callee
417 * @return callee's pid if success, negative value(<0) if fail
418 * @retval AUL_R_OK - success
419 * @retval AUL_R_EINVAL - invaild package name
420 * @retval AUL_R_ECOM - internal AUL IPC error
421 * @retval AUL_R_ERROR - general error
424 * aul_launch_app, aul_app_is_running, aul_resume_pid
427 * #include <bundle.h>
429 * int open_inhouse_contact_app()
431 * if(aul_app_is_running("org.tizen.contact"))
432 * aul_open_app("org.tizen.contact");
437 * If you don't want to launch the app,
438 * you should check app's running state with aul_app_is_running.
439 * This API will launch the application if the application is not running.
440 * This API is only available in User Session.
442 int aul_open_app(const char *appid);
446 * This API trigger to resume application
447 * If the application is running, this API send a resume event to the App.
448 * If the application is not running, this API returns fail.
449 * Although the application is running, if the application cannot receive resume event,
450 * AUL try to raise the application's default windows.
452 * This API is for caller.
453 * This API's purpose is to send resume event.
454 * @par Typical use case:
455 * If you only want to show application with previous state or default state, Use this API.
457 * @param[in] pkgname package name to be resume as callee
458 * @return callee's pid if success, negative value(<0) if fail
459 * @retval AUL_R_OK - success
460 * @retval AUL_R_EINVAL - invaild package name
461 * @retval AUL_R_ECOM - internal AUL IPC error
462 * @retval AUL_R_ERROR - general error
465 * aul_launch_app, aul_app_is_running, aul_resume_pid
467 * This function will be deprecated. Use aul_open_add() instead.
470 * #include <bundle.h>
472 * int resume_inhouse_contact_app()
474 * if(aul_app_is_running("org.tizen.contact"))
475 * aul_resume_app("org.tizen.contact");
480 * If you don't want to launch the app,
481 * you should check app's running state with aul_app_is_running.
482 * This API will launch the application if the application is not running.
483 * If you want to only resume without launching in multiple instance application model,
484 * you should use aul_resume_pid.
485 * This API is only available in User Session.
487 int aul_resume_app(const char *appid);
491 * This API trigger to resume application
492 * If the application is running, this API send a resume event to the App.
493 * If the application is not running, this API return AUL_R_ERROR.
494 * Although the application is running, if the application cannot receive resume event,
495 * AUL try to raise the application's default windows.
497 * This API is for caller.
498 * This API's purpose is to send resume event.
499 * @par Typical use case:
500 * In multiple application model, If you want to only resume specific application, Use this API
502 * @param[in] pid application's pid to be resumed
503 * @return 0 if success, negative value(<0) if fail
504 * @retval AUL_R_OK - success
505 * @retval AUL_R_EINVAL - invaild pid
506 * @retval AUL_R_ECOM - internal AUL IPC error
507 * @retval AUL_R_ERROR - general error (include application is not running)
508 * @warning This API need to require root or inhouse permisssion \n
509 * If you have not the permission, this API return AUL_R_ERROR. \n
514 * #include <bundle.h>
516 * int iterfunc(const aul_app_info *info, void *data)
518 * if(strcmp(info->pkg_name,"org.tizen.contact")==0)
519 * aul_resume_pid(info->pid);
522 * int iterate_running_apps()
524 * return aul_app_get_running_app_info(iterfunc,NULL);
529 * This API is only available in User Session.
531 int aul_resume_pid(int pid);
535 * This API trigger to terminate application
537 * If the application is running, this API send a terminate event to the App. \n
538 * If the app cannot receive the event, AUL kill forcely the application.\n
540 * This API's purpose is to kill application
541 * @par Typical use case:
542 * In general, Application like Task Manager use this API.
544 * This API need to require root or inhouse permisssion. \n
546 * @param[in] pid application's pid to be terminated
547 * @return 0 if success, negative value(<0) if fail
548 * @retval AUL_R_OK - success
549 * @retval AUL_R_EINVAL - invaild pid
550 * @retval AUL_R_ECOM - internal AUL IPC error
551 * @retval AUL_R_ERROR - general error
552 * @warning This API need to require root or inhouse permisssion. \n
556 * #include <bundle.h>
558 * int iterfunc(const aul_app_info *info, void *data)
560 * if(strcmp(info->pkg_name,"org.tizen.contact")==0)
561 * aul_terminate_pid(info->pid);
564 * int iterate_running_apps()
566 * return aul_app_get_running_app_info(iterfunc,NULL);
571 * If you have not the permission, this API return AUL_R_ERROR. \n
572 * This API is only available in User Session.
574 int aul_terminate_pid(int pid);
578 * This API trigger to terminate application asynchronously
580 * If the application is running, this API send a terminate event to the App. \n
581 * If the app cannot receive the event, AUL kill forcely the application.\n
583 * This API's purpose is to kill application
584 * @par Typical use case:
585 * In general, Application like Task Manager use this API.
587 * This API need to require root or inhouse permisssion. \n
589 * @param[in] pid application's pid to be terminated
590 * @return 0 if success, negative value(<0) if fail
591 * @retval AUL_R_OK - success
592 * @retval AUL_R_EINVAL - invaild pid
593 * @retval AUL_R_ECOM - internal AUL IPC error
594 * @retval AUL_R_ERROR - general error
595 * @warning This API need to require root or inhouse permisssion. \n
597 * If you have not the permission, this API return AUL_R_ERROR. \n
598 * This API is only available in User Session.
600 int aul_terminate_pid_async(int pid);
603 *@brief Running application's information structure retrieved by AUL
605 typedef struct _aul_app_info {
606 int pid; /**< app's pid if running*/
607 char* pkg_name; /**< application id */
608 char* app_path; /**< application excutable path */
613 * @brief iterator function running with aul_app_get_running_app_info
614 * @param[out] ainfo aul_app_info retreived by aul_app_get_running_app_info
615 * @param[out] data user-supplied data
617 typedef int (*aul_app_info_iter_fn)(const aul_app_info *ainfo, void *data);
621 * This API ask a application is running by application package name.
623 * To know whether some application is running or not, use this API
624 * @par Typical use case:
625 * For example, If you want to know browser application running,
626 * you can check it by using this API.
628 * @param[in] pkgname application package name
629 * @return true / false
630 * @retval 1 app_name is running now.
631 * @retval 0 app_name is NOT running now.
636 * int is_running_browser_app()
638 * return aul_app_is_running("org.tizen.browser");
643 * This API is only available in User Session.
646 int aul_app_is_running(const char *appid);
650 * This API use to get running application list.
651 * This API call iter_fn with each aul_app_info of running apps when running application is found.
653 * If you want to get running application list, use this API
654 * This API give you running applications which has SLP desktop file.
655 * @par Typical use case:
656 * In general, this API is used by task manager appllication. (running application list viewer)
658 * @param[in] iter_fn iterator function
659 * @param[in] data user-supplied data for iter_fn
660 * @return 0 if success, negative value(<0) if fail
661 * @retval AUL_R_OK - success
662 * @retval AUL_R_ERROR - internal error
667 * int iterfunc(const aul_app_info* info, void* data)
669 * printf("\t==========================\n");
670 * printf("\t pkg_name: %s\n", info->appid);
671 * printf("\t app_path: %s\n", info->app_path);
672 * printf("\t running pid: %d\n", info->pid);
673 * printf("\t==========================\n");
677 * int iterate_running_apps()
679 * return aul_app_get_running_app_info(iterfunc,NULL);
684 * This API should use if you want to know running application which has desktop files.
685 * If you want to get all process list, you must iterate process information by using proc filesystem
686 * Or, If you want to get all window list, you must iterate XWindows by using XWindow APIs
687 * This API is only available in User Session.
689 int aul_app_get_running_app_info(aul_app_info_iter_fn iter_fn, void *data);
693 * This API get application package name by pid
695 * If you want to get package name of running application, use this API
696 * @par Typical use case:
697 * In general, You can use this API when you want to know caller's information.
699 * @param[in] pid given pid
700 * @param[out] pkgname pkgname to be get
701 * @param[in] len length of pkgname
702 * @return 0 if success, negative value(<0) if fail
703 * @retval AUL_R_OK - success
704 * @retval AUL_R_ERROR - no such a package name
707 * #include <bundle.h>
709 * static int app_reset(bundle *b, void *data)
714 * pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID));
715 * aul_app_get_pkgname_bypid(pid, appname, sizeof(appname));
720 * This API is only available in User Session.
722 int aul_app_get_pkgname_bypid(int pid, char *pkgname, int len);
726 * This API get application pkgid by pid
728 * If you want to get pkgid of running application, use this API
729 * @par Typical use case:
730 * In general, You can use this API when you want to know caller's information.
732 * @param[in] pid given pid
733 * @param[out] pkgid package id
734 * @param[in] len length of pkgid
735 * @return 0 if success, negative value(<0) if fail
736 * @retval AUL_R_OK - success
737 * @retval AUL_R_ERROR - no such a appid
741 * #include <bundle.h>
743 * static int app_reset(bundle *b, void *data)
748 * pid = atoi(bundle_get_val(b, AUL_K_CALLER_PID));
749 * aul_app_get_pkgid_bypid(pid, pkgid, sizeof(pkgid));
754 * This API is only available in User Session.
756 int aul_app_get_pkgid_bypid(int pid, char *pkgid, int len);
760 * This API get application pkgid by pid
762 * If you want to get pkgid of running application, use this API
763 * @par Typical use case:
764 * In general, You can use this API when you want to know caller's information.
766 * @param[in] pid given pid
767 * @param[out] pkgid package id
768 * @param[in] len length of pkgid
769 * @param[in] uid User ID
770 * @return 0 if success, negative value(<0) if fail
771 * @retval AUL_R_OK - success
772 * @retval AUL_R_ERROR - no such a appid
775 * This API is also available in System Session.
777 int aul_app_get_pkgid_bypid_for_uid(int pid, char *pkgid, int len, uid_t uid);
781 * This API get application appid by pid
783 * If you want to get appid of running application, use this API
784 * @par Typical use case:
785 * In general, You can use this API when you want to know caller's information.
787 * @param[in] pid given pid
788 * @param[out] appid application id
789 * @param[in] len length of pkgname
790 * @return 0 if success, negative value(<0) if fail
791 * @retval AUL_R_OK - success
792 * @retval AUL_R_ERROR - no such a appid
795 * #include <bundle.h>
797 * static int app_reset(bundle *b, void *data)
802 * pid = atoi(bundle_get_val(b,AUL_K_CALLER_PID));
803 * aul_app_get_appid_bypid(pid, appid, sizeof(appid));
808 * This API is only available in User Session.
810 int aul_app_get_appid_bypid(int pid, char *appid, int len);
814 * This API get application appid by pid
816 * If you want to get appid of running application, use this API
817 * @par Typical use case:
818 * In general, You can use this API when you want to know caller's information.
820 * @param[in] pid given pid
821 * @param[out] appid application id
822 * @param[in] len length of pkgname
823 * @param[in] uid User ID
824 * @return 0 if success, negative value(<0) if fail
825 * @retval AUL_R_OK - success
826 * @retval AUL_R_ERROR - no such a appid
828 * This API is also available in System Session.
830 int aul_app_get_appid_bypid_for_uid(int pid, char *appid, int len, uid_t uid);
834 * This API launch application associated with given filename
836 * This API is for caller.
837 * This API launch application based on mime type.
838 * This API find mime_type associated with file name,
839 * and then find default app associated with found mime_type
840 * and then launch the app with filename argument.
841 * @par Typical use case:
842 * You can launch application to process given filename.
843 * That is, Even if you don't know the specific application's pkgname,
844 * you can launch the applicaiton processing given filename .
845 * For example, If you want to process image file, you can simply launch image viewer.
846 * At that time, you can use this APIs like aul_open_file("myimage.jpg");
848 * @param[in] filename filename
849 * @return callee's pid or 0 if success, negative value if fail\n
850 * (when no found default app, return 0)
851 * @retval AUL_R_OK - success
852 * @retval AUL_R_EINVAL - invalid argument(filename)
853 * @retval AUL_R_ECOM - internal AUL IPC error
854 * @retval AUL_R_ERROR - general error
859 * int view_image_file(char *filename)
861 * aul_open_file(filename);
866 * This API is only available in User Session.
869 int aul_open_file(const char* filename);
873 * This API launch application associated with given specific mimetype
875 * This API is for caller.
876 * This API launch application based on mime type like aul_open_file API.
877 * But, This API don't find mime_type associated with file name.
878 * This API use mimetype given by user. By using given mimetype, find default application.
879 * and then launch the app with filename argument.
880 * @par Typical use case:
881 * Some files cannot extract exact mimetype automatically.
882 * For example, To know mime type of files with DRM lock, first we should unlock DRM file.
883 * In this case, You can use this API.
884 * First, unlock DRM file, and extract mimetype from unlock file by using aul_get_mime_from_file,
885 * and then, use this API with DRM file and extracted mime type.
887 * @param[in] filename filename
888 * @param[in] mimetype specific mimetype
889 * @return callee's pid or 0 if success, negative value if fail\n
890 * (when no found default app, return 0)
891 * @retval AUL_R_OK - success
892 * @retval AUL_R_EINVAL - invalid argument(filename,mimetype)
893 * @retval AUL_R_ECOM - internal AUL IPC error
894 * @retval AUL_R_ERROR - general error
897 * aul_open_file, aul_get_mime_from_file
901 * int view_drm_image_file(char *drm_filename)
904 * // you must implement this function
905 * mimetype = get_mimetype_from_drmfile(drm_filename);
907 * aul_open_file_with_mimetype(drm_filename,mimetype);
912 * This API is only available in User Session.
914 int aul_open_file_with_mimetype(const char *filename, const char *mimetype);
918 * This API launch application associated with content like "http://www.samsung.com"
920 * This API is for caller.
921 * This API launch application based on mime type.
922 * This API find mime_type associated with content,
923 * and then find default app associated with found mime_type,
924 * and then launch the app with content argument.
925 * @par Typical use case:
926 * You can launch application to process given content.
927 * That is, Even if you don't know the specific application's pkgname,
928 * you can launch the applicaiton processing given content.
929 * For example, If you want to process URL "http://www.samsung.com",
930 * you can simply launch browser.
931 * At that time, you can use this APIs like aul_open_content("http://www.samsung.com");
933 * @param[in] content content
934 * @return callee's pid or 0 if success, negative value if fail\n
935 * (when no found default app, return 0)
936 * @retval AUL_R_OK - success
937 * @retval AUL_R_EINVAL - invalid argument(content)
938 * @retval AUL_R_ECOM - internal AUL IPC error
939 * @retval AUL_R_ERROR - general error or no found mimetype
944 * int view_url(char *url)
946 * aul_open_content(url);
951 * This API is only available in User Session.
954 int aul_open_content(const char* content);
958 * This API get the default application(appid) associated with MIME type
960 * This API use to get default application associteted with mimetype
961 * In general, Setting Application need this API.
962 * @par Typical use case:
963 * Setting Application show mapping of default application / mimetype
965 * @param[in] mimetype a mime type
966 * @param[out] defapp a application appid of the app
967 * @param[in] len length of defapp
968 * @return 0 if success, negative value if fail
969 * @retval AUL_R_OK - success
970 * @retval AUL_R_EINVAL - invalid argument(mimetype)
971 * @retval AUL_R_ERROR - general error or no found mimetype
974 * aul_set_defapp_with_mime
978 * void get_text_html_defapp()
981 * aul_get_defapp_from_mime("text/html",appname,sizeof(appname));
986 * This API is only available in User Session.
989 int aul_get_defapp_from_mime(const char *mimetype, char *defapp, int len);
993 * This API set the default application(appid) associated with MIME type
995 * This API use to change default application associteted with mimetype
996 * In general, Setting Application or Installer need this API.
997 * @par Typical use case:
998 * Default Application associated with mimetype can be changed by Setting Application or installer
999 * So, application to process specific mimetype can be substituted.
1001 * @param[in] mimetype a mime type
1002 * @param[in] defapp a application appid of the app to be set
1003 * @return 0 if success, negative value if fail
1004 * @retval AUL_R_OK - success
1005 * @retval AUL_R_EINVAL - invalid argument(mimetype)
1006 * @retval AUL_R_ERROR - general error
1009 * aul_get_defapp_from_mime
1013 * void set_text_html_defapp()
1015 * aul_set_defapp_with_mime("text/html","org.tizen.browser");
1020 * This API is only available in User Session.
1022 int aul_set_defapp_with_mime(const char *mimetype, const char *defapp);
1026 * This API get the mimetype associated with filename
1028 * This API use to get mimetype associteted with given filename
1029 * In general, This API use when you want to know only mimetype given filename.
1030 * @par Typical use case:
1031 * For example, In trasfering data through bluetooth,
1032 * additional information like mimetype should be added.
1033 * In such situation, You can get mimetype by using this API.
1035 * @param[in] filename file name
1036 * @param[out] mimetype a mime type
1037 * @param[in] len length of mimetype
1038 * @return 0 if success, negative value if fail
1039 * @retval AUL_R_OK - success
1040 * @retval AUL_R_EINVAL - invalid argument(filename)
1041 * @retval AUL_R_ERROR - general error
1046 * void get_mimetype()
1048 * char mimetype[255];
1049 * aul_get_mime_from_file("image.jpg",mimetype,sizeof(mimetype));
1054 * This API is only available in User Session.
1056 int aul_get_mime_from_file(const char *filename, char *mimetype, int len);
1060 * This API get the mimetype associated with given content
1062 * This API use to get mimetype associteted with given content
1063 * In general, This API use when you want to know only mimetype given content
1064 * @par Typical use case:
1065 * For example, In trasfering data through bluetooth,
1066 * additional information like mimetype should be added.
1067 * In such situation, You can get mimetype by using this API.
1069 * @param[in] content content string like "011-0000-0000"
1070 * @param[out] mimetype a mime type
1071 * @param[in] len length of mimetype
1072 * @return 0 if success, negative value if fail
1073 * @retval AUL_R_OK - success
1074 * @retval AUL_R_EINVAL - invalid argument(content)
1075 * @retval AUL_R_ERROR - general error
1080 * void get_mimetype()
1082 * char mimetype[255];
1083 * aul_get_mime_from_content("http://www.samsung.com",mimetype,sizeof(mimetype));
1088 * This API is only available in User Session.
1090 int aul_get_mime_from_content(const char *content, char *mimetype, int len);
1094 * This API get the icon's name associated with given mimetype
1096 * This API use to get icon's name associteted with given mimetype
1097 * @par Typical use case:
1098 * If you want to show mimetype's icon, use this API.
1100 * @param[in] mimetype a mime type
1101 * @param[out] iconname icon's name
1102 * @param[in] len length of iconname
1103 * @return 0 if success, negative value if fail
1104 * @retval AUL_R_OK - success
1105 * @retval AUL_R_EINVAL - invalid argument(content)
1106 * @retval AUL_R_ERROR - general error (no such mime type)
1111 * void get_mime_icon()
1114 * aul_get_mime_icon("text/html",icon,sizeof(icon));
1119 * This API is only available in User Session.
1121 int aul_get_mime_icon(const char *mimetype, char *iconname, int len);
1125 * This API get the extensions associated with given mimetype
1127 * This API use to get extensions associteted with given mimetype
1128 * @par Typical use case:
1129 * In general, user is not familiar with mimetype(text/html),
1130 * user is familiar with extenstions(*.html, *.htm)
1131 * So, To show mimetype information to user, use this API
1133 * @param[in] mimetype a mime type
1134 * @param[out] extlist extentions (ex> mpeg,mpg,mpe)
1135 * @param[in] len length of extlist
1136 * @return 0 if success, negative value if fail
1137 * @retval AUL_R_OK - success
1138 * @retval AUL_R_EINVAL - invalid argument(mimetype)
1139 * @retval AUL_R_ERROR - general error (no mimetype or no extenstion)
1142 * aul_get_mime_description
1146 * void get_extension()
1148 * char extlist[255];
1149 * aul_get_mime_extension("text/html",extlist,sizeof(extlist));
1154 * Some mimetype don't have extension.
1155 * In that case, You can use aul_get_mime_description.
1156 * This API is only available in User Session.
1158 int aul_get_mime_extension(const char *mimetype, char *extlist, int len);
1162 * This API get the description associated with given mimetype
1164 * This API use to get description associteted with given mimetype
1165 * @par Typical use case:
1166 * In general, user is not familiar with mimetype(text/html),
1167 * user is familiar with well-knowing information like extenstions(*.html, *.htm)
1168 * But, some mimetype don't have extenstion.
1169 * At that time,to show mimetype information to user, use this API
1171 * @param[in] mimetype a mime type
1172 * @param[out] desc description (ex> Call client)
1173 * @param[in] len length of desc
1174 * @return 0 if success, negative value if fail
1175 * @retval AUL_R_OK - success
1176 * @retval AUL_R_EINVAL - invalid argument(mimetype)
1177 * @retval AUL_R_ERROR - general error (no mimetype or no descrition)
1180 * aul_get_mime_extension
1184 * void get_information_from_mime()
1187 * if(aul_get_mime_extension("text/html",info,sizeof(info))<0){
1188 * aul_get_mime_description("text/html",info,sizeof(info));
1194 * This API is only available in User Session.
1196 int aul_get_mime_description(const char *mimetype, char *desc, int len);
1200 * This API create service result bundle based on bundle received in reset event.
1202 * This API use to create result bundle to send it to caller.
1203 * @par Typical use case:
1204 * This API is for callee which provide application service.\n
1205 * To send result to caller, You must create result bundle. \n
1206 * Callee(application providing the service) can send result by using this API and aul_send_service_result.
1208 * @param[in] inb bundle received in reset event
1209 * @param[out] outb bundle to use for returning result
1210 * @return 0 if success, negative value(<0) if fail
1211 * @retval AUL_R_OK - success
1212 * @retval AUL_R_EINVAL - inb is not bundle created by aul_open_service
1213 * @retval AUL_R_ERROR - general error
1216 * To create result bundle, You need received original bundle.
1217 * The original bundle can get from app_reset handler.
1221 * aul_send_service_result
1224 * #include <bundle.h>
1226 * int app_reset(bundle *b, void *data)
1228 * ad->recved_bundle = bundle_dup(b);
1233 * bundle* res_bundle;
1234 * aul_create_result_bundle(ad->recved_bundle,&res_bundle);
1235 * bundle_add(res_bundle, "result", "1");
1236 * aul_send_service_result(res_bundle);
1240 * This API is only available in User Session.
1243 int aul_create_result_bundle(bundle *inb, bundle **outb);
1247 * This API send service result to caller with bundle
1249 * This API is used to send result bundle to caller.
1250 * @par Typical use case:
1251 * This API is for callee which provide application service.\n
1252 * To send result to caller, You can use this API after creating result bundle. \n
1253 * Callee(application to provide service) can send result by using this API and aul_create_result_bundle.
1255 * @param[in] b Result data in bundle format
1256 * @return 0 if success, negative value(<0) if fail
1257 * @retval AUL_R_OK - success
1258 * @retval AUL_R_EINVAL - invalid result bundle
1259 * @retval AUL_R_ECOMM - internal AUL IPC error
1260 * @retval AUL_R_ERROR - general error
1263 * To send result bundle, You must create result bundle.
1264 * see aul_create_result_bundle
1268 * aul_create_result_bundle
1271 * #include <bundle.h>
1273 * int app_reset(bundle *b, void *data)
1275 * ad->recved_bundle = bundle_dup(b);
1280 * bundle* res_bundle;
1281 * aul_create_result_bundle(ad->recved_bundle,&res_bundle);
1282 * bundle_add(res_bundle, "result", "1");
1283 * aul_send_service_result(res_bundle);
1287 * This API is only available in User Session.
1290 int aul_send_service_result(bundle *b);
1294 * This API sets callback fuction that will be called when applications die.
1296 * This API's purpose is to listen the application dead event.
1297 * In general, task manager Application need this API.
1299 * @param[in] func callback function
1300 * @param[in] data user data
1301 * @return 0 if success, negative value if fail
1302 * @retval AUL_R_OK - success
1303 * @retval AUL_R_ERROR - general error
1306 * aul_listen_app_launch_signal
1310 * int app_dead_handler(int pid, void *data)
1312 * printf("===> %s : %d\n", __FUNCTION__, pid);
1316 * void dead_listen()
1318 * aul_listen_app_dead_signal(app_dead_handler, NULL);
1323 * This API is only available in User Session.
1326 int aul_listen_app_dead_signal(int (*func) (int, void *), void *data);
1330 * This API sets callback fuction that will be called when applications are launched.
1332 * This API's purpose is to listen the application launching event.
1333 * In general, task manager Application need this API.
1335 * @param[in] func callback function
1336 * @param[in] data user data
1337 * @return 0 if success, negative value if fail
1338 * @retval AUL_R_OK - success
1339 * @retval AUL_R_ERROR - general error
1342 * aul_listen_app_dead_signal
1346 * int app_launch_handler(int pid, void *data)
1348 * printf("===> %s : %d\n", __FUNCTION__, pid);
1352 * void dead_listen()
1354 * aul_listen_app_launch_signal(app_launch_handler, NULL);
1359 * This API is only available in User Session.
1362 int aul_listen_app_launch_signal(int (*func) (int, void *), void *data);
1366 * This API gets status of specified application process id.
1368 * This API's purpose is to get the application's status.
1370 * @param[in] pid pid of application
1371 * @return 0 or greater if success, nagative value if fail
1372 * @retval STATUS_LAUNCHING
1373 * @retval STATUS_CREATED
1374 * @retval STATUS_FOCUS
1375 * @retval STATUS_VISIBLE
1377 * @retval STATUS_DYING
1378 * @retval STATUS_HOME
1379 * @retval STATUS_NORESTART
1385 * int iterfunc(const aul_app_info *info, void *data)
1388 * status = aul_app_get_status_bypid(info->pid);
1389 * if (status == STATUS_FOCUS) {
1390 * printf("%s has focus", info->app_id);
1391 * (int *)data = info->pid;
1397 * int find_focus_app_pid()
1400 * aul_app_get_running_app_info(iterfunc, &pid);
1405 * This API is only available in User Session.
1407 int aul_app_get_status_bypid(int pid);
1411 * This API sets callback function that on application status changed.
1413 * This API's purpose is to listen the application's status changed within
1414 * the caller process. In general, a library that required to release resource on
1415 * application's status may use this API.
1417 * @param[in] func callback function
1418 * @param[in] data user data
1419 * @return 0 if success, negative value if fail
1420 * @retval AUL_R_OK - success
1421 * @retval AUL_R_ERROR - general error
1423 * aul_remove_status_local_cb
1427 * int status_changed(int status, void *data)
1429 * if (status == STATUS_FOCUS)
1430 * printf("%d has focus\n", getpid());
1432 * if (status == STATUS_VISIBLE)
1433 * printf("%d resume\n", getpid());
1435 * if (status == STATUS_BG0
1436 * printf("%d pause\n", getpid());
1439 * void listen_app_status()
1441 * aul_add_status_local_cb(status_changed, NULL);
1445 * This API is only available in User Session.
1448 int aul_add_status_local_cb(int (*func) (int, void *), void *data);
1452 * This API unsets callback function that on application status changed.
1454 * This API's purpose is to remove callback that added by
1455 * aul_add_status_local_cb.
1457 * @param[in] func callback function
1458 * @param[in] data user data
1459 * @return 0 if success, negative value if fail
1460 * @retval AUL_R_OK - success
1461 * @retval AUL_R_ERROR - general error
1464 * aul_add_status_local_cb
1468 * int status_changed(int status, void *data)
1470 * if (status == STATUS_FOCUS)
1471 * printf("%d has focus\n", getpid());
1473 * if (status == STATUS_VISIBLE)
1474 * printf("%d resume\n", getpid());
1476 * if (status == STATUS_BG0
1477 * printf("%d pause\n", getpid());
1480 * void listen_app_status()
1482 * aul_add_status_local_cb(status_changed, NULL);
1485 * void ignore_app_status()
1487 * aul_remove_status_local_cb(status_changed, NULL);
1492 * This API is only available in User Session.
1495 int aul_remove_status_local_cb(int (*func) (int, void *), void *data);
1498 * This API is only for Appfw internally.
1500 int aul_terminate_bgapp_pid(int pid);
1503 * This API is only for Appfw internally.
1505 int aul_terminate_pid_without_restart(int pid);
1508 * This API is only for Appfw internally.
1510 const char *aul_get_app_external_root_path(void);
1513 * This API is only for Appfw internally.
1515 const char *aul_get_app_root_path(void);
1518 * This API is only for Appfw internally.
1520 const char *aul_get_app_data_path(void);
1523 * This API is only for Appfw internally.
1525 const char *aul_get_app_cache_path(void);
1528 * This API is only for Appfw internally.
1530 const char *aul_get_app_resource_path(void);
1533 * This API is only for Appfw internally.
1535 const char *aul_get_app_tep_resource_path(void);
1538 * This API is only for Appfw internally.
1540 const char *aul_get_app_shared_data_path(void);
1543 * This API is only for Appfw internally.
1545 const char *aul_get_app_shared_resource_path(void);
1548 * This API is only for Appfw internally.
1550 const char *aul_get_app_shared_trusted_path(void);
1553 * This API is only for Appfw internally.
1555 const char *aul_get_app_external_data_path(void);
1558 * This API is only for Appfw internally.
1560 const char *aul_get_app_external_cache_path(void);
1563 * This API is only for Appfw internally.
1565 const char *aul_get_app_external_shared_data_path(void);
1568 * This API is only for Appfw internally.
1570 const char *aul_get_app_specific_path(void);
1573 * This API is only for Appfw internally.
1575 const char *aul_get_app_external_specific_path(void);
1578 * This API is only for Appfw internally.
1580 int aul_get_app_shared_data_path_by_appid(const char *app_id, char **path);
1583 * This API is only for Appfw internally.
1585 int aul_get_app_shared_resource_path_by_appid(const char *app_id, char **path);
1588 * This API is only for Appfw internally.
1590 int aul_get_app_shared_trusted_path_by_appid(const char *app_id, char **path);
1593 * This API is only for Appfw internally.
1595 int aul_get_app_external_shared_data_path_by_appid(const char *app_id, char **path);
1598 * This API is only for Appfw internally.
1600 int aul_get_usr_app_shared_data_path_by_appid(const char *app_id, char **path, uid_t uid);
1603 * This API is only for Appfw internally.
1605 int aul_get_usr_app_shared_resource_path_by_appid(const char *app_id, char **path, uid_t uid);
1608 * This API is only for Appfw internally.
1610 int aul_get_usr_app_shared_trusted_path_by_appid(const char *app_id, char **path, uid_t uid);
1613 * This API is only for Appfw internally.
1615 int aul_get_usr_app_external_shared_data_path_by_appid(const char *app_id, char **path, uid_t uid);
1618 * This type is only for Appfw internally.
1620 typedef int (*subapp_fn)(void *data);
1623 * This API is only for Appfw internally.
1625 int aul_set_subapp(subapp_fn cb, void *data);
1628 * This API is only for Appfw internally.
1630 int aul_subapp_terminate_request_pid(int pid);
1633 * This API is only for Appfw internally.
1635 int aul_is_subapp(void);
1638 * This API is only for Appfw internally.
1640 int aul_kill_pid(int pid);
1643 * This API is only for Appfw internally.
1645 int aul_add_caller_cb(int pid, void (*caller_cb) (int, void *), void *data);
1648 * This API is only for Appfw internally.
1650 int aul_remove_caller_cb(int pid);
1653 * This API is only for Appfw internally.
1655 int aul_invoke_caller_cb(int pid);
1658 * This API is only for Appfw internally.
1660 void aul_set_preinit_window(void *evas_object);
1663 * This API is only for Appfw internally.
1665 void* aul_get_preinit_window(const char *win_name);
1668 * This API is only for Appfw internally.
1670 void aul_set_preinit_background(void *evas_object);
1673 * This API is only for Appfw internally.
1675 void* aul_get_preinit_background(void);
1678 * This API is only for Appfw internally.
1680 void aul_set_preinit_conformant(void *evas_object);
1683 * This API is only for Appfw internally.
1685 void* aul_get_preinit_conformant(void);
1688 * This API is only for Appfw internally.
1690 void aul_set_preinit_appid(const char *appid);
1693 * This API is only for Appfw internally.
1695 void aul_set_preinit_pkgid(const char *pkgid);
1698 * This API is only for Appfw internally.
1700 int aul_update_freezer_status(int pid, const char* type);
1703 * This API is only for Appfw internally.
1705 int aul_send_app_launch_request_signal(int pid, const char* appid, const char* pkgid, const char* type);
1708 * This API is only for Appfw internally.
1710 int aul_send_app_resume_request_signal(int pid, const char* appid, const char* pkgid, const char *type);
1713 * This API is only for Appfw internally.
1715 int aul_send_app_terminate_request_signal(int pid, const char* appid, const char* pkgid, const char *type);
1718 * This API is only for Appfw internally.
1720 int aul_send_app_status_change_signal(int pid, const char* appid, const char* pkgid, const char* status, const char *type);
1723 * This API is only for Appfw internally.
1725 int aul_send_app_terminated_signal(int pid);
1728 * This API is only for Appfw internally.
1730 int aul_send_app_group_signal(int owner_pid, int child_pid, const char *child_pkgid);
1733 * This API is only for Appfw internally.
1735 int aul_invoke_status_local_cb(int status);
1738 * This type is only for Appfw internally.
1740 typedef int (*data_control_provider_handler_fn) (bundle *b, int request_id, void *data);
1743 * This API is only for Appfw internally.
1745 int aul_set_data_control_provider_cb(data_control_provider_handler_fn handler);
1748 * This API is only for Appfw internally.
1750 int aul_unset_data_control_provider_cb(void);
1753 * This API is only for Appfw internally.
1755 int aul_pause_app(const char *appid);
1758 * This API is only for Appfw internally.
1760 int aul_pause_pid(int pid);
1763 * This API is only for Appfw internally.
1765 int aul_reload_appinfo(void);
1768 * This API is only for Appfw internally.
1770 int aul_status_update(int status);
1773 * This API is only for Appfw internally.
1775 int aul_running_list_update(char *appid, char *app_path, char *pid);
1778 * This API is only for Appfw internally.
1780 void aul_app_group_add(int leader_pid, int pid, int wid);
1783 * This API is only for Appfw internally.
1785 void aul_app_group_remove(int pid);
1788 * This API is only for Appfw internally.
1790 void aul_app_group_attach_window(int parent_wid, int child_wid);
1793 * This API is only for Appfw internally.
1795 void aul_app_group_detach_window(int child_wid);
1798 * This API is only for Appfw internally.
1800 int aul_app_group_get_window(int pid);
1803 * This API is only for Appfw internally.
1805 int aul_app_group_get_window(int pid);
1808 * This API is only for Appfw internally.
1810 int aul_app_group_set_window(int wid);
1813 * This API is only for Appfw internally.
1815 void aul_app_group_get_leader_pids(int *cnt, int **pids);
1818 * This API is only for Appfw internally.
1820 void aul_app_group_get_group_pids(int leader_pid, int *cnt, int **pids);
1823 * This API is only for Appfw internally.
1825 int aul_app_group_get_leader_pid(int pid);
1828 * This API is only for Appfw internally.
1830 int aul_app_group_clear_top(void);
1833 * This API is only for Appfw internally.
1835 int aul_app_group_is_top(void);
1838 * This API is only for Appfw internally.
1840 int aul_app_group_get_fg_flag(int pid);
1843 * This API is only for Appfw internally.
1845 void aul_app_group_lower(int *exit);
1848 * This API is only for Appfw internally.
1850 void aul_app_group_get_idle_pids(int *cnt, int **pids);
1853 * This API is only for Appfw internally.
1855 int aul_request_data_control_socket_pair(bundle *b, int *fd);
1858 * This API is only for Appfw internally.
1860 int aul_listen_booting_done_signal(int (*func) (int, void *), void *data);
1863 * This API is only for Appfw internally.
1865 int aul_listen_cooldown_signal(int (*func) (const char *, void *), void *data);
1868 * This API is only for Appfw internally.
1870 int aul_listen_app_status_signal(int (*func) (int, int, void *), void *data);
1873 * This API is only for Appfw internally.
1875 int aul_check_tep_mount(const char *tep_path);
1878 * This API is only for Appfw internally.
1880 int aul_is_tep_mount_dbus_done(const char *tep_string);
1883 * This API is only for Appfw internally.
1885 int aul_forward_app(const char *appid, bundle *kb);
1889 * This API create custom launchpad-loader
1891 * This API's purpose is to make a slot for custom loader.
1892 * Once it is made, added loader will make a candidate process to use.
1894 * @param[in] loader_path The file name of the custom loader binary including full path
1895 * @return Loader ID if success, negative value(<0) if fail
1898 * This API is only for Appfw internally.
1899 * This API is only available in User Session.
1901 int aul_add_loader(const char *loader_path);
1905 * This API destroy custom launchpad-loader
1907 * This API's purpose is to remove a slot for custom loader.
1908 * Once it is removed, the prepared process will be removed as well.
1910 * @param[in] loader_id Loader ID
1911 * @return 0 if success, negative value(<0) if fail
1914 * This API is only for Appfw internally.
1915 * This API is only available in User Session.
1917 int aul_remove_loader(int loader_id);
1921 * This API gets specified application process id.
1923 * The purpose of this API is to get the pid of specified application.
1925 * @param[in] appid application name
1926 * @return callee's pid if success, negative value(<0) if fail
1929 * This API is only available in User Session.
1931 int aul_app_get_pid(const char *appid);
1937 #endif /* __AUL_H__ */