summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:37:44 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:37:44 +0900
commit07eb0c3cb8e30e74db35671045b42676f94e4a28 (patch)
treebdfd14b110afb51544b48fb9e478aab546cb2a9b /include
parent96c080d65747c89d1b3a0c78460e0f0a7ad08a2f (diff)
downloadminicontrol-07eb0c3cb8e30e74db35671045b42676f94e4a28.tar.gz
minicontrol-07eb0c3cb8e30e74db35671045b42676f94e4a28.tar.bz2
minicontrol-07eb0c3cb8e30e74db35671045b42676f94e4a28.zip
Tizen 2.1 base
Diffstat (limited to 'include')
-rwxr-xr-xinclude/minicontrol-error.h43
-rwxr-xr-xinclude/minicontrol-internal.h48
-rwxr-xr-xinclude/minicontrol-log.h75
-rwxr-xr-xinclude/minicontrol-monitor.h79
-rwxr-xr-xinclude/minicontrol-provider.h50
-rwxr-xr-xinclude/minicontrol-type.h57
-rwxr-xr-xinclude/minicontrol-viewer.h48
-rwxr-xr-xinclude/minicontrol.h24
8 files changed, 424 insertions, 0 deletions
diff --git a/include/minicontrol-error.h b/include/minicontrol-error.h
new file mode 100755
index 0000000..3b16ff9
--- /dev/null
+++ b/include/minicontrol-error.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _MINICTRL_ERROR_H_
+#define _MINICTRL_ERROR_H_
+
+/**
+ * @defgroup MINICONTROL_LIBRARY_ERROR_TYPE minicontrol monitor error type
+ * @brief minicontrol library error type
+ */
+
+/**
+ * @addtogroup MINICONTROL_LIBRARY_ERROR_TYPE
+ * @{
+ */
+
+/**
+ * @breief Enumeration describing error code of minicontrol library
+ */
+typedef enum _minicontrol_error {
+ MINICONTROL_ERROR_NONE = 0,
+ MINICONTROL_ERROR_INVALID_PARAMETER = -1,
+ MINICONTROL_ERROR_OUT_OF_MEMORY = -2,
+ MINICONTROL_ERROR_DBUS = -3,
+ MINICONTROL_ERROR_UNKNOWN = -100,
+}minicontrol_error_e;
+
+#endif /* _MINICTRL_ERROR_H_ */
+
+
diff --git a/include/minicontrol-internal.h b/include/minicontrol-internal.h
new file mode 100755
index 0000000..61b22f5
--- /dev/null
+++ b/include/minicontrol-internal.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _MINICTRL_INTERNAL_H_
+#define _MINICTRL_INTERNAL_H_
+
+#include <dbus/dbus.h>
+#include "minicontrol-type.h"
+
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__ ((visibility("default")))
+#endif /* EXPORT_API */
+
+#define MINICTRL_DBUS_SIG_START "minicontrol_start"
+#define MINICTRL_DBUS_SIG_STOP "minicontrol_stop"
+#define MINICTRL_DBUS_SIG_RESIZE "minicontrol_resize"
+#define MINICTRL_DBUS_SIG_RUNNING_REQ "minicontrol_running_request"
+#define MINICTRL_DBUS_SIG_REQUEST "minicontrol_request"
+
+typedef struct _minictrl_sig_handle minictrl_sig_handle;
+
+int _minictrl_provider_message_send(const char *sig_name, const char *svr_name,
+ unsigned int witdh, unsigned int height,
+ minicontrol_priority_e priority);
+
+int _minictrl_viewer_req_message_send(void);
+
+minictrl_sig_handle *_minictrl_dbus_sig_handle_attach(const char *signal,
+ void (*callback) (void *data, DBusMessage *msg),
+ void *data);
+
+void _minictrl_dbus_sig_handle_dettach(minictrl_sig_handle *handle);
+
+#endif /* _MINICTRL_INTERNAL_H_ */
+
diff --git a/include/minicontrol-log.h b/include/minicontrol-log.h
new file mode 100755
index 0000000..899c373
--- /dev/null
+++ b/include/minicontrol-log.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _MINICTRL_LOG_H_
+#define _MINICTRL_LOG_H_
+
+#include <stdio.h>
+#include <string.h>
+
+#ifdef MINICTRL_USE_DLOG
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "libminicontrol"
+#define DBG(fmt , args...) \
+ do{ \
+ LOGD("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
+ } while(0)
+
+#define INFO(fmt , args...) \
+ do{ \
+ LOGI("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
+ } while(0)
+
+#define WARN(fmt , args...) \
+ do{ \
+ LOGI("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
+ } while(0)
+
+#define ERR(fmt , args...) \
+ do{ \
+ LOGI("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
+ } while(0)
+
+#else /* MINICTRL_USE_DLOG */
+#define DBG(fmt , args...) \
+ do{ \
+ printf("[D][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
+ } while(0)
+
+#define INFO(fmt , args...) \
+ do{ \
+ printf("[I][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
+ } while(0)
+
+#define WARN(fmt , args...) \
+ do{ \
+ printf("[W][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
+ } while(0)
+
+#define ERR(fmt , args...) \
+ do{ \
+ printf("[E][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
+ } while(0)
+
+#endif /* MINICTRL_USE_DLOG */
+
+#endif /* _MINICTRL_LOG_H_ */
+
diff --git a/include/minicontrol-monitor.h b/include/minicontrol-monitor.h
new file mode 100755
index 0000000..496bbb1
--- /dev/null
+++ b/include/minicontrol-monitor.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _MINICTRL_MONITOR_H_
+#define _MINICTRL_MONITOR_H_
+
+#include <minicontrol-error.h>
+#include <minicontrol-type.h>
+
+/**
+ * @defgroup MINICONTROL_MONITOR_LIBRARY minicontrol monitor library
+ * @brief This minicontrol monitor library used to manage events triggered by minicontrol provider
+ */
+
+/**
+ * @ingroup MINICONTROL_MONITOR_LIBRARY
+ * @defgroup MINICONTROL_MONITOR_LIBRARY_TYPE minicontrol monitor library type
+ * @brief minicontrol monitor library type
+ */
+
+/**
+ * @addtogroup MINICONTROL_MONITOR_LIBRARY_TYPE
+ * @{
+ */
+
+ /**
+ * @brief Called when event is triggered
+ * @param[in] action The type of fired event
+ * @param[in] name The name of provider
+ * @param[in] width The width of provider
+ * @param[in] height The height of provider
+ * @param[in] priority The priority of provider
+ * @param[in] data user data
+ * @pre minicontrol_monitor_start() used to register this callback
+ * @see #minicontrol_action_e
+ * @see #minicontrol_priority_e
+ */
+typedef void (*minicontrol_monitor_cb) (minicontrol_action_e action,
+ const char *name,
+ unsigned int width,
+ unsigned int height,
+ minicontrol_priority_e priority,
+ void *data);
+
+/**
+ * @addtogroup MINICONTROL_MONITOR_LIBRARY
+ * @{
+ */
+
+/**
+ * @brief Register a callback for events originated by minicontrol provider
+ * @param[in] callback callback function
+ * @param[in] data user data
+ */
+minicontrol_error_e minicontrol_monitor_start(minicontrol_monitor_cb callback,
+ void *data);
+
+/**
+ * @brief Unregister a callback for events originated by minicontrol provider
+ * @return #MINICONTROL_ERROR_NONE if success, other value if failure
+ * @see #minicontrol_error_e
+ */
+minicontrol_error_e minicontrol_monitor_stop(void);
+
+#endif /* _MINICTRL_MONITOR_H_ */
+
diff --git a/include/minicontrol-provider.h b/include/minicontrol-provider.h
new file mode 100755
index 0000000..8a543a1
--- /dev/null
+++ b/include/minicontrol-provider.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _MINICTRL_PROVIDER_H_
+#define _MINICTRL_PROVIDER_H_
+
+#include <Evas.h>
+#include "minicontrol-error.h"
+#include "minicontrol-type.h"
+
+/**
+ * @defgroup MINICONTROL_PROVIDER_LIBRARY minicontrol provider library
+ * @brief This minicontrol provider library used to create evas socket window
+ */
+
+/**
+ * @addtogroup MINICONTROL_PROVIDER_LIBRARY
+ * @{
+ */
+
+/**
+ * @brief This function create evas socket window
+ * @param[in] name name of socket window
+ * @return evas object of socket window
+ */
+Evas_Object *minicontrol_win_add(const char *name);
+
+/**
+ * @brief This function request various action to viewer
+ * @param[in] minicontrol evas object of socket window
+ * @param[in] action type of action
+ * @return evas object of socket window
+ */
+minicontrol_error_e minicontrol_request(Evas_Object *mincontrol, minicontrol_request_e request);
+
+#endif /* _MINICTRL_PROVIDER_H_ */
+
diff --git a/include/minicontrol-type.h b/include/minicontrol-type.h
new file mode 100755
index 0000000..6e11521
--- /dev/null
+++ b/include/minicontrol-type.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _MINICTRL_TYPE_H_
+#define _MINICTRL_TYPE_H_
+
+/**
+ * @defgroup MINICONTROL_LIBRARY_TYPE minicontrol monitor error type
+ * @brief minicontrol library type
+ */
+
+/**
+ * @addtogroup MINICONTROL_LIBRARY_TYPE
+ * @{
+ */
+
+/**
+ * @breief Enumeration describing type of events originated by minicontrol provider
+ */
+typedef enum _minicontrol_action {
+ MINICONTROL_ACTION_START = 0,
+ MINICONTROL_ACTION_STOP,
+ MINICONTROL_ACTION_RESIZE,
+ MINICONTROL_ACTION_REQUEST,
+} minicontrol_action_e;
+
+/**
+ * @breief Enumeration describing priority of minicontrol provider
+ */
+typedef enum {
+ MINICONTROL_PRIORITY_TOP = 1000,
+ MINICONTROL_PRIORITY_MIDDLE = 100,
+ MINICONTROL_PRIORITY_LOW = 1,
+}minicontrol_priority_e;
+
+/**
+ * @breief Enumeration describing type of actions
+ */
+typedef enum {
+ MINICONTROL_REQ_NONE = 0,
+ MINICONTROL_REQ_HIDE_VIEWER = 100,
+}minicontrol_request_e;
+
+#endif /* _MINICTRL_TYPE_H_ */
diff --git a/include/minicontrol-viewer.h b/include/minicontrol-viewer.h
new file mode 100755
index 0000000..ebbd945
--- /dev/null
+++ b/include/minicontrol-viewer.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _MINICTRL_VIEWER_H_
+#define _MINICTRL_VIEWER_H_
+
+#include <Evas.h>
+
+/**
+ * @defgroup MINICONTROL_VIEWER_LIBRARY minicontrol provider library
+ * @brief This minicontrol viewer library used to display minicontrol which created by minicontrol provider
+ */
+
+/**
+ * @addtogroup MINICONTROL_VIEWER_LIBRARY
+ * @{
+ */
+
+/**
+ * @brief This function add minicontrol named as "svr_name" to given parent evas object then return it
+ * @param[in] parent minicontrol object will be added to this parent evas object
+ * @param[in] svr_name name of minicontrol
+ * @return evas object of minicontrol
+ */
+Evas_Object *minicontrol_viewer_add(Evas_Object *parent, const char *svr_name);
+
+/**
+ * @brief Get the basic evas image object from given minicontrol object
+ * @param[in] obj minicontrol object
+ * @return basic evas image object of minicontrol object
+ */
+Evas_Object *minicontrol_viewer_image_object_get(const Evas_Object *obj);
+
+#endif /* _MINICTRL_VIEWER_H_ */
+
diff --git a/include/minicontrol.h b/include/minicontrol.h
new file mode 100755
index 0000000..0308aa4
--- /dev/null
+++ b/include/minicontrol.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2012 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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_H_DEF_
+#define _MINICONTROL_H_DEF_
+
+#include <minicontrol-provider.h>
+#include <minicontrol-viewer.h>
+#include <minicontrol-monitor.h>
+
+#endif /* _MINICONTROL_H_DEF_ */