2 * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
25 #include <sys/socket.h>
30 #define LOG_TAG "DEBUG_LAUNCHPAD"
33 #define _E(fmt, arg...) LOGE(fmt, ##arg)
34 #define _D(fmt, arg...) LOGD(fmt, ##arg)
35 #define _W(fmt, arg...) LOGW(fmt, ##arg)
37 #define SOCKET_PATH "/run/aul"
38 #define MAX_LOCAL_BUFSZ 128
39 #define AUL_SOCK_MAXBUFF 131071
41 #define PAD_CMD_LAUNCH 0
43 typedef struct _app_pkt_t {
47 unsigned char data[1];
53 char *original_app_path;
63 int _create_server_sock(void);
64 app_pkt_t *_recv_pkt_raw(int fd, int *clifd, struct ucred *cr);
65 appinfo_t *_appinfo_create(bundle *kb);
66 void _appinfo_free(appinfo_t *appinfo);
67 void _modify_bundle(bundle *kb, int caller_pid, appinfo_t *appinfo, int cmd);
68 void _set_env(appinfo_t *app_info, bundle *kb);
69 char **_create_argc_argv(bundle *kb, int *margc, const char *app_path);
70 int _proc_check_cmdline_bypid(int pid);
71 void _prepare_listen_sock(void);
73 #endif /* __COMMON_H__ */