Release version 0.21.1
[platform/core/appfw/aul-1.git] / include / launch.h
1 /*
2  * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #pragma once
18
19 #include <glib.h>
20
21 int aul_initialize();
22 int aul_is_initialized();
23 int aul_app_register_pid(const char *appid, int pid);
24
25 int app_send_cmd(int pid, int cmd, bundle *kb);
26 int app_send_cmd_for_uid(int pid, uid_t uid, int cmd, bundle *kb);
27 int app_send_cmd_with_noreply(int pid, int cmd, bundle *kb);
28 int app_send_cmd_to_launchpad(const char *pad_type, uid_t uid, int cmd, bundle *kb);
29 int app_request_to_launchpad(int cmd, const char *pkgname, bundle *kb);
30 int app_request_to_launchpad_for_uid(int cmd, const char *pkgname, bundle *kb, uid_t uid);
31
32 int app_result(int cmd, bundle *kb, int launched_pid);
33 int aul_send_result(bundle *kb, int is_cancel);
34 int aul_launch_app_with_result(const char *pkgname, bundle *kb,
35                                void (*cbfunc) (bundle *, int, void *),
36                                void *data);
37 int aul_launch_app_with_result_for_uid(const char *pkgname, bundle *kb,
38                                void (*cbfunc) (bundle *, int, void *),
39                                void *data, uid_t uid);
40 int app_subapp_terminate_request(void);
41
42 int app_com_recv(bundle *b);
43 int aul_launch_app_with_result_async(const char *appid, bundle *b,
44                 void (*callback)(bundle *, int, void *), void *data);
45 int aul_launch_app_with_result_async_for_uid(const char *appid, bundle *b,
46                 void (*callback)(bundle *, int, void *), void *data, uid_t uid);
47 int aul_resume_local(void);
48 int aul_launch_fini(void);
49 int aul_send_launch_request_for_uid(const char *appid, bundle *b, uid_t uid,
50                 void (*reply_cb)(bundle *b, int, void *),
51                 void (*error_cb)(int, void *), void *user_data);
52 int aul_send_launch_request_sync_for_uid(const char *appid, bundle *b,
53                 uid_t uid, bundle **res_b);
54 int app_request_local(int cmd, bundle *kb);
55 int aul_subapp_terminate_request(const char *instance_id, int pid);