summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/debug.h39
-rw-r--r--include/dlist.h43
-rwxr-xr-xinclude/util.h55
-rwxr-xr-xinclude/widget_buffer.h203
-rwxr-xr-xinclude/widget_cmd_list.h392
-rwxr-xr-xinclude/widget_conf.h566
-rwxr-xr-xinclude/widget_errno.h104
-rwxr-xr-xinclude/widget_script.h91
-rwxr-xr-xinclude/widget_service.h1073
9 files changed, 2566 insertions, 0 deletions
diff --git a/include/debug.h b/include/debug.h
new file mode 100644
index 0000000..02fecf2
--- /dev/null
+++ b/include/debug.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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.
+ */
+
+#if !defined(FLOG)
+
+#if defined(SECURE_LOGD)
+#define DbgPrint(format, arg...) SECURE_LOGD(format, ##arg)
+#else
+#define DbgPrint(format, arg...) LOGD(format, ##arg)
+#endif
+
+#if defined(SECURE_LOGD)
+#define ErrPrint(format, arg...) SECURE_LOGE(format, ##arg)
+#else
+#define ErrPrint(format, arg...) LOGE(format, ##arg)
+#endif
+
+#else
+extern FILE *__file_log_fp;
+#define DbgPrint(format, arg...) do { fprintf(__file_log_fp, "[LOG] [%s/%s:%d] " format, util_basename(__FILE__), __func__, __LINE__, ##arg); fflush(__file_log_fp); } while (0)
+
+#define ErrPrint(format, arg...) do { fprintf(__file_log_fp, "[ERR] [%s/%s:%d] " format, util_basename(__FILE__), __func__, __LINE__, ##arg); fflush(__file_log_fp); } while (0)
+#endif
+
+#define EAPI __attribute__((visibility("default")))
+/* End of a file */
diff --git a/include/dlist.h b/include/dlist.h
new file mode 100644
index 0000000..3f19827
--- /dev/null
+++ b/include/dlist.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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.
+ */
+
+#define dlist_remove_data(list, data) do { \
+ struct dlist *l; \
+ l = dlist_find_data(list, data); \
+ list = dlist_remove(list, l); \
+} while (0)
+
+#define dlist_foreach(list, l, data) \
+ for ((l) = (list); (l) && ((data) = dlist_data(l)); (l) = dlist_next(l))
+
+#define dlist_foreach_safe(list, l, n, data) \
+ for ((l) = (list), (n) = dlist_next(l); \
+ (l) && ((data) = dlist_data(l)); \
+ (l) = (n), (n) = dlist_next(l))
+
+struct dlist;
+
+extern struct dlist *dlist_append(struct dlist *list, void *data);
+extern struct dlist *dlist_prepend(struct dlist *list, void *data);
+extern struct dlist *dlist_remove(struct dlist *list, struct dlist *l);
+extern struct dlist *dlist_find_data(struct dlist *list, void *data);
+extern void *dlist_data(struct dlist *l);
+extern struct dlist *dlist_next(struct dlist *l);
+extern struct dlist *dlist_prev(struct dlist *l);
+extern int dlist_count(struct dlist *l);
+extern struct dlist *dlist_nth(struct dlist *l, int nth);
+
+/* End of a file */
diff --git a/include/util.h b/include/util.h
new file mode 100755
index 0000000..6a3ac99
--- /dev/null
+++ b/include/util.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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.
+ */
+
+struct supported_size_list {
+ int w;
+ int h;
+};
+
+struct service_info {
+ sqlite3 *handle;
+ const char *dbfile;
+ const char *conf_file;
+ int init_count;
+
+ const char *iso3lang;
+ char country[ULOC_COUNTRY_CAPACITY];
+ char *syslang;
+ int country_len;
+
+ int base_w;
+ int base_h;
+
+ int base_parse;
+ widget_status_e last_status;
+};
+
+extern double util_timestamp(void);
+extern const char *util_basename(const char *name);
+extern unsigned long util_free_space(const char *path);
+extern char *util_replace_string(const char *src, const char *pattern, const char *replace);
+extern const char *util_uri_to_path(const char *uri);
+extern char *util_id_to_uri(const char *id); /* For FILENAME id */
+extern int util_update_resolution(struct service_info *info, struct supported_size_list *SIZE_LIST);
+extern int util_screen_size_get(unsigned int *width, unsigned int *height);
+
+#define SCHEMA_FILE "file://"
+#define SCHEMA_PIXMAP "pixmap://"
+#define SCHEMA_SHM "shm://"
+
+#define MAX_COLUMN 80
+
+/* End of a file */
diff --git a/include/widget_buffer.h b/include/widget_buffer.h
new file mode 100755
index 0000000..e278ee9
--- /dev/null
+++ b/include/widget_buffer.h
@@ -0,0 +1,203 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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 __WIDGET_BUFFER_H
+#define __WIDGET_BUFFER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file widget_buffer.h
+ * @brief This file describe the buffer ADT and event definitions
+ */
+
+/**
+ * @addtogroup CAPI_WIDGET_SERVICE_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @brief Buffer type of widget
+ */
+typedef enum widget_fb_type { /*!< Must have to be sync with libprovider, liblivebox-viewer */
+ WIDGET_FB_TYPE_FILE,
+ WIDGET_FB_TYPE_SHM,
+ WIDGET_FB_TYPE_PIXMAP,
+ WIDGET_FB_TYPE_ERROR
+} widget_fb_type_e;
+
+/**
+ * @internal
+ * @brief ADT for widget Buffer
+ * @since_tizen 2.3
+ */
+typedef struct widget_fb { /*!< Must has to be sync with slave & provider */
+ enum widget_fb_state {
+ WIDGET_FB_STATE_CREATED = 0x00beef00,
+ WIDGET_FB_STATE_DESTROYED = 0x00dead00
+ } state;
+ widget_fb_type_e type;
+ int refcnt;
+ void *info;
+ char data[];
+} *widget_fb_t;
+
+/**
+ * @internal
+ * @brief This enumeration value has to be sync'd with the libwidget interface. (only for inhouse widget)
+ * @since_tizen 2.3
+ */
+typedef enum widget_target_type {
+ WIDGET_TYPE_WIDGET, /**< widget */
+ WIDGET_TYPE_GBAR, /**< Glance Bar */
+ WIDGET_TYPE_ERROR /**< Error */
+} widget_target_type_e;
+
+/**
+ * @internal
+ * @brief Dynamic Box Frame Buffer Info
+ * @since_tizen 2.3
+ */
+struct fb_info {
+ char *id;
+ int w;
+ int h;
+ int bufsz;
+ void *buffer;
+
+ int pixels;
+ int handle;
+
+ void *gem;
+};
+
+/**
+ * @internal
+ * @brief Locking type - Read/Write
+ * @since_tizen 2.3
+ */
+typedef enum widget_lock_type {
+ WIDGET_LOCK_READ = 0x01,
+ WIDGET_LOCK_WRITE = 0x02,
+} widget_lock_type_e;
+
+/**
+ * @internal
+ * @brief Locking info
+ * @since_tizen 2.3
+ */
+typedef struct widget_lock_info {
+ char *filename;
+ int fd;
+ widget_lock_type_e type;
+} *widget_lock_info_t;
+
+
+/**
+ * @internal
+ * @brief Dynamic Box Buffer structure
+ * @since_tizen 2.3
+ */
+typedef struct widget_buffer {
+ enum {
+ BUFFER_INITIALIZED = 0x0b0e0e0f,
+ BUFFER_CREATED = 0x00beef00,
+ BUFFER_DESTROYED = 0x00dead00,
+ } state;
+
+ widget_target_type_e type;
+
+ union {
+ int fd; /* File handle(descriptor) */
+ int id; /* SHM handle(id) */
+ } handle;
+
+ char *pkgname;
+ char *id;
+ int width;
+ int height;
+ int pixel_size;
+ int auto_align;
+ int frame_skip; /**< To skip the first few frames to prevent from unexpected buffer clear */
+
+ struct fb_info *fb;
+
+ int (*handler)(struct widget_buffer *info, struct widget_buffer_event_data *event_info, void *data);
+ void *data;
+
+ void *user_data;
+
+ unsigned int *extra_buffer;
+
+ widget_lock_info_t lock_info;
+} *widget_buffer_h;
+
+/**
+ * @internal
+ * @brief Create a lock instance
+ * @param[in] uri Instance URI
+ * @param[in] type widget_target_type_e, WIDGET or GBAR
+ * @param[in] option Read or Write
+ * @return widget_lock_info_t
+ * @retval NULL if it fails to create a lock, proper error code will be set on last_status
+ * @retval info Lock information handler
+ * @see widget_service_destroy_lock()
+ * @see widget_service_acquire_lock()
+ * @see widget_service_release_lock()
+ */
+extern widget_lock_info_t widget_service_create_lock(const char *uri, widget_target_type_e type, widget_lock_type_e option);
+
+/**
+ * @internal
+ * @brief Destroy a lock instance
+ * @param[in] info Lock information handler
+ * @return status
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to manage the lock file
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully destroyed
+ */
+extern int widget_service_destroy_lock(widget_lock_info_t info);
+
+/**
+ * @internal
+ * @brief Acquire a lock instance
+ * @param[in] info Lock information handler
+ * @return status
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully destroyed
+ */
+extern int widget_service_acquire_lock(widget_lock_info_t info);
+
+/**
+ * @internal
+ * @brief Acquire a lock instance
+ * @param[in] info Lock information handler
+ * @return status
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully destroyed
+ */
+extern int widget_service_release_lock(widget_lock_info_t info);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/* End of a file */
diff --git a/include/widget_cmd_list.h b/include/widget_cmd_list.h
new file mode 100755
index 0000000..16672e7
--- /dev/null
+++ b/include/widget_cmd_list.h
@@ -0,0 +1,392 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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 __WIDGET_CMD_LIST_H
+#define __WIDGET_CMD_LIST_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file widget_cmd_list.h
+ * @brief This file declares the list of command Id that are used for communicating with provider & viewer
+ * Max length of CMD is 24 (PACKET_MAX_CMD from packet.h)
+ */
+
+/**
+ * @addtogroup CAPI_WIDGET_SERVICE_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @brief Command list for
+ * Provider to Master,
+ * or Master to Viewer
+ */
+#define CMD_UPDATED 0x00000001 /**< WIDGET Updated */
+#define CMD_WIDGET_UPDATED 0x00000001 /**< Alias of CMD_UPDATED */
+#define CMD_DESC_UPDATED 0x00000101 /**< GBAR Updated */
+#define CMD_GBAR_UPDATED 0x00000101 /**< Alias of CMD_DESC_UPDATED */
+#define CMD_EXTRA_UPDATED 0x00000201
+#define CMD_EXTRA_INFO 0x00000301 /**< Extra information is updated */
+#define CMD_DELETED 0x00000401 /**< widget is deleted */
+#define CMD_FAULTED 0x00000501 /**< widget is faulted */
+#define CMD_FAULT_PACKAGE 0x00000501 /**< Faulted package */
+#define CMD_SCROLL 0x00000601
+#define CMD_WIDGET_UPDATE_BEGIN 0x00000701
+#define CMD_WIDGET_UPDATE_END 0x00000801
+#define CMD_GBAR_UPDATE_BEGIN 0x00000901
+#define CMD_GBAR_UPDATE_END 0x00000A01
+#define CMD_ACCESS_STATUS 0x00000B01
+#define CMD_KEY_STATUS 0x00000C01
+#define CMD_CLOSE_GBAR 0x00000D01
+
+#define CMD_STR_UPDATED "updated"
+#define CMD_STR_WIDGET_UPDATED "widget_updated"
+#define CMD_STR_DESC_UPDATED "desc_updated"
+#define CMD_STR_GBAR_UPDATED "gbar_updated"
+#define CMD_STR_EXTRA_UPDATED "extra_updated"
+#define CMD_STR_EXTRA_INFO "extra_info"
+#define CMD_STR_DELETED "deleted"
+#define CMD_STR_FAULTED "faulted"
+#define CMD_STR_FAULT_PACKAGE "fault_package"
+#define CMD_STR_SCROLL "scroll"
+#define CMD_STR_WIDGET_UPDATE_BEGIN "widget_update_begin"
+#define CMD_STR_WIDGET_UPDATE_END "widget_update_end"
+#define CMD_STR_GBAR_UPDATE_BEGIN "gbar_update_begin"
+#define CMD_STR_GBAR_UPDATE_END "gbar_update_end"
+#define CMD_STR_ACCESS_STATUS "access_status"
+#define CMD_STR_KEY_STATUS "key_status"
+#define CMD_STR_CLOSE_GBAR "close_gbar"
+
+/**
+ * @internal
+ * @brief Command list for
+ * Provder to Master.
+ */
+#define CMD_CALL 0x00000E01
+#define CMD_RET 0x00000F01
+#define CMD_ACQUIRE_BUFFER 0x00001001
+#define CMD_RESIZE_BUFFER 0x00001101
+#define CMD_RELEASE_BUFFER 0x00001201
+#define CMD_HELLO 0x00001301
+#define CMD_PING 0x00001401
+#define CMD_CTRL 0x00001501
+#define CMD_ACQUIRE_XBUFFER 0x00001601 // eXtra Buffer
+#define CMD_RELEASE_XBUFFER 0x00001701 // eXtra Buffer
+
+#define CMD_STR_CALL "call"
+#define CMD_STR_RET "ret"
+#define CMD_STR_ACQUIRE_BUFFER "acquire_buffer"
+#define CMD_STR_RESIZE_BUFFER "resize_buffer"
+#define CMD_STR_RELEASE_BUFFER "release_buffer"
+#define CMD_STR_HELLO "hello"
+#define CMD_STR_PING "ping"
+#define CMD_STR_CTRL "ctrl"
+#define CMD_STR_ACQUIRE_XBUFFER "acquire_xbuffer"
+#define CMD_STR_RELEASE_XBUFFER "release_xbuffer"
+
+
+/**
+ * @internal
+ * @brief Master to Viewer
+ */
+#define CMD_GBAR_CREATED 0x00000E01
+#define CMD_GBAR_DESTROYED 0x00000F01
+#define CMD_CREATED 0x00001001
+#define CMD_GROUP_CHANGED 0x00001101
+#define CMD_PERIOD_CHANGED 0x00001201
+#define CMD_SIZE_CHANGED 0x00001301
+#define CMD_RESULT_PINUP 0x00001401 /**< To Viewer */
+#define CMD_RESULT_UPDATE_MODE 0x00001501 /**< To Viewer */
+#define CMD_WIDGET_CREATE_XBUF 0x00001601
+#define CMD_GBAR_CREATE_XBUF 0x00001701
+#define CMD_WIDGET_DESTROY_XBUF 0x00001801
+#define CMD_GBAR_DESTROY_XBUF 0x00001901
+#define CMD_UPDATE_ID 0x00001A01
+
+#define CMD_STR_GBAR_CREATED "gbar_created"
+#define CMD_STR_GBAR_DESTROYED "gbar_destroyed"
+#define CMD_STR_CREATED "created"
+#define CMD_STR_GROUP_CHANGED "group_changed"
+#define CMD_STR_PERIOD_CHANGED "period_changed"
+#define CMD_STR_SIZE_CHANGED "size_changed"
+#define CMD_STR_RESULT_PINUP "pinup"
+#define CMD_STR_RESULT_UPDATE_MODE "update_mode"
+#define CMD_STR_WIDGET_CREATE_XBUF "widget_create_xbuf"
+#define CMD_STR_GBAR_CREATE_XBUF "gbar_create_xbuf"
+#define CMD_STR_WIDGET_DESTROY_XBUF "widget_destroy_xbuf"
+#define CMD_STR_GBAR_DESTROY_XBUF "gbar_destroy_xbuf"
+#define CMD_STR_UPDATE_ID "update_id"
+
+/**
+ * @internal
+ * @brief Following list should be started after the common list of client_cmd_list
+ * Master to Provider
+ */
+#define CMD_GBAR_SHOW 0x00003B01
+#define CMD_GBAR_HIDE 0x00003C01
+#define CMD_WIDGET_PAUSE 0x00003D01
+#define CMD_WIDGET_RESUME 0x00003E01
+#define CMD_SCRIPT 0x00003F01
+#define CMD_RENEW 0x00004001
+#define CMD_PINUP 0x00004101
+#define CMD_UPDATE_CONTENT 0x00004201
+#define CMD_PAUSE 0x00004301
+#define CMD_RESUME 0x00004401
+#define CMD_DISCONNECT 0x00004501
+#define CMD_VIEWER_CONNECTED 0x00004601
+#define CMD_VIEWER_DISCONNECTED 0x00004701
+
+#define CMD_STR_GBAR_SHOW "gbar_show"
+#define CMD_STR_GBAR_HIDE "gbar_hide"
+#define CMD_STR_WIDGET_PAUSE "widget_pause"
+#define CMD_STR_WIDGET_RESUME "widget_resume"
+#define CMD_STR_SCRIPT "script"
+#define CMD_STR_RENEW "renew"
+#define CMD_STR_PINUP "pinup"
+#define CMD_STR_UPDATE_CONTENT "update_content"
+#define CMD_STR_PAUSE "pause"
+#define CMD_STR_RESUME "resume"
+#define CMD_STR_DISCONNECT "disconnect"
+#define CMD_STR_VIEWER_CONNECTED "v_connected"
+#define CMD_STR_VIEWER_DISCONNECTED "v_disconnected"
+
+/**
+ * @brief liveinfo to master
+ */
+#define CMD_INFO_HELLO 0x00000001
+#define CMD_INFO_SLAVE_LIST 0x00000101
+#define CMD_INFO_PKG_LIST 0x00000201
+#define CMD_INFO_INST_LIST 0x00000301
+#define CMD_INFO_SLAVE_CTRL 0x00000401
+#define CMD_INFO_PKG_CTRL 0x00000501
+#define CMD_INFO_MASTER_CTRL 0x00000601
+
+#define CMD_STR_INFO_HELLO "liveinfo_hello"
+#define CMD_STR_INFO_SLAVE_LIST "slave_list"
+#define CMD_STR_INFO_PKG_LIST "pkg_list"
+#define CMD_STR_INFO_INST_LIST "inst_list"
+#define CMD_STR_INFO_SLAVE_CTRL "slave_ctrl"
+#define CMD_STR_INFO_PKG_CTRL "pkg_ctrl"
+#define CMD_STR_INFO_MASTER_CTRL "master_ctrl"
+
+/**
+ * @internal
+ * @brief Viewer to maser
+ * or Master to provider
+ */
+#define CMD_GBAR_MOUSE_MOVE 0x00000001
+#define CMD_WIDGET_MOUSE_MOVE 0x00000101
+#define CMD_GBAR_MOUSE_DOWN 0x00000201
+#define CMD_GBAR_MOUSE_UP 0x00000301
+#define CMD_WIDGET_MOUSE_DOWN 0x00000401
+#define CMD_WIDGET_MOUSE_UP 0x00000501
+#define CMD_GBAR_MOUSE_ENTER 0x00000601
+#define CMD_GBAR_MOUSE_LEAVE 0x00000701
+#define CMD_WIDGET_MOUSE_ENTER 0x00000801
+#define CMD_WIDGET_MOUSE_LEAVE 0x00000901
+#define CMD_WIDGET_MOUSE_ON_SCROLL 0x00000A01
+#define CMD_WIDGET_MOUSE_OFF_SCROLL 0x00000B01
+#define CMD_GBAR_MOUSE_ON_SCROLL 0x00000C01
+#define CMD_GBAR_MOUSE_OFF_SCROLL 0x00000D01
+#define CMD_WIDGET_MOUSE_ON_HOLD 0x00000E01
+#define CMD_WIDGET_MOUSE_OFF_HOLD 0x00000F01
+#define CMD_GBAR_MOUSE_ON_HOLD 0x00001001
+#define CMD_GBAR_MOUSE_OFF_HOLD 0x00001101
+#define CMD_CLICKED 0x00001201
+#define CMD_TEXT_SIGNAL 0x00001301
+#define CMD_DELETE 0x00001401
+#define CMD_RESIZE 0x00001501
+#define CMD_NEW 0x00001601
+#define CMD_SET_PERIOD 0x00001701
+#define CMD_CHANGE_GROUP 0x00001801
+#define CMD_GBAR_MOVE 0x00001901
+#define CMD_GBAR_ACCESS_HL 0x00001A01
+#define CMD_GBAR_ACCESS_ACTIVATE 0x00001B01
+#define CMD_GBAR_ACCESS_ACTION 0x00001C01
+#define CMD_GBAR_ACCESS_SCROLL 0x00001D01
+#define CMD_GBAR_ACCESS_VALUE_CHANGE 0x00001E01
+#define CMD_GBAR_ACCESS_MOUSE 0x00001F01
+#define CMD_GBAR_ACCESS_BACK 0x00002001
+#define CMD_GBAR_ACCESS_OVER 0x00002101
+#define CMD_GBAR_ACCESS_READ 0x00002201
+#define CMD_GBAR_ACCESS_ENABLE 0x00002301
+#define CMD_WIDGET_ACCESS_HL 0x00002401
+#define CMD_WIDGET_ACCESS_ACTIVATE 0x00002501
+#define CMD_WIDGET_ACCESS_ACTION 0x00002601
+#define CMD_WIDGET_ACCESS_SCROLL 0x00002701
+#define CMD_WIDGET_ACCESS_VALUE_CHANGE 0x00002801
+#define CMD_WIDGET_ACCESS_MOUSE 0x00002901
+#define CMD_WIDGET_ACCESS_BACK 0x00002A01
+#define CMD_WIDGET_ACCESS_OVER 0x00002B01
+#define CMD_WIDGET_ACCESS_READ 0x00002C01
+#define CMD_WIDGET_ACCESS_ENABLE 0x00002D01
+#define CMD_WIDGET_KEY_DOWN 0x00002E01
+#define CMD_WIDGET_KEY_UP 0x00002F01
+#define CMD_WIDGET_KEY_FOCUS_IN 0x00003001
+#define CMD_WIDGET_KEY_FOCUS_OUT 0x00003101
+#define CMD_GBAR_KEY_DOWN 0x00003201
+#define CMD_GBAR_KEY_UP 0x00003301
+#define CMD_GBAR_KEY_FOCUS_IN 0x00003401
+#define CMD_GBAR_KEY_FOCUS_OUT 0x00003501
+#define CMD_UPDATE_MODE 0x00003601
+#define CMD_WIDGET_MOUSE_SET 0x00003701
+#define CMD_WIDGET_MOUSE_UNSET 0x00003801
+#define CMD_GBAR_MOUSE_SET 0x00003901
+#define CMD_GBAR_MOUSE_UNSET 0x00003A01
+
+#define CMD_STR_GBAR_MOUSE_MOVE "gbar_mouse_move"
+#define CMD_STR_WIDGET_MOUSE_MOVE "widget_mouse_move"
+#define CMD_STR_GBAR_MOUSE_DOWN "gbar_mouse_down"
+#define CMD_STR_GBAR_MOUSE_UP "gbar_mouse_up"
+#define CMD_STR_WIDGET_MOUSE_DOWN "widget_mouse_down"
+#define CMD_STR_WIDGET_MOUSE_UP "widget_mouse_up"
+#define CMD_STR_GBAR_MOUSE_ENTER "gbar_mouse_enter"
+#define CMD_STR_GBAR_MOUSE_LEAVE "gbar_mouse_leave"
+#define CMD_STR_WIDGET_MOUSE_ENTER "widget_mouse_enter"
+#define CMD_STR_WIDGET_MOUSE_LEAVE "widget_mouse_leave"
+#define CMD_STR_WIDGET_MOUSE_ON_SCROLL "widget_mouse_on_scroll"
+#define CMD_STR_WIDGET_MOUSE_OFF_SCROLL "widget_mouse_off_scroll"
+#define CMD_STR_GBAR_MOUSE_ON_SCROLL "gbar_mouse_on_scroll"
+#define CMD_STR_GBAR_MOUSE_OFF_SCROLL "gbar_mouse_off_scroll"
+#define CMD_STR_WIDGET_MOUSE_ON_HOLD "widget_mouse_on_hold"
+#define CMD_STR_WIDGET_MOUSE_OFF_HOLD "widget_mouse_off_hold"
+#define CMD_STR_GBAR_MOUSE_ON_HOLD "gbar_mouse_on_hold"
+#define CMD_STR_GBAR_MOUSE_OFF_HOLD "gbar_mouse_off_hold"
+#define CMD_STR_CLICKED "clicked"
+#define CMD_STR_TEXT_SIGNAL "text_signal"
+#define CMD_STR_DELETE "delete"
+#define CMD_STR_RESIZE "resize"
+#define CMD_STR_NEW "new"
+#define CMD_STR_SET_PERIOD "set_period"
+#define CMD_STR_CHANGE_GROUP "change_group"
+#define CMD_STR_GBAR_MOVE "gbar_move"
+#define CMD_STR_GBAR_ACCESS_HL "gbar_acc_hl"
+#define CMD_STR_GBAR_ACCESS_ACTIVATE "gbar_acc_activate"
+#define CMD_STR_GBAR_ACCESS_ACTION "gbar_acc_action"
+#define CMD_STR_GBAR_ACCESS_SCROLL "gbar_acc_scroll"
+#define CMD_STR_GBAR_ACCESS_VALUE_CHANGE "gbar_acc_val_change"
+#define CMD_STR_GBAR_ACCESS_MOUSE "gbar_acc_mouse"
+#define CMD_STR_GBAR_ACCESS_BACK "gbar_acc_back"
+#define CMD_STR_GBAR_ACCESS_OVER "gbar_acc_over"
+#define CMD_STR_GBAR_ACCESS_READ "gbar_acc_read"
+#define CMD_STR_GBAR_ACCESS_ENABLE "gbar_acc_enable"
+#define CMD_STR_WIDGET_ACCESS_HL "widget_acc_hl"
+#define CMD_STR_WIDGET_ACCESS_ACTIVATE "widget_acc_activate"
+#define CMD_STR_WIDGET_ACCESS_ACTION "widget_acc_action"
+#define CMD_STR_WIDGET_ACCESS_SCROLL "widget_acc_scroll"
+#define CMD_STR_WIDGET_ACCESS_VALUE_CHANGE "widget_acc_val_change"
+#define CMD_STR_WIDGET_ACCESS_MOUSE "widget_acc_mouse"
+#define CMD_STR_WIDGET_ACCESS_BACK "widget_acc_back"
+#define CMD_STR_WIDGET_ACCESS_OVER "widget_acc_over"
+#define CMD_STR_WIDGET_ACCESS_READ "widget_acc_read"
+#define CMD_STR_WIDGET_ACCESS_ENABLE "widget_acc_enable"
+#define CMD_STR_WIDGET_KEY_DOWN "widget_key_down"
+#define CMD_STR_WIDGET_KEY_UP "widget_key_up"
+#define CMD_STR_WIDGET_KEY_FOCUS_IN "widget_key_focus_in"
+#define CMD_STR_WIDGET_KEY_FOCUS_OUT "widget_key_focus_out"
+#define CMD_STR_GBAR_KEY_DOWN "gbar_key_down"
+#define CMD_STR_GBAR_KEY_UP "gbar_key_up"
+#define CMD_STR_GBAR_KEY_FOCUS_IN "gbar_key_focus_in"
+#define CMD_STR_GBAR_KEY_FOCUS_OUT "gbar_key_focus_out"
+#define CMD_STR_UPDATE_MODE "update_mode"
+#define CMD_STR_WIDGET_MOUSE_SET "widget_mouse_set"
+#define CMD_STR_WIDGET_MOUSE_UNSET "widget_mouse_unset"
+#define CMD_STR_GBAR_MOUSE_SET "gbar_mouse_set"
+#define CMD_STR_GBAR_MOUSE_UNSET "gbar_mouse_unset"
+
+/**
+ * @internal
+ * @brief viewer to master
+ */
+#define CMD_CHANGE_VISIBILITY 0x00003B01
+#define CMD_WIDGET_ACQUIRE_PIXMAP 0x00003C01
+#define CMD_WIDGET_RELEASE_PIXMAP 0x00003D01
+#define CMD_GBAR_ACQUIRE_PIXMAP 0x00003E01
+#define CMD_GBAR_RELEASE_PIXMAP 0x00003F01
+#define CMD_ACQUIRE 0x00004001
+#define CMD_RELEASE 0x00004101
+#define CMD_PINUP_CHANGED 0x00004201
+#define CMD_CREATE_GBAR 0x00004301
+#define CMD_DESTROY_GBAR 0x00004401
+#define CMD_ACTIVATE_PACKAGE 0x00004501
+#define CMD_SUBSCRIBE 0x00004601
+#define CMD_UNSUBSCRIBE 0x00004701
+#define CMD_DELETE_CLUSTER 0x00004801
+#define CMD_DELETE_CATEGORY 0x00004901
+#define CMD_REFRESH_GROUP 0x00004A01
+#define CMD_UPDATE 0x00004B01
+#define CMD_WIDGET_KEY_SET 0x00004C01
+#define CMD_WIDGET_KEY_UNSET 0x00004D01
+#define CMD_GBAR_KEY_SET 0x00004E01
+#define CMD_GBAR_KEY_UNSET 0x00004F01
+#define CMD_CLIENT_PAUSED 0x00005001
+#define CMD_CLIENT_RESUMED 0x00005101
+#define CMD_WIDGET_ACQUIRE_XPIXMAP 0x00005201
+#define CMD_GBAR_ACQUIRE_XPIXMAP 0x00005301
+#define CMD_SUBSCRIBE_CATEGORY 0x00005401
+#define CMD_UNSUBSCRIBE_CATEGORY 0x00005501
+
+#define CMD_STR_CHANGE_VISIBILITY "change,visibility"
+#define CMD_STR_WIDGET_ACQUIRE_PIXMAP "widget_acquire_pixmap"
+#define CMD_STR_WIDGET_RELEASE_PIXMAP "widget_release_pixmap"
+#define CMD_STR_GBAR_ACQUIRE_PIXMAP "gbar_acquire_pixmap"
+#define CMD_STR_GBAR_RELEASE_PIXMAP "gbar_release_pixmap"
+#define CMD_STR_ACQUIRE "acquire"
+#define CMD_STR_RELEASE "release"
+#define CMD_STR_PINUP_CHANGED "pinup_changed"
+#define CMD_STR_CREATE_GBAR "create_gbar"
+#define CMD_STR_DESTROY_GBAR "destroy_gbar"
+#define CMD_STR_ACTIVATE_PACKAGE "activate_package"
+#define CMD_STR_SUBSCRIBE "subscribe" /* pid, cluster, sub-cluster */
+#define CMD_STR_UNSUBSCRIBE "unsubscribe" /* pid, cluster, sub-cluster */
+#define CMD_STR_DELETE_CLUSTER "delete_cluster"
+#define CMD_STR_DELETE_CATEGORY "delete_category"
+#define CMD_STR_REFRESH_GROUP "refresh_group"
+#define CMD_STR_UPDATE "update"
+#define CMD_STR_WIDGET_KEY_SET "widget_key_set"
+#define CMD_STR_WIDGET_KEY_UNSET "widget_key_unset"
+#define CMD_STR_GBAR_KEY_SET "gbar_key_set"
+#define CMD_STR_GBAR_KEY_UNSET "gbar_key_unset"
+#define CMD_STR_CLIENT_PAUSED "client_paused"
+#define CMD_STR_CLIENT_RESUMED "client_resumed"
+#define CMD_STR_WIDGET_ACQUIRE_XPIXMAP "widget_acquire_xpixmap"
+#define CMD_STR_GBAR_ACQUIRE_XPIXMAP "gbar_acquire_xpixmap"
+#define CMD_STR_SUBSCRIBE_CATEGORY "subscribe,category"
+#define CMD_STR_UNSUBSCRIBE_CATEGORY "unsubscribe,category"
+
+/**
+ * @internal
+ * @brief Service API to Master
+ */
+#define CMD_SERVICE_UPDATE 0x00000001
+#define CMD_SERVICE_CHANGE_PERIOD 0x00000101
+#define CMD_SERVICE_INST_CNT 0x00000201
+
+#define CMD_STR_SERVICE_UPDATE "service_update"
+#define CMD_STR_SERVICE_CHANGE_PERIOD "service_change_period"
+#define CMD_STR_SERVICE_INST_CNT "service_inst_cnt"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/* End of a file */
diff --git a/include/widget_conf.h b/include/widget_conf.h
new file mode 100755
index 0000000..12d61d0
--- /dev/null
+++ b/include/widget_conf.h
@@ -0,0 +1,566 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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 __WIDGET_SERVICE_CONF_H
+#define __WIDGET_SERVICE_CONF_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @internal
+ * @brief Load a configuration file to the memory
+ * @since_tizen 2.3
+ * @return int
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully loaded
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access the configuration file
+ * @see widget_conf_reset()
+ */
+extern int widget_conf_load(void);
+
+/**
+ * @internal
+ * @brief Reset configuration data to its default values
+ * @since_tizen 2.3
+ * @return void
+ * @see widget_conf_init()
+ */
+extern void widget_conf_reset(void);
+
+/**
+ * @internal
+ * @brief setup the configuration data using default values
+ * @since_tizen 2.3
+ * @return void
+ * @see widget_conf_reset()
+ */
+extern void widget_conf_init(void);
+
+/**
+ * @internal
+ * @brief Get the flag of configuration loaded status
+ * @since_tizen 2.3
+ * @return int 1 if it is loaded or 0
+ * @see widget_conf_load()
+ */
+extern const int const widget_conf_is_loaded(void);
+
+/**
+ * @internal
+ * @brief configuration value getter
+ * @detail If your service provider intended to check the window stack directly,
+ * Refer this flag, if this returns 1, you should monitor the window stack
+ * to send the pause/resume event and it should be managed manually.
+ * @remarks this is just a recommendation to implement service provider,
+ * so the service provider's behaviour is depeneds on its implementation.
+ * @since_tizen 2.3
+ * @return int 1 if the xmonitor should be enabled or 0
+ */
+extern const int const widget_conf_use_xmonitor(void);
+
+/**
+ * @internal
+ * @brief configuration value getter for emergency disk mount information
+ * @detail if the system has not enough space to operate itself, the master provider allocate memory for
+ * its temporary storage. to save some files.
+ * @remarks this is only used for master service provider.
+ * all other service provider should not need to know this configuration value.
+ * but this API support to get current configuration.
+ * @since_tizen 2.3
+ * @return const char * const
+ * @retval string emergency disk mount information includes options
+ * @retval @c NULL if there is no configuration information
+ */
+extern const char * const widget_conf_emergency_disk(void);
+
+/**
+ * @internal
+ * @brief if the master service provider should need to check the lcd status to pause/resume the service providers,
+ * this function will returns 1, or 0.
+ * @since_tizen 2.3
+ * @return int
+ * @retval 1 need to care the lcd status by master service provider
+ * @retval 0 do not care it even if the lcd is off/on, do not send any pause/resume event to the service providers.
+ */
+extern const int const widget_conf_check_lcd(void);
+
+/**
+ * @internal
+ * @brief select the option whether use the event time of each event data from device or not.
+ * if this returns 1, the master service provider should keep its timestamp of each event data,
+ * or use the logical timestamp that is get by service provider.
+ * @since_tizen 2.3
+ * @return int
+ * @retval 1 use the timestamp of event data
+ * @retval 0 use the system timestamp instead of event data of device
+ */
+extern const int const widget_conf_use_event_time(void);
+
+/**
+ * @internal
+ * @brief Get the configuration value for AUTO Alignment of canvas buffer.
+ * @details
+ * If the UIFW does not support the STRIDE information for rendering frame,
+ * This function will returns 1, then the widget will automatically aligning the buffer.
+ * @since_tizen 2.3
+ * @return status of auto alignment.
+ * @retval 1 Content will be automatically aligned by widget.
+ * @retval 0 Content will be aligned by UIFW, using stride information.
+ */
+extern const int const widget_conf_auto_align(void);
+
+/**
+ * @internal
+ * @brief this returns formatted string that represents service list to be enabled
+ * format is "[service name1],[service name2],..."\n
+ * Candidate services are\n
+ * [widget]\n
+ * [badge]\n
+ * [notification]\n
+ * [utility]\n
+ * [shortcut]\n
+ * @since_tizen 2.3
+ * @return string
+ * @retval NULL if there is no defined list. you should treat this as a default service list
+ */
+extern const char * const widget_conf_services(void);
+
+/**
+ * @internal
+ * @brief Get the configuration value of "use_sw_backend"
+ * if this returns 1, the provider should not use the Graphics buffer.
+ * @since_tizen 2.3
+ * @return int
+ * @retval 1 true Use the S/W buffer such as heap instead of graphics buffer
+ * @retval 0 false You can choose S/W buffer or Graphics buffer
+ * @see widget_conf_provider_method()
+ */
+extern const int const widget_conf_use_sw_backend(void);
+
+/**
+ * @internal
+ * @brief Content sharing method for buffer type widget (or gbar)
+ * it could be "pixmap", "shm", "file"
+ * in case of pixmap, the master service provider will try to allocate a resource from graphics sub system (ex, Xorg)
+ * in case of shm, it will try to allocate shared memory.
+ * in case of file, it will create a dummy file to write and read frame data from/to it.
+ * @since_tizen 2.3
+ * @return const char * const
+ * @retval "pixmap" use the pixmap
+ * @retval "shm" use the shared memory
+ * @retval "file" use a file
+ */
+extern const char * const widget_conf_provider_method(void);
+
+/**
+ * @internal
+ * @brief if a debug mode is enabled, master will not launch the service provider directly.
+ * instead of it, the master will permanently waiting the launch of service provider.
+ * so the developer should launch the service provider with correct bundle data.
+ * and it should send the "hello" message to the master provider
+ * @since_tizen 2.3
+ * @return int
+ * @retval 1 master will turn on the debug mode
+ * @retval 0 master will turn off the debug mode
+ */
+extern const int const widget_conf_debug_mode(void);
+
+/**
+ * @internal
+ * @brief If the overwrite content is enabled, the provider will not prepare to prevent from output file overwriting.
+ * To do it, the provider will renaming the output file right after it is created.
+ * @since_tizen 2.3
+ * @return int bool
+ * @retval 1 Overwrite content
+ * @retval 0 Prevent from overwriting content
+ */
+extern const int const widget_conf_overwrite_content(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_com_core_thread(void);
+
+/**
+ * @internal
+ */
+extern const unsigned int const widget_conf_base_width(void);
+
+/**
+ * @internal
+ */
+extern const unsigned int const widget_conf_base_height(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_minimum_period(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_default_pixels(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_default_script(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_default_abi(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_default_gbar_group(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_default_period(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_default_packet_time(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_default_content(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_default_title(void);
+
+/**
+ * @internal
+ */
+extern const unsigned long const widget_conf_minimum_space(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_replace_tag(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_slave_ttl(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_slave_activate_time(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_slave_relaunch_time(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_slave_relaunch_count(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_max_log_line(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_max_log_file(void);
+
+/**
+ * @internal
+ */
+extern const unsigned long const widget_conf_sqlite_flush_max(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_db_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_reader_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_always_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_log_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_script_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_script_port(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_share_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_input_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_root_path(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_path(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_ping_time(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_slave_max_load(void);
+
+/**
+ * @internal
+ * @brief Get the configuration value for premultiplied alpha.
+ * @details
+ * If the system uses the premultiplied alpha for content,
+ * This function will returns 1.
+ * @since_tizen 2.3
+ * @remarks This function only works with the inhouse provider.
+ * @return status of premultiplied alpha.
+ * @retval 1 Content rendered with premultiplied alpha.
+ * @retval 0 Content doesn't rendered with premultiplied alpha.
+ */
+extern const int const widget_conf_premultiplied_alpha(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_gbar_request_timeout(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_scale_width_factor(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_scale_height_factor(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_launch_key_name(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_launch_key_secured(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_launch_key_abi(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_launch_key_hw_acceleration(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_empty_content(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_empty_title(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_extra_buffer_count(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_use_gettimeofday(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_slave_event_boost_off(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_slave_event_boost_on(void);
+
+/**
+ * @internal
+ */
+extern const double const widget_conf_event_filter(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_slave_limit_to_ttl(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_frame_skip(void);
+
+/**
+ * @internal
+ */
+extern const int const widget_conf_slave_auto_cache_flush(void);
+
+/**
+ * @internal
+ */
+extern const char * const widget_conf_category_list(void);
+
+#define WIDGET_CONF_BASE_W widget_conf_base_width()
+#define WIDGET_CONF_BASE_H widget_conf_base_height()
+
+#define WIDGET_CONF_EMERGENCY_DISK widget_conf_emergency_disk()
+#define WIDGET_CONF_SCALE_WIDTH_FACTOR widget_conf_scale_width_factor()
+#define WIDGET_CONF_SCALE_HEIGHT_FACTOR widget_conf_scale_height_factor()
+
+#define WIDGET_CONF_USE_SW_BACKEND widget_conf_use_sw_backend()
+#define WIDGET_CONF_PROVIDER_METHOD widget_conf_provider_method()
+#define WIDGET_CONF_DEBUG_MODE widget_conf_debug_mode()
+#define WIDGET_CONF_OVERWRITE_CONTENT widget_conf_overwrite_content()
+#define WIDGET_CONF_COM_CORE_THREAD widget_conf_com_core_thread()
+
+#define WIDGET_CONF_MINIMUM_PERIOD widget_conf_minimum_period()
+
+#define WIDGET_CONF_DEFAULT_SCRIPT widget_conf_default_script()
+#define WIDGET_CONF_DEFAULT_ABI widget_conf_default_abi()
+#define WIDGET_CONF_DEFAULT_GBAR_GROUP widget_conf_default_gbar_group()
+#define WIDGET_CONF_DEFAULT_PERIOD widget_conf_default_period()
+#define WIDGET_CONF_DEFAULT_PIXELS widget_conf_default_pixels()
+#define WIDGET_CONF_PRIORITY_NO_CHANGE -1.0f
+
+#define WIDGET_CONF_BUNDLE_SLAVE_NAME widget_conf_launch_key_name()
+#define WIDGET_CONF_BUNDLE_SLAVE_SECURED widget_conf_launch_key_secured()
+#define WIDGET_CONF_BUNDLE_SLAVE_ABI widget_conf_launch_key_abi()
+#define WIDGET_CONF_BUNDLE_SLAVE_HW_ACCELERATION widget_conf_launch_key_hw_acceleration()
+#define WIDGET_CONF_PACKET_TIME widget_conf_default_packet_time()
+#define WIDGET_CONF_CONTENT_NO_CHANGE widget_conf_empty_content()
+#define WIDGET_CONF_TITLE_NO_CHANGE widget_conf_empty_title()
+#define WIDGET_CONF_DEFAULT_TITLE widget_conf_default_title()
+#define WIDGET_CONF_DEFAULT_CONTENT widget_conf_default_content()
+#define WIDGET_CONF_MINIMUM_SPACE widget_conf_minimum_space()
+
+#define WIDGET_CONF_IMAGE_PATH widget_conf_share_path()
+#define WIDGET_CONF_SCRIPT_PATH widget_conf_script_path()
+#define WIDGET_CONF_SCRIPT_PORT_PATH widget_conf_script_port()
+#define WIDGET_CONF_CONF_PATH widget_conf_path()
+#define WIDGET_CONF_ROOT_PATH widget_conf_root_path()
+#define WIDGET_CONF_LOG_PATH widget_conf_log_path()
+#define WIDGET_CONF_READER_PATH widget_conf_reader_path()
+#define WIDGET_CONF_ALWAYS_PATH widget_conf_always_path()
+#define WIDGET_CONF_INPUT_PATH widget_conf_input_path()
+
+#define WIDGET_CONF_REPLACE_TAG_APPID widget_conf_replace_tag()
+#define WIDGET_CONF_SLAVE_TTL widget_conf_slave_ttl()
+#define WIDGET_CONF_SLAVE_ACTIVATE_TIME widget_conf_slave_activate_time()
+#define WIDGET_CONF_SLAVE_RELAUNCH_TIME widget_conf_slave_relaunch_time()
+#define WIDGET_CONF_SLAVE_RELAUNCH_COUNT widget_conf_slave_relaunch_count()
+
+#define WIDGET_CONF_MAX_LOG_LINE widget_conf_max_log_line()
+#define WIDGET_CONF_MAX_LOG_FILE widget_conf_max_log_file()
+#define WIDGET_CONF_CATEGORY_LIST widget_conf_category_list()
+
+#define WIDGET_CONF_SQLITE_FLUSH_MAX widget_conf_sqlite_flush_max()
+#define WIDGET_CONF_DBFILE widget_conf_db_path()
+
+#define WIDGET_CONF_GBAR_REQUEST_TIMEOUT widget_conf_gbar_request_timeout()
+
+#define WIDGET_CONF_SLAVE_MAX_LOAD widget_conf_slave_max_load()
+#define WIDGET_CONF_DEFAULT_PING_TIME widget_conf_ping_time()
+#define WIDGET_CONF_PREMULTIPLIED_COLOR widget_conf_premultiplied_alpha()
+#define WIDGET_CONF_SERVICES widget_conf_services()
+#define WIDGET_CONF_EXTRA_BUFFER_COUNT widget_conf_extra_buffer_count()
+
+#define WIDGET_CONF_SERVICE_WIDGET "[widget]"
+#define WIDGET_CONF_SERVICE_NOTIFICATION "[notification]"
+#define WIDGET_CONF_SERVICE_BADGE "[badge]"
+#define WIDGET_CONF_SERVICE_SHORTCUT "[shortcut]"
+#define WIDGET_CONF_SERVICE_UTILITY "[utility]"
+#define WIDGET_CONF_SERVICE_FILE "[file]"
+
+#define WIDGET_CONF_PAUSED_FILE "/tmp/.live.paused"
+
+#define WIDGET_CONF_USE_XMONITOR widget_conf_use_xmonitor()
+#define WIDGET_CONF_AUTO_ALIGN widget_conf_auto_align()
+#define WIDGET_CONF_USE_EVENT_TIME widget_conf_use_event_time()
+#define WIDGET_CONF_CHECK_LCD widget_conf_check_lcd()
+
+#define WIDGET_CONF_USE_GETTIMEOFDAY widget_conf_use_gettimeofday()
+
+#define WIDGET_CONF_DELAY_TIME 0.0000001f
+#define WIDGET_CONF_DEFAULT_CLUSTER "user,created"
+#define WIDGET_CONF_MINIMUM_REACTIVATION_TIME 10
+
+#define WIDGET_CONF_SLAVE_EVENT_BOOST_ON widget_conf_slave_event_boost_on()
+#define WIDGET_CONF_SLAVE_EVENT_BOOST_OFF widget_conf_slave_event_boost_off()
+#define WIDGET_CONF_EVENT_FILTER widget_conf_event_filter()
+#define WIDGET_CONF_SLAVE_LIMIT_TO_TTL widget_conf_slave_limit_to_ttl()
+#define WIDGET_CONF_FRAME_SKIP widget_conf_frame_skip()
+#define WIDGET_CONF_SLAVE_AUTO_CACHE_FLUSH widget_conf_slave_auto_cache_flush()
+
+#if !defined(VCONFKEY_MASTER_STARTED)
+#define VCONFKEY_MASTER_STARTED "memory/data-provider-master/started"
+#endif
+
+#if !defined(VCONFKEY_MASTER_RESTART_COUNT)
+#define VCONFKEY_MASTER_RESTART_COUNT "memory/private/data-provider-master/restart_count"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* End of a file */
diff --git a/include/widget_errno.h b/include/widget_errno.h
new file mode 100755
index 0000000..7bd9c4a
--- /dev/null
+++ b/include/widget_errno.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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 __WIDGET_ERRNO_H
+#define __WIDGET_ERRNO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file widget_errno.h
+ * @brief This file declares API of libwidget-service library
+ */
+
+/**
+ * @addtogroup CAPI_WIDGET_SERVICE_MODULE
+ * @{
+ */
+
+/**
+ * @brief Enumeration for the result status of widget operation.
+ * @since_tizen 2.3
+ */
+typedef enum widget_status {
+ WIDGET_STATUS_ERROR_NONE = 0x00000000, /**< Operation is successfully completed */
+ WIDGET_STATUS_ERROR = 0x80000000, /**< This will be OR'd with other specific error value */
+ WIDGET_STATUS_ERROR_INVALID_PARAMETER = WIDGET_STATUS_ERROR | 0x0001, /**< Invalid request */
+ WIDGET_STATUS_ERROR_FAULT = WIDGET_STATUS_ERROR | 0x0002, /**< Fault - Unable to recover from the error */
+ WIDGET_STATUS_ERROR_OUT_OF_MEMORY = WIDGET_STATUS_ERROR | 0x0004, /**< Memory is not enough to do this operation */
+ WIDGET_STATUS_ERROR_EXIST = WIDGET_STATUS_ERROR | 0x0008, /**< Already exists */
+ WIDGET_STATUS_ERROR_BUSY = WIDGET_STATUS_ERROR | 0x0010, /**< Busy so the operation is not started(accepted), try again */
+ WIDGET_STATUS_ERROR_PERMISSION_DENIED = WIDGET_STATUS_ERROR | 0x0020, /**< Permission error */
+ WIDGET_STATUS_ERROR_ALREADY = WIDGET_STATUS_ERROR | 0x0040, /**< Operation is already started */
+ WIDGET_STATUS_ERROR_CANCEL = WIDGET_STATUS_ERROR | 0x0080, /**< Operation is canceled */
+ WIDGET_STATUS_ERROR_IO_ERROR = WIDGET_STATUS_ERROR | 0x0100, /**< I/O Error */
+ WIDGET_STATUS_ERROR_NOT_EXIST = WIDGET_STATUS_ERROR | 0x0200, /**< Not exists */
+ WIDGET_STATUS_ERROR_TIMEOUT = WIDGET_STATUS_ERROR | 0x0400, /**< Timeout */
+ WIDGET_STATUS_ERROR_NOT_IMPLEMENTED = WIDGET_STATUS_ERROR | 0x0800, /**< Operation is not implemented */
+ WIDGET_STATUS_ERROR_NO_SPACE = WIDGET_STATUS_ERROR | 0x1000, /**< No space to operate */
+ WIDGET_STATUS_ERROR_DISABLED = WIDGET_STATUS_ERROR | 0x2000 /**< Disabled */
+} widget_status_e;
+
+/**
+ * @brief Definition for macro function to check whether given code value indicates error or not.
+ * @since_tizen 2.3
+ */
+#define WIDGET_STATUS_IS_ERROR(s) (!!((s) & WIDGET_STATUS_ERROR))
+
+/**
+ * @internal
+ * @brief Set the status for the last operation
+ * @param[in] status widget_status_e status
+ * @since_tizen 2.3
+ * @return void
+ * @see widget_last_status()
+ */
+extern void widget_set_last_status(widget_status_e status);
+
+/**
+ * @brief Get the last error status
+ * @since_tizen 2.3
+ * @return int widget error status
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WIDGET_STATUS_ERROR_NONE successfully operated
+ * @retval #WIDGET_STATUS_ERROR_OUT_OF_MEMORY Memory is not enough
+ * @retval #WIDGET_STATUS_ERROR_ALREADY Already exists or operated
+ * @retval #WIDGET_STATUS_ERROR_BUSY Too busy to handles request, try it again
+ * @retval #WIDGET_STATUS_ERROR_FAULT Fault - Unable to recover from the error
+ * @retval #WIDGET_STATUS_ERROR_EXIST Already exists
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission error
+ * @retval #WIDGET_STATUS_ERROR_CANCEL Operation is canceled
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR I/O Error
+ * @retval #WIDGET_STATUS_ERROR_NOT_EXIST Not exists
+ * @retval #WIDGET_STATUS_ERROR_TIMEOUT Timeout
+ * @retval #WIDGET_STATUS_ERROR_NOT_IMPLEMENTED Operation is not implemented
+ * @retval #WIDGET_STATUS_ERROR_NO_SPACE No space to operate
+ * @retval #WIDGET_STATUS_ERROR_DISABLED Disabled
+ */
+extern widget_status_e widget_last_status(void);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* End of a file */
diff --git a/include/widget_script.h b/include/widget_script.h
new file mode 100755
index 0000000..d83aabd
--- /dev/null
+++ b/include/widget_script.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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 __WIDGET_SCRIPT_H
+#define __WIDGET_SCRIPT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file widget_buffer.h
+ * @brief This file describe the buffer ADT and event definitions
+ */
+
+/**
+ * @addtogroup CAPI_WIDGET_SERVICE_MODULE
+ * @{
+ */
+
+/**
+ * @internal
+ * @brief Enumeration for script event of widget.
+ * @details
+ * This enumeration values will be used for script plugin of data-provider-master.
+ * Master will send down these accessibility events to the script plugin.
+ * @since_tizen 2.3
+ */
+typedef enum widget_script_event {
+ WIDGET_SCRIPT_ACCESS_EVENT = 0x01000000, /**< Mask value */
+ WIDGET_SCRIPT_MOUSE_EVENT = 0x02000000, /**< Mask value */
+ WIDGET_SCRIPT_KEY_EVENT = 0x04000000, /**< Mask value */
+
+ WIDGET_SCRIPT_ACCESS_HIGHLIGHT = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000001, /**< Highlight */
+ WIDGET_SCRIPT_ACCESS_HIGHLIGHT_NEXT = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000002, /**< Move Highlight focus to the next object */
+ WIDGET_SCRIPT_ACCESS_HIGHLIGHT_PREV = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000004, /**< Move Highlight focus to the prev object */
+ WIDGET_SCRIPT_ACCESS_ACTIVATE = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000008, /**< Activate the highlighted object */
+ WIDGET_SCRIPT_ACCESS_ACTION = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000010, /**< Do specified action for the highlighted object */
+ WIDGET_SCRIPT_ACCESS_SCROLL = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000020, /**< Scroll operation */
+ WIDGET_SCRIPT_ACCESS_UNHIGHLIGHT = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000040, /**< Remove highlight */
+ WIDGET_SCRIPT_ACCESS_VALUE_CHANGE = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000080, /* TODO: deprecate this */
+ WIDGET_SCRIPT_ACCESS_MOUSE = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000100, /* give mouse event to highlight object */
+ WIDGET_SCRIPT_ACCESS_BACK = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000200, /* go back to a previous view ex: pop naviframe item */
+ WIDGET_SCRIPT_ACCESS_OVER = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000400, /* mouse over an object */
+ WIDGET_SCRIPT_ACCESS_READ = WIDGET_SCRIPT_ACCESS_EVENT | 0x00000800, /* highlight an object */
+ WIDGET_SCRIPT_ACCESS_ENABLE = WIDGET_SCRIPT_ACCESS_EVENT | 0x00001000, /* enable highlight and read ability */
+ WIDGET_SCRIPT_ACCESS_DISABLE = WIDGET_SCRIPT_ACCESS_EVENT | 0x00002000, /* disable highlight and read ability */
+
+ WIDGET_SCRIPT_MOUSE_DOWN = WIDGET_SCRIPT_MOUSE_EVENT | 0x00001000, /**< Mouse down */
+ WIDGET_SCRIPT_MOUSE_MOVE = WIDGET_SCRIPT_MOUSE_EVENT | 0x00002000, /**< Mouse move */
+ WIDGET_SCRIPT_MOUSE_UP = WIDGET_SCRIPT_MOUSE_EVENT | 0x00004000, /**< Mouse up */
+ WIDGET_SCRIPT_MOUSE_IN = WIDGET_SCRIPT_MOUSE_EVENT | 0x00008000, /**< Mouse in */
+ WIDGET_SCRIPT_MOUSE_OUT = WIDGET_SCRIPT_MOUSE_EVENT | 0x00010000, /**< Mouse out */
+
+ WIDGET_SCRIPT_MOUSE_ON_SCROLL = WIDGET_SCRIPT_MOUSE_EVENT | 0x00020000, /**< If the box in in scroller and it is scrolled */
+ WIDGET_SCRIPT_MOUSE_OFF_SCROLL = WIDGET_SCRIPT_MOUSE_EVENT | 0x00040000, /**< If the box is in scroller but the scroll is stopped */
+ WIDGET_SCRIPT_MOUSE_ON_HOLD = WIDGET_SCRIPT_MOUSE_EVENT | 0x00080000, /**< Even though the box gets mouse_up event, the click event will not be generated */
+ WIDGET_SCRIPT_MOUSE_OFF_HOLD = WIDGET_SCRIPT_MOUSE_EVENT | 0x00100000, /**< Generate the click event if the mouse_up event occurred as normal */
+
+ WIDGET_SCRIPT_KEY_DOWN = WIDGET_SCRIPT_KEY_EVENT | 0x00020000, /**< Key pressed */
+ WIDGET_SCRIPT_KEY_UP = WIDGET_SCRIPT_KEY_EVENT | 0x00040000, /**< Key released */
+ WIDGET_SCRIPT_KEY_FOCUS_IN = WIDGET_SCRIPT_KEY_EVENT | 0x00080000, /**< Key focus in */
+ WIDGET_SCRIPT_KEY_FOCUS_OUT = WIDGET_SCRIPT_KEY_EVENT | 0x00100000, /**< Key focus out */
+} widget_script_event_e;
+
+/**
+ * @brief definition of event info structure
+ * @since_tizen 2.3
+ */
+typedef struct widget_event_info *widget_event_info_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/* End of a file */
diff --git a/include/widget_service.h b/include/widget_service.h
new file mode 100755
index 0000000..4fbc1f8
--- /dev/null
+++ b/include/widget_service.h
@@ -0,0 +1,1073 @@
+/*
+ * Copyright 2013 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (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 __WIDGET_SERVICE_H
+#define __WIDGET_SERVICE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file dynamic-service.h
+ * @brief This file declares API of libdynamic-service library
+ * @since_tizen 2.4
+ */
+
+/**
+ * @addtogroup CAPI_WIDGET_SERVICE_MODULE
+ * @{
+ */
+
+/**
+ * @brief Index of buffer
+ * @since_tizen 2.4
+ */
+#define WIDGET_PRIMARY_BUFFER -1
+#define WIDGET_UNKNOWN_BUFFER -2
+
+/**
+ * @brief Definition for maximum number of supported widget size type.
+ * @since_tizen 2.4
+ */
+#define WIDGET_NR_OF_SIZE_LIST 13
+
+#define WIDGET_CH_IDX(a, idx) (((char *)(a))[(idx)])
+#define WIDGET_IS_INHOUSE(abi) ((WIDGET_CH_IDX(abi, 0) == 'c' || WIDGET_CH_IDX(abi, 0) == 'C') && (WIDGET_CH_IDX(abi, 1) == '\0' || ((WIDGET_CH_IDX(abi, 1) == 'p' || WIDGET_CH_IDX(abi, 1) == 'P') && (WIDGET_CH_IDX(abi, 2) == 'p' || WIDGET_CH_IDX(abi, 2) == 'P') && WIDGET_CH_IDX(abi, 3) == '\0')))
+
+/**
+ * @brief Enumeration for list of supporting widget size types.
+ * @since_tizen 2.4
+ */
+typedef enum widget_size_type {
+ WIDGET_SIZE_TYPE_1x1 = 0x0001, /**< 175x175 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_2x1 = 0x0002, /**< 354x175 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_2x2 = 0x0004, /**< 354x354 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_4x1 = 0x0008, /**< 712x175 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_4x2 = 0x0010, /**< 712x354 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_4x3 = 0x0020, /**< 712x533 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_4x4 = 0x0040, /**< 712x712 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_4x5 = 0x0080, /**< 712x891 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_4x6 = 0x0100, /**< 712x1070 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_EASY_1x1 = 0x1000, /**< 224x215 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_EASY_3x1 = 0x2000, /**< 680x215 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_EASY_3x3 = 0x4000, /**< 680x653 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_0x0 = 0x0800, /**< 720x1280 based on 720x1280 resolution */
+ WIDGET_SIZE_TYPE_UNKNOWN = 0xFFFF /**< Error */
+} widget_size_type_e;
+
+/**
+ * @internal
+ * @brief Enumeration for result of accessibility event processing.
+ * @details Reference the libprovider & libwidget-viewer.
+ * @since_tizen 2.4
+ */
+typedef enum widget_access_status {
+ WIDGET_ACCESS_STATUS_ERROR = 0x80000000, /**< Mask value */
+ WIDGET_ACCESS_STATUS_DONE = 0x00000000, /**< Successfully finished */
+ WIDGET_ACCESS_STATUS_FIRST, /**< Reach to the first item */
+ WIDGET_ACCESS_STATUS_LAST, /**< Reach to the last item */
+ WIDGET_ACCESS_STATUS_READ /**< TTS is done */
+} widget_access_status_e;
+
+/**
+ * @internal
+ * @brief Key event handling result status.
+ * @since_tizen 2.4
+ */
+typedef enum widget_key_status {
+ WIDGET_KEY_STATUS_ERROR = 0x80000000, /**< Key operation is failed */
+ WIDGET_KEY_STATUS_DONE = 0x00000000, /**< Key operation is successfully done */
+ WIDGET_KEY_STATUS_FIRST, /**< Focusable object item reaches to the first in it */
+ WIDGET_KEY_STATUS_LAST, /**< Focusable object item reaches to the last in it */
+} widget_key_status_e;
+
+/**
+ * @brief Delete type for widget delete operation.
+ * @since_tizen 2.4
+ */
+typedef enum widget_delete_type {
+ WIDGET_DELETE_PERMANENTLY = 0x01, /**< The widget is removed from the homescreen temporary */
+ WIDGET_DELETE_TEMPORARY = 0x02, /**< The widget is removed from the homescreen by user permanently */
+ WIDGET_DELETE_INVALID = 0xff, /**< Unknown event type */
+} widget_delete_type_e;
+
+/**
+ * @brief Request type for closing Glance Bar
+ * @since_tizen 2.4
+ */
+typedef enum widget_gbar_close_type {
+ WIDGET_CLOSE_GBAR_NORMAL = 0x00, /**< Glance Bar is closed normally */
+ WIDGET_CLOSE_GBAR_TIMEOUT = 0x01, /**< Glance Bar is closed because of timeout, there is no response */
+ WIDGET_CLOSE_GBAR_FAULT = 0x02, /**< Glance Bar is closed because of unrecoverable error */
+ WIDGET_CLOSE_GBAR_INVALID = 0xff, /**< Unknown event type */
+} widget_gbar_close_type_e;
+
+/**
+ * @internal
+ * @brief Type of widget content sharing method
+ * @since_tizen 2.4
+ */
+typedef enum widget_widget_type {
+ WIDGET_TYPE_NONE = 0x0, /**< Undefined */
+ WIDGET_TYPE_SCRIPT, /**< Script base */
+ WIDGET_TYPE_FILE, /**< File base */
+ WIDGET_TYPE_TEXT, /**< Text base */
+ WIDGET_TYPE_BUFFER, /**< Buffer base */
+ WIDGET_TYPE_UIFW /**< UIFW supported type */
+} widget_widget_type_e;
+
+/**
+ * @internal
+ * @brief Type of glance bar content sharing method
+ * @since_tizen 2.4
+ */
+typedef enum widget_gbar_type {
+ GBAR_TYPE_NONE = 0x0, /**< Undefined */
+ GBAR_TYPE_SCRIPT, /**< Script base */
+ GBAR_TYPE_TEXT, /**< Text base */
+ GBAR_TYPE_BUFFER, /**< Buffer base */
+ GBAR_TYPE_UIFW /**< UIFW supported type */
+} widget_gbar_type_e;
+
+/**
+ * @brief Destroy type of widget instance
+ * @since_tizen 2.4
+ */
+typedef enum widget_destroy_type {
+ WIDGET_DESTROY_TYPE_DEFAULT = 0x00, /**< Deleted */
+ WIDGET_DESTROY_TYPE_UPGRADE = 0x01, /**< Deleted for upgrading */
+ WIDGET_DESTROY_TYPE_UNINSTALL = 0x02, /**< Deleted by uninstalling */
+ WIDGET_DESTROY_TYPE_TERMINATE = 0x03, /**< Deleted for reboot device */
+ WIDGET_DESTROY_TYPE_FAULT = 0x04, /**< Deleted by system-fault */
+ WIDGET_DESTROY_TYPE_TEMPORARY = 0x05, /**< Temporarly deleted, will be created again */
+ WIDGET_DESTROY_TYPE_UNKNOWN = 0x06 /**< Undefined reason */
+} widget_destroy_type_e; /**< Delete type */
+
+/**
+ * @brief
+ * Text signal & Content event uses this data structure.
+ * @since_tizen 2.4
+ */
+typedef struct widget_event_info {
+ struct _pointer {
+ double x; /**< X value of current mouse(touch) position */
+ double y; /**< Y value of current mouse(touch) position */
+ int down; /**< Is it pressed(1) or not(0) */
+ } pointer;
+
+ struct _part {
+ double sx; /**< Pressed object's left top X */
+ double sy; /**< Pressed object's left top Y */
+ double ex; /**< Pressed object's right bottom X */
+ double ey; /**< Pressed object's right bottom Y */
+ } part;
+} *widget_event_info_t;
+
+/**
+ * @brief widget Buffer Handler
+ * @since_tizen 2.4
+ */
+typedef struct widget_buffer *widget_buffer_h;
+
+/**
+ * @brief widget Buffer Event information
+ * @since_tizen 2.4
+ */
+typedef struct widget_buffer_event_data *widget_buffer_event_data_t;
+
+/**
+ * @brief widget Buffer Handler
+ * @since_tizen 2.4
+ */
+typedef struct widget_buffer *widget_buffer_h;
+
+/**
+ * @internal
+ * @brief This enumeration values should be sync'd with libwidget interface. (only for inhouse widget)
+ * @since_tizen 2.4
+ */
+typedef enum widget_buffer_event {
+ WIDGET_BUFFER_EVENT_ENTER, /**< get the focus */
+ WIDGET_BUFFER_EVENT_LEAVE, /**< lost the focus */
+ WIDGET_BUFFER_EVENT_DOWN, /**< Touch down */
+ WIDGET_BUFFER_EVENT_MOVE, /**< Touch move */
+ WIDGET_BUFFER_EVENT_UP, /**< Touch up */
+
+ WIDGET_BUFFER_EVENT_KEY_DOWN, /**< Key pressed */
+ WIDGET_BUFFER_EVENT_KEY_UP, /**< Key release */
+ WIDGET_BUFFER_EVENT_KEY_FOCUS_IN, /**< Focus in */
+ WIDGET_BUFFER_EVENT_KEY_FOCUS_OUT, /**< Focus out */
+
+ WIDGET_BUFFER_EVENT_ACCESS_HIGHLIGHT, /**< Accessibility Highlight event */
+ WIDGET_BUFFER_EVENT_ACCESS_HIGHLIGHT_NEXT, /**< Accessibility Highlight Next event */
+ WIDGET_BUFFER_EVENT_ACCESS_HIGHLIGHT_PREV, /**< Accessibility Highlight Prev event */
+ WIDGET_BUFFER_EVENT_ACCESS_ACTIVATE, /**< Accessibility Activate event */
+ WIDGET_BUFFER_EVENT_ACCESS_ACTION_UP, /**< Accessibility Action Up event */
+ WIDGET_BUFFER_EVENT_ACCESS_ACTION_DOWN, /**< Accessibility Action Down event */
+ WIDGET_BUFFER_EVENT_ACCESS_SCROLL_UP, /**< Accessibility Scroll Mouse Up event */
+ WIDGET_BUFFER_EVENT_ACCESS_SCROLL_MOVE, /**< Accessibility Scroll Mouse Move event */
+ WIDGET_BUFFER_EVENT_ACCESS_SCROLL_DOWN, /**< Accessibility Scroll Mouse Down event */
+ WIDGET_BUFFER_EVENT_ACCESS_UNHIGHLIGHT, /**< Accessibility Unhighlight event */
+
+ WIDGET_BUFFER_EVENT_ON_HOLD, /**< To prevent from generating mouse clicked event */
+ WIDGET_BUFFER_EVENT_OFF_HOLD, /**< Disable the mouse hold event */
+ WIDGET_BUFFER_EVENT_ON_SCROLL, /**< Enable the scroll flag */
+ WIDGET_BUFFER_EVENT_OFF_SCROLL, /**< Disable the scroll flag */
+
+ WIDGET_BUFFER_EVENT_ACCESS_VALUE_CHANGE, /**< */
+ WIDGET_BUFFER_EVENT_ACCESS_MOUSE, /**< give mouse event to highlight object */
+ WIDGET_BUFFER_EVENT_ACCESS_BACK, /**< go back to a previous view ex: pop naviframe item */
+ WIDGET_BUFFER_EVENT_ACCESS_OVER, /**< mouse over an object */
+ WIDGET_BUFFER_EVENT_ACCESS_READ, /**< highlight an object */
+ WIDGET_BUFFER_EVENT_ACCESS_ENABLE, /**< enable highlight and read ability */
+ WIDGET_BUFFER_EVENT_ACCESS_DISABLE /**< disable highlight and read ability */
+} widget_buffer_event_e;
+
+/**
+ * @internal
+ * @brief Dynamic Box Buffer Event Data
+ * @since_tizen 2.4
+ */
+typedef struct widget_buffer_event_data {
+ widget_buffer_event_e type; /**< Event type */
+ double timestamp; /**< Timestamp */
+
+ union input_data {
+ struct mouse {
+ int x; /**< Touch X coordinate */
+ int y; /**< Touch Y coordinate */
+ } pointer;
+
+ struct access {
+ int x; /**< Accessibility event X coordinate */
+ int y; /**< Accessibility event Y coordinate */
+ unsigned int mouse_type; /**< 0: down, 1: move, 2: up | 0: cur, 1: next, 2: prev, 3: off */
+ unsigned int action_type; /**< reserved for protocol */
+ unsigned int action_by; /**< reserved for protocol */
+ int cycle; /**< reserved for protocol */
+ } access;
+
+ unsigned int keycode; /**< Key code value */
+ } info;
+} *widget_buffer_event_data_t;
+
+/**
+ * @internal
+ * @brief Package list handle.
+ * @since_tizen 2.4
+ */
+typedef struct widget_pkglist_handle *widget_pkglist_h;
+
+/**
+ * @brief Gets the pixel size of given size type.
+ * @details
+ * Size types would be\n
+ * #WIDGET_SIZE_TYPE_1x1\n
+ * #WIDGET_SIZE_TYPE_2x1\n
+ * #WIDGET_SIZE_TYPE_2x2\n
+ * #WIDGET_SIZE_TYPE_4x1\n
+ * #WIDGET_SIZE_TYPE_4x2\n
+ * #WIDGET_SIZE_TYPE_4x3\n
+ * #WIDGET_SIZE_TYPE_4x4\n
+ * #WIDGET_SIZE_TYPE_4x5\n
+ * #WIDGET_SIZE_TYPE_4x6\n
+ * #WIDGET_SIZE_TYPE_0x0\n
+ * #WIDGET_SIZE_TYPE_EASY_1x1\n
+ * #WIDGET_SIZE_TYPE_EASY_3x1\n
+ * #WIDGET_SIZE_TYPE_EASY_3x3.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @param[in] type Size type
+ * @param[out] width Pixel size width
+ * @param[out] height Pixel size height
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully done
+ * @see widget_size_type()
+ * @see widget_service_size_type()
+ */
+extern int widget_service_get_size(widget_size_type_e type, int *width, int *height);
+
+/**
+ * @brief Gets the size type for given pixel size.
+ * @details
+ * Returnable size types are\n
+ * #WIDGET_SIZE_TYPE_1x1\n
+ * #WIDGET_SIZE_TYPE_2x1\n
+ * #WIDGET_SIZE_TYPE_2x2\n
+ * #WIDGET_SIZE_TYPE_4x1\n
+ * #WIDGET_SIZE_TYPE_4x2\n
+ * #WIDGET_SIZE_TYPE_4x3\n
+ * #WIDGET_SIZE_TYPE_4x4\n
+ * #WIDGET_SIZE_TYPE_4x5\n
+ * #WIDGET_SIZE_TYPE_4x6\n
+ * #WIDGET_SIZE_TYPE_0x0\n
+ * #WIDGET_SIZE_TYPE_EASY_1x1\n
+ * #WIDGET_SIZE_TYPE_EASY_3x1\n
+ * #WIDGET_SIZE_TYPE_EASY_3x3\n
+ * or\n
+ * #WIDGET_SIZE_TYPE_UNKNOWN for error.
+ * @since_tizen 2.4
+ * @param[in] width Pixel size width
+ * @param[in] height Pixel size height
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_SIZE_TYPE_[EASY_]WxH Size type of given pixel size
+ * @retval #WIDGET_SIZE_TYPE_UNKNOWN If the given pixel size is not valid, widget_last_status() will returns reason of failure.
+ * @see widget_size_type()
+ * @see widget_service_get_size()
+ */
+extern widget_size_type_e widget_service_size_type(int width, int height);
+
+/**
+ * @brief Supports the mouse event of widget content.
+ * @details This function will returns true/false, but even if this fails to access database to retrieve information,
+ * This will returns 0. in that case, you can check it using widget_last_status() function.
+ * If there is an error, it will returns proper error code.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @param[in] widgetid widget AppId
+ * @return int type
+ * @retval 1 If the box requires mouse event, A viewer must has to feed the mouse event to the box instance
+ * @retval 0 If the box doesn't requires mouse event, In this case, you can check whether it is error or not using widget_last_status() function.
+ * @see widget_service_touch_effect()
+ * @see widget_service_need_frame()
+ * @see widget_last_status()
+ */
+extern int widget_service_mouse_event(const char *widgetid, int size_type);
+
+/**
+ * @brief Requires touch effect.
+ * @details If this API returns true(1), the viewer should make touch effect when a user click the widget.
+ * This function returns 1 even if it fails to retrieve information from Database.
+ * So if you need validate the information whether it is correct or not, you can use widget_last_status() function.
+ * Even if this function returns 1, It is recommended to check last status of this function call.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @param[in] widgetid widget AppId
+ * @param[in] size_type Size type
+ * @return int type
+ * @retval 1 If the box requires touch effect, A viewer should make the touch effect, but it is just recomendation.
+ * @retval 0 If the box doesn't requires touch effect, the box will make touch effect itself
+ * @see widget_service_mouse_event()
+ * @see widget_service_need_frame()
+ * @see widget_last_status()
+ */
+extern int widget_service_touch_effect(const char *widgetid, int size_type);
+
+/**
+ * @brief Requires decoration frame.
+ * @details If this API returns true(1), the viewer should make decoration border on the widget content.
+ * If this function returns 0, you can validate it using widget_last_status() function.
+ * If something goes wrong, so this fails to retrieve information, you can check reason why it fails to get it
+ * using widget_last_status() function.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @param[in] widgetid widget AppId
+ * @param[in] size_type Size type
+ * @return int type
+ * @retval 1 If the box requires frame for decorating its contents
+ * @retval 0 If the box doesn't requires frame
+ * @see widget_service_mouse_event()
+ * @see widget_service_touch_effect()
+ * @see widget_last_status()
+ */
+extern int widget_service_need_frame(const char *widgetid, int size_type);
+
+/**
+ * @brief Triggers the update event for given widget instance.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @param[in] instance_id Set @c NULL if you don't know what the Id is. Then every instance of given pkgname will be triggered its update event
+ * @param[in] cluster Cluster name. Default @c NULL
+ * @param[in] category Category name, Default @c NULL
+ * @param[in] content New content information, Default @c NULL
+ * @param[in] force 1 if you want to update your widget even if the provider is paused or 0. 0 is default
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.provider
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_CANCEL Provider is paused, so this update request is canceld.(ignored), if you want to make update forcely, use force=1
+ * @retval #WIDGET_STATUS_ERROR_MEMORY Memory is not enough to make request
+ * @retval #WIDGET_STATUS_ERROR_FAULT Failed to create a request packet
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully requested
+ * @see widget_service_trigger_update()
+ */
+extern int widget_service_trigger_update(const char *widgetid, const char *instance_id, const char *cluster, const char *category, const char *content, int force);
+
+/**
+ * @brief Changes the update period of given widget instance.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @param[in] instance_id widget instance id
+ * @param[in] period New update period in sec
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.provider
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully changed(requested)
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_FAULT Failed to create a request packet
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_STATUS_ERROR_MEMORY Not enough memory
+ */
+extern int widget_service_change_period(const char *widgetid, const char *instance_id, double period);
+
+/**
+ * @internal
+ * @brief Gets synchronous package list.
+ * @details
+ * callback (appid, widgetid, is_prime)\n
+ * pkgid == Package ID (pkgname)\n
+ * widgetid = widget AppId\n
+ * is_prime = 1 if the widget is default one for associated application package\n
+ * If the callback returns negative value, the list crawling will be stopped.
+ * @since_tizen 2.4
+ * @param[in] cb Callback function
+ * @param[in] data Callback data
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval count Count of widget packages
+ * @see widget_service_get_pkglist_by_pkgid()
+ */
+extern int widget_service_get_pkglist(int (*cb)(const char *pkgid, const char *widgetid, int is_prime, void *data), void *data);
+
+/**
+ * @internal
+ * @brief Gets synchronous uiapp list.
+ * @details
+ * Callback (appid, data)\n
+ * This function will retrieve all UI Apps in a package which has given widget appid(widgetid).\n
+ * If you need to get all ui-app list, using a widget appid, this function is able to help you.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget App Id
+ * @param[in] cb Callback function
+ * @param[in] data Callback Data
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_NONE Status success
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_MEMORY Memory error
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #WIDGET_STATUS_ERROR_FAULT Unrecoverable error occurred
+ */
+extern int widget_service_get_applist(const char *widgetid, void (*cb)(const char *widgetid, const char *appid, void *data), void *data);
+
+/**
+ * @brief Gets the MAIN application Id of given widget package Id.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @param[in] widgetid widget Package Id
+ * @return char * type
+ * @retval @c NULL If it fails to get main application Id (UI-APPID), widget_last_status() will returns reason of failure.
+ * @retval appid Main application Id
+ * @see widget_last_status()
+ */
+extern char *widget_service_mainappid(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets synchronous package list.
+ * @details
+ * callback (widgetid, is_prime)\n
+ * widgetid == widget AppId\n
+ * is_prime = 1 if the widget is default one for selected package\n
+ * If the callback returns negative value, the list crawling will be stopped.
+ * @since_tizen 2.4
+ * @param[in] pkgid Package Id (Not the UI App Id)
+ * @param[in] cb Callback function
+ * @param[in] data Callback data
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval int Count of widget packages
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @see widget_service_get_pkglist()
+ */
+extern int widget_service_get_pkglist_by_pkgid(const char *pkgid, int (*cb)(const char *widgetid, int is_prime, void *data), void *data);
+
+/**
+ * @internal
+ * @brief Gets synchronous package list.
+ * @details
+ * callback (widgetid)\n
+ * widgetid == widget AppId\n
+ * If the callback returns negative value, the list crawling will be stopped
+ * @since_tizen 2.4
+ * @param[in] category Name of category
+ * @param[in] cb Callback function
+ * @param[in] data Callback data
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int count
+ * @retval Count of widget packages
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @see widget_service_get_pkglist_by_pkgid()
+ */
+extern int widget_service_get_pkglist_by_category(const char *category, int (*cb)(const char *widgetid, void *data), void *data);
+
+/**
+ * @brief Gets the id of a primary widget using given (widget or package or UI app) Id. If a given id is a widget id, check its existence. and if it is package or ui-app id, then find the primary widget in its package.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @param[in] id Dynamic Box Id or Package Id or UI App Id
+ * @return char * type
+ * @retval @c NULL Failed to get primary widgetid, widget_last_status() will returns reason of failure.
+ * @retval widgetid Primary widget Id. which is allocated in the heap
+ * @pre Must be released returned string by manually.
+ * @see widget_service_package_id()
+ */
+extern char *widget_service_widget_id(const char *id);
+
+/**
+ * @internal
+ * @brief Checks the primary flag of given widget Id.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget Id
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval 0 If is not a primary, widget_last_status() will returns reason of failure if it fails.
+ * @retval 1 If it is a primary widget
+ */
+extern int widget_service_is_primary(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Get the category using given widgetid.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char *
+ * @retval @c NULL Failed to get primary widgetid, widget_last_status() will returns reason of failure if it fails.
+ * @retval category Category string which is allocated in the heap.
+ * @pre Must be released returned string by manually
+ * @post N/A
+ * @see widget_service_widget_id()
+ */
+extern char *widget_service_category(const char *widgetid);
+
+/**
+ * @brief Gets the name of a widget (provider name == widget appid), you have to release the return value after use it.
+ * @details
+ * widget has provider process for each widget instances.\n
+ * To get the provider's package name, you can use this API.\n
+ * If the given widgetid is inhouse widget, the return string will be the same with given argument but it is allocated in the heap.
+ * @since_tizen 2.4
+ * @privlevel N/P
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @param[in] widgetid widget Id
+ * @retval @c NULL Failed to get provider name, widget_last_status() will returns reason of failure if it fails.
+ * @retval widgetid widget AppId which is allocated on the heap
+ * @post Returned string must be free'd manually.
+ */
+extern char *widget_service_provider_name(const char *widgetid);
+
+/**
+ * @brief Gets the appId of setup app which is specified by given widget Id's manifest.
+ * @details
+ * This setup app should be launched before adding the widget to get the content_info.\n
+ * This function should be called before add a widget.\n
+ * To determine the content information string.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @param[in] widgetid widget Id
+ * @return char * type
+ * @retval @c NULL There is no setup application or error occurred, you can check it using widget_last_status()
+ * @retval appid AppId if exists or @c NULL
+ * @post Returned string must be free'd manually.
+ * @see widget_last_status()
+ */
+extern char *widget_service_setup_appid(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets the Package Id (Not the UI App Id) of given widget, &lt;manifest package="AAA"&gt; tag.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval appid String which is allocated in the heap
+ * @retval @c NULL Invalid appid, widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd manually.
+ * @see widget_service_widget_id()
+ */
+extern char *widget_service_package_id(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gives Internationalized name of widget package.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @param[in] lang Locale(en-us, ko-kr, ...), if it is @c NULL, function will use the system locale automatically
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval name If it fails to get name
+ * @retval @c NULL Allocated heap address, widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd by manually.
+ * @see widget_service_i18n_icon()
+ * @see widget_service_preview()
+ */
+extern char *widget_service_i18n_name(const char *widgetid, const char *lang);
+
+/**
+ * @internal
+ * @brief Gets the preview image path of given size type.
+ * @details This function will returns i18nized preview image path.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @param[in] size_type widget size type
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval path Preview image path
+ * @retval @c NULL There is no preview image file, widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd manually.
+ * @see widget_service_i18n_icon()
+ * @see widget_service_i18n_name()
+ */
+extern char *widget_service_preview(const char *widgetid, int size_type);
+
+/**
+ * @internal
+ * @brief Gets the default content string of the given widget.
+ * @details
+ * If the user defines the default content string in the manifest file (.xml),\n
+ * this API will return it.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval content Content string
+ * @retval @c NULL There is no specified content string, or widget_last_status() will returns reason of failure if it fails.
+ * @pre Manifest has the default content string. &lt;content&gt;Default content string&lt;content&gt; tag.
+ * @post Returned string must be free'd manually.
+ */
+extern char *widget_service_content(const char *widgetid);
+
+/**
+ * @brief Gives Internationalized icon path of given widget package.
+ * @details The user should free the returned string with free().
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId (It must has to be a widget package ID. not the UI-APP and the PACKAGE)
+ * @param[in] lang Locale(en-us, ko-kr, ...), if it is @c NULL, function will use the system locale automatically
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval name Allocated heap address
+ * @retval @c NULL Fails to get path of an icon, widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd manually.
+ * @see widget_service_i18n_name()
+ * @see widget_service_preview()
+ */
+extern char *widget_service_i18n_icon(const char *pkgid, const char *lang);
+
+/**
+ * @internal
+ * @brief Gets the "nodisplay" value.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval 1 The box should not be listed by the widget list app
+ * @retval 0 Box should be listed, widget_last_status() will returns reason of failure if it fails.
+ * @pre widget tag includes "nodisplay" attribute.
+ */
+extern int widget_service_nodisplay(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets the "ABI" of given package.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval abi String which is allocated in the heap
+ * @retval @c NULL Failed to get ABI of given widget, widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd manually.
+ */
+extern char *widget_service_abi(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Checks the status of the widget.
+ * @details Currently this API is not implemented. It just returns 1 all the time.
+ * @since_tizen 2.4
+ * @remarks This API is not implemented. It will always return 1.
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval 1 Enabled
+ * @retval 0 Disabled
+ */
+extern int widget_service_is_enabled(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets the script file of widget.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval string Script file path
+ * @retval @c NULL Not specified script file, widget_last_status() will returns reason of failure if it fails.
+ * @pre widget should be developed as script type.
+ * @post Return'd string must be free'd manually.
+ * @see widget_service_widget_script_group()
+ */
+extern char *widget_service_widget_script_path(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets the script group of widget.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval Group Name of widget
+ * @retval @c NULL If there is no group defined, or widget_last_status() will returns reason of failure if it fails.
+ * @pre widget should be developed as script type.
+ * @post Return'd string must be free'd manually.
+ * @see widget_service_widget_script_path()
+ */
+extern char *widget_service_widget_script_group(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets the script file path of given widget package.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval string Script file path
+ * @retval @c NULL No specified script file for Glance Bar layout, or widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd manually.
+ * @see widget_service_gbar_script_group()
+ */
+extern char *widget_service_gbar_script_path(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets the group name for script file to load it.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval string Script group name
+ * @retval @c NULL No script path, or widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd manually.
+ * @see widget_service_gbar_script_path()
+ */
+extern char *widget_service_gbar_script_group(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Gets the supported size list.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @param[in] cnt Count of array w and h
+ * @param[in] w Width array
+ * @param[in] h Height array
+ * @param[out] cnt Count of array w and h
+ * @param[out] w Width array
+ * @param[out] h Height array
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_NONE If succeed to get supported size list
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @see widget_service_get_supported_size_types()
+ */
+extern int widget_service_get_supported_sizes(const char *widgetid, int *cnt, int *w, int *h);
+
+/**
+ * @internal
+ * @brief Gets the supported size list of given pkgid.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @param[in] cnt Size of types array
+ * @param[out] cnt Result count of types array
+ * @param[out] types Array of types
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully done
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @see widget_service_get_supported_sizes()
+ */
+extern int widget_service_get_supported_size_types(const char *widgetid, int *cnt, int *types);
+
+/**
+ * @internal
+ * @brief Gets the category list of given cluster.
+ * @since_tizen 2.4
+ * @param[in] cluster Cluster name
+ * @param[in] cb Callback function
+ * @param[in] data Callback data
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully done
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @see widget_service_enumerate_cluster_list()
+ */
+extern int widget_service_enumerate_category_list(const char *cluster, int (*cb)(const char *cluster, const char *category, void *data), void *data);
+
+/**
+ * @internal
+ * @brief Gets the cluster list.
+ * @since_tizen 2.4
+ * @param[in] cb Callback function for retrieving the cluster list
+ * @param[in] data Callback data
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access DB
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @retval count Count of category items
+ * @see widget_service_enumerate_category_list()
+ */
+extern int widget_service_enumerate_cluster_list(int (*cb)(const char *cluster, void *data), void *data);
+
+/**
+ * @internal
+ * @brief Initializes the widget service API.
+ * @details Open the DB file.\n
+ * You don't need to call this if you are using widget service API shortly.\n
+ * But if you are using widget service API while whole life of your S/W,
+ * using this, initate the widget service is more benefical to you.\n
+ * This API will prepare the DB operation, if you don't initiate the widget service,
+ * every API which are related with DB operation will open DB and close it before return from it.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_NONE Succeed to initialize
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to access a DB
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @see widget_service_fini()
+ */
+extern int widget_service_init(void);
+
+/**
+ * @internal
+ * @brief Finalizes the widget service API.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_NONE Succeed to finalize
+ * @retval #WIDGET_STATUS_ERROR_IO_ERROR Failed to close the DB (access failed to DB)
+ * @retval #WIDGET_STATUS_ERROR_PERMISSION_DENIED Permission denied
+ * @pre widget_service_init.
+ * @see widget_service_init()
+ */
+extern int widget_service_fini(void);
+
+/**
+ * @internal
+ * @brief Creates a handle for getting the package list.
+ * @details
+ * If you want get the record one by one from DB, use this.\n
+ * This function will create a iterator.\n
+ * Then you can get the records one by one, but there is no backward iterator.\n
+ * You can only get a forward iterator.\n
+ * After calling this function the iterator will be moved to the next record automatically.
+ * @since_tizen 2.4
+ * @remarks
+ * If you call this function again using created pkglist handle, it will be reset.
+ * So you can get records from the first one again.
+ * @param[in] widgetid widget AppId
+ * @param[in] handle @c NULL if you call this first, or it will be reset
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return handle
+ * @retval @c NULL If it fails, widget_last_status() will returns reason of failure if it fails.
+ * @retval handle If it successfully create the package list iterator
+ * @see widget_service_pkglist_destroy()
+ */
+extern widget_pkglist_h widget_service_pkglist_create(const char *widgetid, widget_pkglist_h handle);
+
+/**
+ * @internal
+ * @brief Gets the widgetid & package name & is_prime flag.
+ * @since_tizen 2.4
+ * @param[in] handle Handle which is created by widget_service_pkglist_create() function
+ * @param[out] widgetid widget Id
+ * @param[out] pkgname Package Id which includes widgetes
+ * @param[out] is_prime If the returned widgetid is primary, this will be 1 or 0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully get the record
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid argument
+ * @retval #WIDGET_STATUS_ERROR_NOT_EXIST Reach to the end of result set. you can rewind the iterator call widget_service_pkglist_create() again with current handle
+ * @retval #WIDGET_STATUS_ERROR_MEMORY Not enough memory
+ * @post You must release the widgetid, pkgname manually.
+ * @see widget_service_pkglist_create()
+ * @see widget_service_pkglist_destroy()
+ */
+extern int widget_service_get_pkglist_item(widget_pkglist_h handle, char **widgetid, char **pkgname, int *is_prime);
+
+/**
+ * @internal
+ * @brief Destroys the iterator of pkglist.
+ * @since_tizen 2.4
+ * @param[in] handle Package list handle
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return int type
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid handle
+ * @retval #WIDGET_STATUS_ERROR_NONE Successfully destroyed
+ * @pre Handle must be created by widget_service_pkglist_create().
+ * @post You have not to use the handle again after destroy it.
+ * @see widget_service_pkglist_create()
+ */
+extern int widget_service_pkglist_destroy(widget_pkglist_h handle);
+
+/**
+ * @internal
+ * @brief Getting the activated instance count.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget Id, if you want to get whole instnaces list, use NULL.
+ * @param[in] cluster Cluster name if you don't know what this is, use NULL.
+ * @param[in] category Sub-cluster(category) name if you don't know what this is, use NULL.
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return count of instances
+ * @retval #WIDGET_STATUS_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WIDGET_STATUS_ERROR_FAULT Unrecorvarable error occurred
+ * @retval count Positive value including ZERO, Count of activated instances on viewers
+ */
+extern int widget_service_get_instance_count(const char *widgetid, const char *cluster, const char *category);
+
+/**
+ * @internal
+ * @brief Gets the path of the plug-in module.
+ * @since_tizen 2.4
+ * @param[in] widgetid widget AppId
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char * type
+ * @retval path String which is allocated on the heap
+ * @retval @c NULL No libexec attribute, or widget_last_status() will returns reason of failure if it fails.
+ * @post Returned string must be free'd manually.
+ */
+extern char *widget_service_libexec(const char *widgetid);
+
+/**
+ * @internal
+ * @brief Find the lbid using its libexec
+ * @details only if the widget should use the "libexec" attribute in its "<widget>" tag
+ * @since_tizen 2.4
+ * @remarks Only usable for inhouse widgetes
+ * @param[in] libexec so filename
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @feature http://tizen.org/feature/shell.appwidget
+ * @return char *
+ * @retval @c NULL if it fails to get pkgname, widget_last_status() will returns reason of failure.
+ * @retval address heap address of pkgname
+ * @post return'd string should be released by "free()"
+ */
+extern char *widget_service_widget_id_by_libexec(const char *libexec);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/* End of a file */