summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSeungha Son <seungha.son@samsung.com>2017-08-17 09:28:46 +0900
committerSeungha Son <seungha.son@samsung.com>2017-08-31 09:14:36 +0900
commit04e7b01d2f5a31d1ec0ceb2ce58201effdd0b29f (patch)
tree633b72f180c5e2947e0cb93b8664435726bd3289 /include
parent4c9f6554fc7c544facf71422a2b4116aac9718cd (diff)
downloadminicontrol-04e7b01d2f5a31d1ec0ceb2ce58201effdd0b29f.tar.gz
minicontrol-04e7b01d2f5a31d1ec0ceb2ce58201effdd0b29f.tar.bz2
minicontrol-04e7b01d2f5a31d1ec0ceb2ce58201effdd0b29f.zip
Signed-off-by: Seungha Son <seungha.son@samsung.com> Change-Id: I4df3905b370a8e6b6d8476883306ab1cb8046158
Diffstat (limited to 'include')
-rw-r--r--include/minicontrol-private.h55
-rwxr-xr-xinclude/minicontrol-provider.h10
-rwxr-xr-xinclude/minicontrol-viewer.h11
3 files changed, 74 insertions, 2 deletions
diff --git a/include/minicontrol-private.h b/include/minicontrol-private.h
new file mode 100644
index 0000000..abf0579
--- /dev/null
+++ b/include/minicontrol-private.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2017 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 __MINICONTROL_PRIVATE_H__
+#define __MINICONTROL_PRIVATE_H__
+
+#include <system_info.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define MINICONTROL_FEATURE "http://tizen.org/feature/minicontrol"
+#define CHECK_MINICONTROL_FEATURE() \
+ do { \
+ bool is_supported = false; \
+ if (!system_info_get_platform_bool(MINICONTROL_FEATURE, &is_supported)) { \
+ if (is_supported == false) { \
+ LOGE("[%s] feature is disabled", MINICONTROL_FEATURE); \
+ return MINICONTROL_ERROR_NOT_SUPPORTED; \
+ } \
+ } \
+ } while (0)
+
+#define CHECK_MINICONTROL_FEATURE_RET_NULL() \
+ do { \
+ bool is_supported = false; \
+ if (!system_info_get_platform_bool(MINICONTROL_FEATURE, &is_supported)) { \
+ if (is_supported == false) { \
+ LOGE("[%s] feature is disabled", MINICONTROL_FEATURE); \
+ set_last_result(MINICONTROL_ERROR_NOT_SUPPORTED); \
+ return NULL; \
+ } \
+ } \
+ } while (0)
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __MINICONTROL_PRIVATE_H__ */
+
diff --git a/include/minicontrol-provider.h b/include/minicontrol-provider.h
index dba4e32..2ee2e37 100755
--- a/include/minicontrol-provider.h
+++ b/include/minicontrol-provider.h
@@ -53,12 +53,19 @@ typedef void (*minicontrol_event_cb)(minicontrol_viewer_event_e event_type, bund
/**
* @brief Creates a window for minicontrol.
* @since_tizen 2.4
+ * @remarks The specific error code can be obtained using the gat_last_result() method. Error codes are described in Exception section.
* @param[in] name Name of minicontrol socket window
* @param[in] target_viewer Target viewer for minicontrol. You can select multiple viewers by using bitwise OR operator
* @param[in] callback A callback function for events originated by minicontrol viewer
- * @return Evas object of socket window. @c NULL failed to create, get_last_result() will return reason of failure
+ * @return Evas object of minicontrol. NULL on error
+ * @exception #MINICONTROL_ERROR_NONE Success
+ * @exception #MINICONTROL_ERROR_INVALID_PARAMETER Invalid argument
+ * @exception #MINICONTROL_ERROR_ELM_FAILURE Some error occurred when creating a minicontrol window
+ * @exception #MINICONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @exception #MINICONTROL_ERROR_NOT_SUPPORTED Not supported
* @see #minicontrol_target_viewer_e
* @see #minicontrol_event_cb
+ * @see get_last_result()
*/
Evas_Object *minicontrol_create_window(const char *name, minicontrol_target_viewer_e target_viewer, minicontrol_event_cb callback);
@@ -72,6 +79,7 @@ Evas_Object *minicontrol_create_window(const char *name, minicontrol_target_view
* @return #MINICONTROL_ERROR_NONE on success,
* otherwise an error code on failure
* @retval #MINICONTROL_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #MINICONTROL_ERROR_NOT_SUPPORTED Not supported
* @see #minicontrol_provider_event_e
* @see #minicontrol_create_window
*/
diff --git a/include/minicontrol-viewer.h b/include/minicontrol-viewer.h
index 0599794..e8d1020 100755
--- a/include/minicontrol-viewer.h
+++ b/include/minicontrol-viewer.h
@@ -41,9 +41,15 @@ extern "C" {
/**
* @brief Adds minicontrol named as "minicontrol_name" to a given parent evas object and returns it.
* @since_tizen 2.4
+ * @remarks The specific error code can be obtained using the gat_last_result() method. Error codes are described in Exception section.
* @param[in] parent Minicontrol object will be added to this parent evas object
* @param[in] minicontrol_name Name of minicontrol
- * @return Evas object of minicontrol. @c NULL failed to add, get_last_result() will return reason of failure
+ * @return Evas object of minicontrol. NULL on error
+ * @exception #MINICONTROL_ERROR_NONE Success
+ * @exception #MINICONTROL_ERROR_INVALID_PARAMETER Invalid argument
+ * @exception #MINICONTROL_ERROR_ELM_FAILURE Some error occurred when creating a minicontrol window
+ * @exception #MINICONTROL_ERROR_NOT_SUPPORTED Not supported
+ * @see get_last_result()
*/
Evas_Object *minicontrol_viewer_add(Evas_Object *parent, const char *minicontrol_name);
@@ -56,6 +62,7 @@ Evas_Object *minicontrol_viewer_add(Evas_Object *parent, const char *minicontrol
* @return #MINICONTROL_ERROR_NONE on success,
* otherwise an error code on failure
* @retval #MINICONTROL_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #MINICONTROL_ERROR_NOT_SUPPORTED Not supported
* @see #minicontrol_viewer_event_e
*/
int minicontrol_viewer_send_event(const char *minicontrol_name, minicontrol_viewer_event_e event, bundle *event_arg);
@@ -81,6 +88,7 @@ typedef void (*minicontrol_viewer_event_cb)(minicontrol_event_e event, const cha
* @retval #MINICONTROL_ERROR_INVALID_PARAMETER Invalid argument
* @retval #MINICONTROL_ERROR_IPC_FAILURE IPC failure
* @retval #MINICONTROL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MINICONTROL_ERROR_NOT_SUPPORTED Not supported
* @see #minicontrol_viewer_unset_event_cb
* @see #minicontrol_viewer_event_cb
*/
@@ -91,6 +99,7 @@ int minicontrol_viewer_set_event_cb(minicontrol_viewer_event_cb callback, void *
* @since_tizen 2.4
* @return #MINICONTROL_ERROR_NONE if success,
* other value if failure
+ * @retval #MINICONTROL_ERROR_NOT_SUPPORTED Not supported
* @see #minicontrol_viewer_set_event_cb
*/
int minicontrol_viewer_unset_event_cb(void);