Move function definition to aul header
[platform/core/appfw/aul-1.git] / src / 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 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 int aul_initialize(void);
26 int aul_is_initialized(void);
27 int aul_app_register_pid(const char *appid, int pid);
28
29 int app_send_cmd(int pid, int cmd, bundle *kb);
30 int app_send_cmd_for_uid(int pid, uid_t uid, int cmd, bundle *kb);
31 int app_send_cmd_with_noreply(int pid, int cmd, bundle *kb);
32 int app_send_cmd_to_launchpad(const char *pad_type, uid_t uid, int cmd, bundle *kb);
33 int app_request_to_launchpad_for_uid(int cmd, const char *pkgname, bundle *kb, uid_t uid);
34
35 int app_result(int cmd, bundle *kb, int launched_pid);
36 int aul_send_result(bundle *kb, int is_cancel);
37 int aul_launch_app_with_result(const char *pkgname, bundle *kb,
38                                void (*cbfunc) (bundle *, int, void *),
39                                void *data);
40 int aul_launch_app_with_result_for_uid(const char *pkgname, bundle *kb,
41                                void (*cbfunc) (bundle *, int, void *),
42                                void *data, uid_t uid);
43 int app_subapp_terminate_request(void);
44
45 int app_com_recv(bundle *b);
46 int aul_launch_app_with_result_async(const char *appid, bundle *b,
47                 void (*callback)(bundle *, int, void *), void *data);
48 int aul_launch_app_with_result_async_for_uid(const char *appid, bundle *b,
49                 void (*callback)(bundle *, int, void *), void *data, uid_t uid);
50 int aul_resume_local(void);
51 int aul_launch_fini(void);
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);
56 int aul_send_resume_request_for_uid(const char *appid, bundle *b, uid_t uid,
57                 void (*error_cb)(int, void *), void *user_data);
58 void aul_set_instance_info(const char *app_id, bundle *kb);
59
60 #ifdef __cplusplus
61 }
62 #endif