summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorJunghoon, Park <jh9216.park@samsung.com>2015-11-13 17:45:35 +0900
committerJunghoon, Park <jh9216.park@samsung.com>2015-11-16 11:42:35 +0900
commitad1a35219f47af9788b1a9ed0477215604b25a39 (patch)
tree4594d4540571a32a1f11ee946b1e76870820c1d5 /inc
parentb697f1cbbfedb8398abb4a2304abc51e5023d153 (diff)
downloadlaunchpad-ad1a35219f47af9788b1a9ed0477215604b25a39.tar.gz
launchpad-ad1a35219f47af9788b1a9ed0477215604b25a39.tar.bz2
launchpad-ad1a35219f47af9788b1a9ed0477215604b25a39.zip
Change-Id: Ic929c89fa1f8b77172846423a1658009b142a99e Signed-off-by: Junghoon, Park <jh9216.park@samsung.com>
Diffstat (limited to 'inc')
-rw-r--r--inc/launchpad.h64
-rw-r--r--inc/launchpad_common.h8
2 files changed, 64 insertions, 8 deletions
diff --git a/inc/launchpad.h b/inc/launchpad.h
new file mode 100644
index 0000000..37d50ed
--- /dev/null
+++ b/inc/launchpad.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __LAUNCHPAD_H__
+#define __LAUNCHPAD_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*loader_create_cb)(int argc, char **argv, int type, void *user_data);
+typedef int (*loader_launch_cb)(int argc, char **argv, const char *app_path,
+ const char *appid, const char *pkgid, const char *pkg_type, void *user_data);
+typedef int (*loader_terminate_cb)(int argc, char **argv, void *user_data);
+
+typedef void (*loader_receiver_cb)(int fd);
+typedef void (*loader_loop_begin_cb)(void *user_data);
+typedef void (*loader_loop_quit_cb)(void *user_data);
+typedef void (*loader_add_fd_cb)(void *user_data, int fd, loader_receiver_cb receiver);
+typedef void (*loader_remove_fd_cb)(void *user_data, int fd);
+
+typedef struct {
+ loader_create_cb create;
+ loader_launch_cb launch;
+ loader_terminate_cb terminate;
+} loader_lifecycle_callback_s;
+
+typedef struct {
+ loader_loop_begin_cb loop_begin;
+ loader_loop_quit_cb loop_quit;
+ loader_add_fd_cb add_fd;
+ loader_remove_fd_cb remove_fd;
+} loader_adapter_s;
+
+enum LAUNCHPAD_TYPE {
+ LAUNCHPAD_TYPE_UNSUPPORTED = -1,
+ LAUNCHPAD_TYPE_COMMON,
+ LAUNCHPAD_TYPE_SW,
+ LAUNCHPAD_TYPE_HW,
+ LAUNCHPAD_TYPE_MAX
+};
+
+int launchpad_loader_main(int argc, char **argv, loader_lifecycle_callback_s *callbacks, loader_adapter_s *adapter, void *user_data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __LAUNCHPAD_H__ */
+
diff --git a/inc/launchpad_common.h b/inc/launchpad_common.h
index e677be7..0934a0c 100644
--- a/inc/launchpad_common.h
+++ b/inc/launchpad_common.h
@@ -65,14 +65,6 @@ typedef struct _app_pkt_t {
unsigned char data[1];
} app_pkt_t;
-enum LAUNCHPAD_TYPE {
- LAUNCHPAD_TYPE_UNSUPPORTED = -1,
- LAUNCHPAD_TYPE_COMMON,
- LAUNCHPAD_TYPE_SW,
- LAUNCHPAD_TYPE_HW,
- LAUNCHPAD_TYPE_MAX
-};
-
char *_proc_get_cmdline_bypid(int pid);
app_info_from_db *_get_app_info_from_bundle_by_pkgname(const char *pkgname, bundle *kb);
void _modify_bundle(bundle * kb, int caller_pid, app_info_from_db * menu_info, int cmd);