summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2019-02-03 18:39:40 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2019-02-18 21:37:29 +0900
commit4cb2e1286c9e314e4b819d96e44d49bfe24f443e (patch)
tree5376d23beb8777a69f88dddc1523154f68ef809a /include
parente04359fa6d8f7b6a8304c4e1a8d55badca74daf1 (diff)
downloadapp-core-4cb2e1286c9e314e4b819d96e44d49bfe24f443e.tar.gz
app-core-4cb2e1286c9e314e4b819d96e44d49bfe24f443e.tar.bz2
app-core-4cb2e1286c9e314e4b819d96e44d49bfe24f443e.zip
Support handling of each app-control ID
Requires: - https://review.tizen.org/gerrit/#/c/platform/core/appfw/aul-1/+/199252/ - https://review.tizen.org/gerrit/#/c/platform/core/appfw/app-core/+/199104/ - https://review.tizen.org/gerrit/#/c/platform/core/api/app-control/+/199105/ Change-Id: Ic02def5706302642d90c20a2f7bdde5700976f0e Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/appcore_base.h9
-rw-r--r--include/appcore_base_control.h37
2 files changed, 46 insertions, 0 deletions
diff --git a/include/appcore_base.h b/include/appcore_base.h
index 4d4ccea..760cade 100644
--- a/include/appcore_base.h
+++ b/include/appcore_base.h
@@ -18,6 +18,7 @@
#include <stdbool.h>
#include <libintl.h>
+#include <errno.h>
#include <bundle.h>
#include <aul.h>
@@ -56,6 +57,14 @@ enum appcore_base_display_state {
APPCORE_BASE_DISPLAY_STATE_OFF,
};
+typedef enum {
+ APPCORE_BASE_ERROR_NONE = 0,
+ APPCORE_BASE_ERROR_INVALID_PARAMETER = -EINVAL,
+ APPCORE_BASE_ERROR_OUT_OF_MEMORY = -ENOMEM,
+ APPCORE_BASE_ERROR_KEY_NOT_FOUND = -ENOKEY,
+ APPCORE_BASE_ERROR_IO_ERROR = -EIO,
+} appcore_base_error_e;
+
typedef int (*appcore_base_event_cb)(void *event, void *data);
typedef void *appcore_base_event_h;
diff --git a/include/appcore_base_control.h b/include/appcore_base_control.h
new file mode 100644
index 0000000..ffc6832
--- /dev/null
+++ b/include/appcore_base_control.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2019 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.
+ */
+
+#pragma once
+
+#include <bundle.h>
+
+#include "appcore_base.h"
+
+typedef void *appcore_base_control_h;
+
+typedef void (*appcore_base_control_cb)(bundle *b, void *user_data);
+
+int appcore_base_control_init(void);
+
+void appcore_base_control_fini(void);
+
+int appcore_base_control_invoke(bundle *b);
+
+int appcore_base_control_add(const char *id,
+ appcore_base_control_cb callback, void *user_data,
+ appcore_base_control_h *h);
+
+int appcore_base_control_remove(appcore_base_control_h h);