Replace livebox with dynamicbox
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 30 Oct 2014 01:40:10 +0000 (10:40 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Thu, 30 Oct 2014 01:56:56 +0000 (10:56 +0900)
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]

Change-Id: I5b7bafa604e2d3c19e425a514cb6d4271c931140

66 files changed:
CMakeLists.txt [changed mode: 0755->0644]
data/CMakeLists.txt
data/abi.ini
data/dump_dynamicbox.sh [new file with mode: 0644]
data/dump_livebox.sh [deleted file]
data/wayland.mobile.conf.ini
data/wayland.wearable.conf.ini
data/x11.mobile.320x480.conf.ini
data/x11.mobile.480x800.conf.ini
data/x11.mobile.conf.ini
data/x11.wearable.360x480.conf.ini
data/x11.wearable.conf.ini
include/buffer_handler.h
include/conf.h
include/debug.h
include/group.h
include/instance.h
include/io.h
include/lite-errno.h
include/package.h
include/parser.h
include/provider_cmd_list.h [deleted file]
include/util.h
packaging/data-provider-master.manifest
packaging/data-provider-master.spec
pkgmgr_dynamicbox/CMakeLists.txt [moved from pkgmgr_livebox/CMakeLists.txt with 83% similarity]
pkgmgr_dynamicbox/dynamicbox.xml [moved from pkgmgr_livebox/livebox.xml with 64% similarity]
pkgmgr_dynamicbox/include/dlist.h [moved from pkgmgr_livebox/include/dlist.h with 100% similarity]
pkgmgr_dynamicbox/src/dlist.c [moved from pkgmgr_livebox/src/dlist.c with 100% similarity]
pkgmgr_dynamicbox/src/service_register.c [moved from pkgmgr_livebox/src/service_register.c with 78% similarity]
src/abi.c
src/badge_service.c
src/buffer_handler.c
src/buffer_handler_wayland.c
src/client_life.c
src/client_rpc.c
src/conf.c
src/critical_log.c
src/dead_monitor.c
src/event.c
src/fault_manager.c
src/file_service.c
src/group.c
src/instance.c
src/io.c
src/liveinfo.c
src/main.c
src/notification_service.c [changed mode: 0755->0644]
src/package.c
src/parser.c
src/pkgmgr.c
src/script_handler.c
src/server.c
src/service_common.c
src/setting.c
src/shortcut_service.c [changed mode: 0755->0644]
src/slave_life.c
src/slave_rpc.c
src/util.c
src/util_wayland.c
src/util_x11.c
src/utility_service.c
src/xmonitor.c
src/xmonitor_wayland.c
util_liveinfo/CMakeLists.txt
util_liveinfo/src/liveinfo.c

old mode 100755 (executable)
new mode 100644 (file)
index 004e6ee..ecc8ea1
@@ -26,7 +26,7 @@ pkg_check_modules(pkg REQUIRED
 
 IF (LIVEBOX)
 pkg_check_modules(pkg_livebox REQUIRED
-       livebox-service
+       dynamicbox_service
 )
 ENDIF (LIVEBOX)
 
@@ -100,7 +100,6 @@ SET(BUILD_SOURCE
        src/badge_service.c
        src/notification_service.c
        src/service_common.c
-       src/conf.c
 )
 
 IF (LIVEBOX)
@@ -126,6 +125,7 @@ IF (LIVEBOX)
                src/pkgmgr.c
                src/event.c
                src/file_service.c
+               src/conf.c
        )
 
        IF (WAYLAND_SUPPORT)
@@ -209,7 +209,7 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin PERMISSIONS OWNER_READ OWNE
 ADD_SUBDIRECTORY(res)
 ADD_SUBDIRECTORY(data)
 IF (LIVEBOX)
-ADD_SUBDIRECTORY(pkgmgr_livebox)
+ADD_SUBDIRECTORY(pkgmgr_dynamicbox)
 ENDIF (LIVEBOX)
 
 IF (X11_SUPPORT)
index 215fbaa..56d64c4 100644 (file)
@@ -1,4 +1,4 @@
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/data-provider-master.service DESTINATION /usr/lib/systemd/system/ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
 IF (LIVEBOX)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/dump_livebox.sh DESTINATION /opt/etc/dump.d/module.d/ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/dump_dynamicbox.sh DESTINATION /opt/etc/dump.d/module.d/ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
 ENDIF (LIVEBOX)
index 8d92eaa..d2dbfb1 100644 (file)
@@ -12,6 +12,3 @@ package=gi2qxenosh.osp-appwidget-service
 
 [app]
 package=/APPID/
-
-[dali]
-package=provider.multi-livebox
diff --git a/data/dump_dynamicbox.sh b/data/dump_dynamicbox.sh
new file mode 100644 (file)
index 0000000..1791a31
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+DBOX_DEBUG=$1/dynamicbox
+mkdir -p ${DBOX_DEBUG}
+/bin/cp -r /opt/usr/share/live_magazine ${DBOX_DEBUG}
+/bin/cp -r /tmp/.dbox.service ${DBOX_DEBUG}/log
+/bin/cp -r /opt/dbspace/.dynamicbox.db ${DBOX_DEBUG}
+ls -la /tmp/ | /bin/grep srw > ${DBOX_DEBUG}/log/tmp.hidden_files
diff --git a/data/dump_livebox.sh b/data/dump_livebox.sh
deleted file mode 100644 (file)
index 2fb6c32..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-LIVEBOX_DEBUG=$1/livebox
-mkdir -p ${LIVEBOX_DEBUG}
-/bin/cp -r /opt/usr/share/live_magazine ${LIVEBOX_DEBUG}
-/bin/cp -r /tmp/.dbox.service ${LIVEBOX_DEBUG}/log
-ls -la /tmp/ | /bin/grep srw > ${LIVEBOX_DEBUG}/log/tmp.hidden_files
index b2c700c..468b696 100644 (file)
@@ -16,7 +16,7 @@ slave_relaunch_count=3
 max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
-#db_path=/opt/dbspace/.livebox.db
+#db_path=/opt/dbspace/.dynamicbox.db
 #share_path=/opt/usr/share/live_magazine/
 log_path=/tmp/.dbox.service
 #always_path=/opt/usr/share/live_magazine/always
@@ -31,8 +31,8 @@ overwrite_content=false
 com_core_thread=true
 use_xmonitor=false
 #input=/dev/input/event2
-pd_request_timeout=5.0
+gbar_request_timeout=5.0
 premultiplied=1
 #emergency_disk=source=tmpfs;type=tmpfs;option=size=6M
-#services=[livebox],[shortcut],[notification],[utility],[badge],[file]
+#services=[dynamicbox],[shortcut],[notification],[utility],[badge],[file]
 #auto_align=true
index c286ce0..034a081 100644 (file)
@@ -16,7 +16,7 @@ slave_relaunch_count=3
 max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
-#db_path=/opt/dbspace/.livebox.db
+#db_path=/opt/dbspace/.dynamicbox.db
 #share_path=/opt/usr/share/live_magazine/
 log_path=/tmp/.dbox.service
 #always_path=/opt/usr/share/live_magazine/always
@@ -31,8 +31,8 @@ overwrite_content=false
 com_core_thread=true
 use_xmonitor=false
 #input=/dev/input/event2
-pd_request_timeout=5.0
+gbar_request_timeout=5.0
 premultiplied=0
 #emergency_disk=source=tmpfs;type=tmpfs;option=size=6M
-services=[livebox],[shortcut],[badge]
+services=[dynamicbox],[shortcut],[badge]
 #auto_align=true
index cb15dc9..4811331 100644 (file)
@@ -16,7 +16,7 @@ slave_relaunch_count=3
 max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
-#db_path=/opt/dbspace/.livebox.db
+#db_path=/opt/dbspace/.dynamicbox.db
 #share_path=/opt/usr/share/live_magazine/
 log_path=/tmp/.dbox.service
 #always_path=/opt/usr/share/live_magazine/always
@@ -31,8 +31,8 @@ overwrite_content=false
 com_core_thread=true
 use_xmonitor=false
 #input=/dev/input/event2
-pd_request_timeout=5.0
+gbar_request_timeout=5.0
 premultiplied=0
 #emergency_disk=source=tmpfs;type=tmpfs;option=size=6M
-#services=[livebox],[shortcut],[notification],[utility],[badge],[file]
+#services=[dynamicbox],[shortcut],[notification],[utility],[badge],[file]
 #auto_align=true
index 9ec20a6..ebea45a 100644 (file)
@@ -16,7 +16,7 @@ slave_relaunch_count=3
 max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
-#db_path=/opt/dbspace/.livebox.db
+#db_path=/opt/dbspace/.dynamicbox.db
 #share_path=/opt/usr/share/live_magazine/
 log_path=/tmp/.dbox.service
 #always_path=/opt/usr/share/live_magazine/always
@@ -31,8 +31,10 @@ overwrite_content=false
 com_core_thread=true
 use_xmonitor=false
 input=/dev/input/event1
-pd_request_timeout=5.0
+gbar_request_timeout=5.0
 premultiplied=0
 #emergency_disk=source=tmpfs;type=tmpfs;option=size=6M
-#services=[livebox],[shortcut],[notification],[utility],[badge],[file]
+#services=[dynamicbox],[shortcut],[notification],[utility],[badge],[file]
 auto_align=false
+use_event_time=true
+use_gettimeofday=true
index 9c3dafd..e152a07 100644 (file)
@@ -16,7 +16,7 @@ slave_relaunch_count=3
 max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
-#db_path=/opt/dbspace/.livebox.db
+#db_path=/opt/dbspace/.dynamicbox.db
 #share_path=/opt/usr/share/live_magazine/
 log_path=/tmp/.dbox.service
 #always_path=/opt/usr/share/live_magazine/always
@@ -30,10 +30,10 @@ debug_mode=false
 overwrite_content=false
 com_core_thread=true
 use_xmonitor=false
-input=/dev/input/event2
-pd_request_timeout=5.0
+#input=/dev/input/event2
+gbar_request_timeout=5.0
 premultiplied=0
 #emergency_disk=source=tmpfs;type=tmpfs;option=size=6M
-#services=[livebox],[shortcut],[notification],[utility],[badge],[file]
-auto_align=false
+#services=[dynamicbox],[shortcut],[notification],[utility],[badge],[file]
+#auto_align=true
 #use_event_time=true
index f29bff4..f540ec3 100644 (file)
@@ -16,7 +16,7 @@ slave_relaunch_count=3
 max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
-#db_path=/opt/dbspace/.livebox.db
+#db_path=/opt/dbspace/.dynamicbox.db
 #share_path=/opt/usr/share/live_magazine/
 log_path=/tmp/.dbox.service
 #always_path=/opt/usr/share/live_magazine/always
@@ -31,8 +31,8 @@ overwrite_content=false
 com_core_thread=true
 use_xmonitor=false
 input=/dev/input/event0
-pd_request_timeout=5.0
+gbar_request_timeout=5.0
 premultiplied=0
 #emergency_disk=source=tmpfs;type=tmpfs;option=size=6M
-services=[livebox],[shortcut],[badge]
+services=[dynamicbox],[shortcut],[badge]
 check_lcd=false
index 24b54f6..6119d57 100644 (file)
@@ -16,7 +16,7 @@ slave_relaunch_count=3
 max_log_line=1000
 max_log_file=3
 sqilte_flush_max=1048576
-#db_path=/opt/dbspace/.livebox.db
+#db_path=/opt/dbspace/.dynamicbox.db
 #share_path=/opt/usr/share/live_magazine/
 log_path=/tmp/.dbox.service
 #always_path=/opt/usr/share/live_magazine/always
@@ -31,10 +31,10 @@ overwrite_content=false
 com_core_thread=true
 use_xmonitor=false
 #input=/dev/input/event2
-pd_request_timeout=5.0
+gbar_request_timeout=5.0
 premultiplied=0
 #emergency_disk=source=tmpfs;type=tmpfs;option=size=6M
-services=[livebox],[shortcut],[badge]
+services=[dynamicbox],[shortcut],[badge]
 #auto_align=true
 #use_event_time=true
 check_lcd=false
index 2b0e8cd..ff5cf1d 100644 (file)
@@ -18,12 +18,7 @@ struct buffer_info;
 struct inst_info;
 struct buffer;
 
-enum buffer_type { /*!< Must have to be sync with libprovider, liblivebox-viewer, liblivebox-edje */
-       BUFFER_TYPE_FILE,
-       BUFFER_TYPE_SHM,
-       BUFFER_TYPE_PIXMAP,
-       BUFFER_TYPE_ERROR
-};
+#include <dynamicbox_buffer.h>
 
 /*!
  * \brief
@@ -33,7 +28,7 @@ enum buffer_type { /*!< Must have to be sync with libprovider, liblivebox-viewer
  * \param[in] pixel_size
  * \return buffer_info
  */
-extern struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buffer_type type, int w, int h, int pixel_size);
+extern struct buffer_info *buffer_handler_create(struct inst_info *inst, enum dynamicbox_fb_type type, int w, int h, int pixel_size);
 
 /*!
  * \brief
@@ -90,9 +85,9 @@ extern const char *buffer_handler_id(const struct buffer_info *info);
 
 /*!
  * \param[in] info
- * \return buffer_type
+ * \return dynamicbox_fb_type
  */
-extern enum buffer_type buffer_handler_type(const struct buffer_info *info);
+extern enum dynamicbox_fb_type buffer_handler_type(const struct buffer_info *info);
 
 /*!
  * \brief This API is not supported for Pixmap.
@@ -249,14 +244,14 @@ extern struct inst_info *buffer_handler_instance(struct buffer_info *info);
  * \remarks
  * \param[in] type
  * \param[in] resource
- * \return struct buffer *
+ * \return dynamicbox_fb_t 
  * \retval NULL
  * \retval address
  * \pre
  * \post
  * \sa
  */
-extern struct buffer *buffer_handler_raw_open(enum buffer_type type, void *resource);
+extern dynamicbox_fb_t buffer_handler_raw_open(enum dynamicbox_fb_type type, void *resource);
 
 /*!
  * \brief
@@ -269,7 +264,7 @@ extern struct buffer *buffer_handler_raw_open(enum buffer_type type, void *resou
  * \post
  * \sa
  */
-extern int buffer_handler_raw_close(struct buffer *buffer);
+extern int buffer_handler_raw_close(dynamicbox_fb_t buffer);
 
 /*!
  * \brief
@@ -282,7 +277,7 @@ extern int buffer_handler_raw_close(struct buffer *buffer);
  * \post
  * \sa
  */
-extern void *buffer_handler_raw_data(struct buffer *buffer);
+extern void *buffer_handler_raw_data(dynamicbox_fb_t buffer);
 
 /*!
  * \brief
@@ -295,7 +290,7 @@ extern void *buffer_handler_raw_data(struct buffer *buffer);
  * \post
  * \sa
  */
-extern int buffer_handler_raw_size(struct buffer *buffer);
+extern int buffer_handler_raw_size(dynamicbox_fb_t buffer);
 
 /*!
  * \brief
index b37d71a..a4d0603 100644 (file)
  */
 
 struct conf {
-       int width;
-       int height;
-
-       int base_width;
-       int base_height;
-       double minimum_period;
-
-       struct {
-               char *script;
-               char *abi;
-               char *pd_group;
-               double period;
-               int pixels;
-       } default_conf;
-
-       struct {
-               char *name;
-               char *secured;
-               char *abi;
-       } launch_key;
-
-       double default_packet_time;
-
-       char *empty_content;
-       char *empty_title;
-
-       char *default_content;
-       char *default_title;
-
-       unsigned long minimum_space;
-
-       char *replace_tag;
-
-       double slave_ttl;
-       double slave_activate_time;
-       double slave_relaunch_time;
-       int slave_relaunch_count;
-
-       int max_log_line;
-       int max_log_file;
-
-       unsigned long sqlite_flush_max;
-
-       struct {
-               char *conf;
-               char *image;
-               char *script;
-               char *root;
-               char *script_port;
-               char *slave_log;
-               char *reader;
-               char *always;
-               char *db;
-               char *input;
-       } path;
-
-       int max_size_type;
-
-       int slave_max_load;
-
-       double ping_time;
-
-       char *vconf_sys_cluster;
-       int max_pended_ctx_events;
-
-       int use_sw_backend;
-       char *provider_method;
        int debug_mode;
-       int overwrite_content;
-       int com_core_thread;
-       int use_xmonitor;
-       int premultiplied;
-
-       double scale_width_factor;
-       double scale_height_factor;
-
-       double pd_request_timeout;
-
-       char *emergency_disk;
-       char *services;
-       int auto_align;
-       int use_event_time;
-       int check_lcd;
+       int slave_max_load;
 };
 
 extern struct conf g_conf;
 
-extern int conf_loader(void);
-extern void conf_update_size(void);
-extern void conf_reset(void);
-extern void conf_init(void);
-
-#define BASE_W                 g_conf.base_width
-#define BASE_H                 g_conf.base_height
-
-#define CR 13
-#define LF 10
-
-#define EMERGENCY_DISK         g_conf.emergency_disk
-#define SCALE_WIDTH_FACTOR     g_conf.scale_width_factor
-#define SCALE_HEIGHT_FACTOR    g_conf.scale_height_factor
-
-#define USE_SW_BACKEND         g_conf.use_sw_backend
-#define PROVIDER_METHOD                g_conf.provider_method
-#define DEBUG_MODE             g_conf.debug_mode
-#define OVERWRITE_CONTENT      g_conf.overwrite_content
-#define COM_CORE_THREAD                g_conf.com_core_thread
-
-#define MINIMUM_PERIOD         g_conf.minimum_period
-
-#define DEFAULT_SCRIPT         g_conf.default_conf.script
-#define DEFAULT_ABI            g_conf.default_conf.abi
-#define DEFAULT_GROUP          g_conf.default_conf.pd_group
-#define DEFAULT_PERIOD         g_conf.default_conf.period
-#define DEFAULT_PIXELS         g_conf.default_conf.pixels
-#define PRIORITY_NO_CHANGE     -1.0f
-
-#define BUNDLE_SLAVE_NAME      g_conf.launch_key.name
-#define BUNDLE_SLAVE_SECURED   g_conf.launch_key.secured
-#define BUNDLE_SLAVE_ABI       g_conf.launch_key.abi
-#define PACKET_TIME            g_conf.default_packet_time
-#define CONTENT_NO_CHANGE      g_conf.empty_content
-#define TITLE_NO_CHANGE                g_conf.empty_title
-#define DEFAULT_TITLE          g_conf.default_title
-#define DEFAULT_CONTENT                g_conf.default_content
-#define MINIMUM_SPACE          g_conf.minimum_space
-
-#define IMAGE_PATH             g_conf.path.image
-#define SCRIPT_PATH            g_conf.path.script
-#define SCRIPT_PORT_PATH       g_conf.path.script_port
-#define CONF_PATH              g_conf.path.conf
-#define ROOT_PATH              g_conf.path.root
-#define SLAVE_LOG_PATH         g_conf.path.slave_log
-#define READER_PATH            g_conf.path.reader
-#define ALWAYS_PATH            g_conf.path.always
-#define INPUT_PATH             g_conf.path.input
-
-#define REPLACE_TAG_APPID      g_conf.replace_tag
-#define SLAVE_TTL              g_conf.slave_ttl
-#define SLAVE_ACTIVATE_TIME    g_conf.slave_activate_time
-#define SLAVE_RELAUNCH_TIME    g_conf.slave_relaunch_time
-#define SLAVE_RELAUNCH_COUNT   g_conf.slave_relaunch_count
-
-#define MAX_LOG_LINE           g_conf.max_log_line
-#define MAX_LOG_FILE           g_conf.max_log_file
-
-#define SQLITE_FLUSH_MAX       g_conf.sqlite_flush_max
-#define DBFILE                 g_conf.path.db
-
-#define PD_REQUEST_TIMEOUT     g_conf.pd_request_timeout
-
-#define SLAVE_MAX_LOAD         g_conf.slave_max_load
-#define DEFAULT_PING_TIME      g_conf.ping_time
-#define PREMULTIPLIED_COLOR    g_conf.premultiplied
-#define SERVICES               g_conf.services
-
-#define SERVICE_LIVEBOX                "[livebox]"
-#define SERVICE_NOTIFICATION   "[notification]"
-#define SERVICE_BADGE          "[badge]"
-#define SERVICE_SHORTCUT       "[shortcut]"
-#define SERVICE_UTILITY                "[utility]"
-#define SERVICE_FILE           "[file]"
-
-#define PAUSED_FILE            "/tmp/.live.paused"
-
-#define MAX_ABI                256
-#define MAX_PKGNAME    512
-#define DELAY_TIME     0.0000001f
-#define DEFAULT_CLUSTER        "user,created"
-#define MINIMUM_REACTIVATION_TIME      10
+#define DELAY_TIME 0.0000001f
+#define HAPI __attribute__((visibility("hidden")))
 
 #if !defined(VCONFKEY_MASTER_STARTED)
 #define VCONFKEY_MASTER_STARTED        "memory/data-provider-master/started"
@@ -194,14 +32,7 @@ extern void conf_init(void);
 #define VCONFKEY_MASTER_RESTART_COUNT  "memory/private/data-provider-master/restart_count"
 #endif
 
-#define USE_XMONITOR           g_conf.use_xmonitor
-#define AUTO_ALIGN             g_conf.auto_align
-#define USE_EVENT_TIME         g_conf.use_event_time
-#define CHECK_LCD              g_conf.check_lcd
-
-#define HAPI __attribute__((visibility("hidden")))
-/*!
- * EAPI is defined from eina.h
- */
+#define CR 13
+#define LF 10
 
 /* End of a file */
index cc4911f..ac1a079 100644 (file)
@@ -67,4 +67,6 @@ extern FILE *__file_log_fp;
 #define PERF_MARK(tag)
 #endif
 
+#define HAPI __attribute__((visibility("hidden")))
+
 /* End of a file */
index 04dfddd..8cda595 100644 (file)
@@ -36,8 +36,8 @@ extern const char *group_cluster_name_by_category(struct category *category);
 extern int group_add_package(struct category *category, const char *pkgname);
 extern int group_del_package(struct category *category, const char *pkgname);
 
-extern int group_add_livebox(const char *group, const char *pkgname);
-extern int group_del_livebox(const char *pkgname);
+extern int group_add_dynamicbox(const char *group, const char *pkgname);
+extern int group_del_dynamicbox(const char *pkgname);
 
 extern int group_init(void);
 extern int group_fini(void);
index e189382..781b7a8 100644 (file)
@@ -26,7 +26,7 @@
  * After master successfully allocate heap for an instance,
  * It will send a load request to a specified slave
  * (The slave will be specified when a package informaion is
- * prepared via configuration file of each livebox packages.)
+ * prepared via configuration file of each dynamicbox packages.)
  * We defined this as "REQUEST_TO_ACTIVATE" state.
  *
  * After the slave create a new instance, it will sends back
  * Sometimes, slaves can meet some unexpected problems then
  * it will tries to clear all problems and tries to keep them in safe env.
  * To do this, master or slave can be terminated.
- * In this case, the master has to find the fault module(crashed livebox)
+ * In this case, the master has to find the fault module(crashed dynamicbox)
  * and prevent it from loading at the slave.
- * And it will send requests for re-creating all other normal liveboxes.
+ * And it will send requests for re-creating all other normal dynamicboxes.
  * We defined this as "REQUEST_TO_REACTIVATE".
  *
  * After slave is launched again(recovered from fault situation), it will
  * receives "re-create" event from the master, then it will create all
- * instances of requested liveboxes.
+ * instances of requested dynamicboxes.
  *
  * When the master receives "created" event from the slaves,
  * It will change the instance's state to "ACTIVATED"
  * But now, the master will not send "created" event to the clients.
  *
- * Because the clients don't want to know the re-created liveboxes.
- * They just want to know about fault liveboxes to display deactivated
+ * Because the clients don't want to know the re-created dynamicboxes.
+ * They just want to know about fault dynamicboxes to display deactivated
  * message.
  *
  * Sometimes the master can send requests to the slave to unload instances.
@@ -80,7 +80,7 @@
  * It will change the state of an master to "DESTROYED"
  *
  * There is one more event to change the state of an instance to "DESTROYED".
- * In case of system created livebox, it could be destroyed itself.
+ * In case of system created dynamicbox, it could be destroyed itself.
  * So the slave will send "deleted" event to the master directly.
  * Even if the master doesn't requests to delete it.
  *
@@ -94,16 +94,6 @@ enum instance_event {
        INSTNACE_EVENT_UNKNOWN
 };
 
-enum instance_destroy_type {
-       INSTANCE_DESTROY_DEFAULT = 0x00,
-       INSTANCE_DESTROY_UPGRADE = 0x01,
-       INSTANCE_DESTROY_UNINSTALL = 0x02,
-       INSTANCE_DESTROY_TERMINATE = 0x03,
-       INSTANCE_DESTROY_FAULT = 0x04,
-       INSTANCE_DESTROY_TEMPORARY = 0x05,
-       INSTANCE_DESTROY_UNKNOWN = 0x06
-};
-
 enum instance_state {
        INST_INIT = 0x0, /*!< Only keeps in the master */
 
@@ -119,17 +109,17 @@ enum instance_state {
        INST_REQUEST_TO_DESTROY /*!< Sent a request to a slave, when the master receives deleted event, the master will delete this */
 };
 
-enum livebox_visible_state { /*!< Must be sync'd with livebox-viewer */
-       LB_SHOW = 0x00, /*!< Livebox is showed. Default state */
-       LB_HIDE = 0x01, /*!< Livebox is hide, with no update event, but keep update timer */
+enum dynamicbox_visible_state { /*!< Must be sync'd with dynamicbox-viewer */
+       DBOX_SHOW = 0x00, /*!< Dynamicbox is showed. Default state */
+       DBOX_HIDE = 0x01, /*!< Dynamicbox is hide, with no update event, but keep update timer */
 
-       LB_HIDE_WITH_PAUSE = 0x02, /*!< Livebix is hide, it needs to be paused (with freezed update timer) */
+       DBOX_HIDE_WITH_PAUSE = 0x02, /*!< Dynamicbox is hide, it needs to be paused (with freezed update timer) */
 
-       LB_VISIBLE_ERROR = 0xFFFFFFFF /* To enlarge the size of this enumeration type */
+       DBOX_VISIBLE_ERROR = 0xFFFFFFFF /* To enlarge the size of this enumeration type */
 };
 
-#define IS_PD  1
-#define IS_LB  0
+#define IS_GBAR 1
+#define IS_DBOX 0
 
 struct inst_info;
 struct pkg_info;
@@ -137,8 +127,8 @@ struct script_handle;
 struct client_node;
 
 extern struct inst_info *instance_create(struct client_node *client, double timestamp, const char *pkgname, const char *content, const char *cluster, const char *category, double period, int width, int height);
-extern int instance_destroy(struct inst_info *inst, enum instance_destroy_type type);
-extern int instance_reload(struct inst_info *inst, enum instance_destroy_type type);
+extern int instance_destroy(struct inst_info *inst, dynamicbox_destroy_type_e type);
+extern int instance_reload(struct inst_info *inst, dynamicbox_destroy_type_e type);
 
 extern struct inst_info * instance_ref(struct inst_info *inst);
 extern struct inst_info * instance_unref(struct inst_info *inst);
@@ -152,9 +142,9 @@ extern int instance_activate(struct inst_info *inst);
 extern int instance_recover_state(struct inst_info *inst);
 extern int instance_need_slave(struct inst_info *inst);
 
-extern void instance_set_lb_info(struct inst_info *inst, double priority, const char *content, const char *title);
-extern void instance_set_lb_size(struct inst_info *inst, int w, int h);
-extern void instance_set_pd_size(struct inst_info *inst, int w, int h);
+extern void instance_set_dbox_info(struct inst_info *inst, double priority, const char *content, const char *title);
+extern void instance_set_dbox_size(struct inst_info *inst, int w, int h);
+extern void instance_set_gbar_size(struct inst_info *inst, int w, int h);
 extern void instance_set_alt_info(struct inst_info *inst, const char *icon, const char *name);
 
 extern int instance_set_pinup(struct inst_info *inst, int pinup);
@@ -165,8 +155,8 @@ extern int instance_clicked(struct inst_info *inst, const char *event, double ti
 extern int instance_text_signal_emit(struct inst_info *inst, const char *emission, const char *source, double sx, double sy, double ex, double ey);
 extern int instance_signal_emit(struct inst_info *inst, const char *emission, const char *source, double sx, double sy, double ex, double ey, double x, double y, int down);
 extern int instance_change_group(struct inst_info *inst, const char *cluster, const char *category);
-extern int instance_set_visible_state(struct inst_info *inst, enum livebox_visible_state state);
-extern enum livebox_visible_state instance_visible_state(struct inst_info *inst);
+extern int instance_set_visible_state(struct inst_info *inst, enum dynamicbox_visible_state state);
+extern enum dynamicbox_visible_state instance_visible_state(struct inst_info *inst);
 extern int instance_set_update_mode(struct inst_info *inst, int active_update);
 extern int instance_active_update(struct inst_info *inst);
 
@@ -176,10 +166,12 @@ extern int instance_active_update(struct inst_info *inst);
  */
 extern const double const instance_timestamp(const struct inst_info *inst);
 extern struct pkg_info * const instance_package(const struct inst_info *inst);
-extern struct script_info * const instance_lb_script(const struct inst_info *inst);
-extern struct script_info * const instance_pd_script(const struct inst_info *inst);
-extern struct buffer_info * const instance_pd_buffer(const struct inst_info *inst);
-extern struct buffer_info * const instance_lb_buffer(const struct inst_info *inst);
+extern struct script_info * const instance_dbox_script(const struct inst_info *inst);
+extern struct script_info * const instance_gbar_script(const struct inst_info *inst);
+extern struct buffer_info * const instance_gbar_buffer(const struct inst_info *inst);
+extern struct buffer_info * const instance_gbar_extra_buffer(const struct inst_info *inst, int idx);
+extern struct buffer_info * const instance_dbox_buffer(const struct inst_info *inst);
+extern struct buffer_info * const instance_dbox_extra_buffer(const struct inst_info *inst, int idx);
 extern const char * const instance_id(const struct inst_info *inst);
 extern const char * const instance_content(const struct inst_info *inst);
 extern const char * const instance_category(const struct inst_info *inst);
@@ -190,10 +182,10 @@ extern const int const instance_priority(const struct inst_info *inst);
 extern const struct client_node * const instance_client(const struct inst_info *inst);
 extern const double const instance_period(const struct inst_info *inst);
 extern const int const instance_timeout(const struct inst_info *inst);
-extern const int const instance_lb_width(const struct inst_info *inst);
-extern const int const instance_lb_height(const struct inst_info *inst);
-extern const int const instance_pd_width(const struct inst_info *inst);
-extern const int const instance_pd_height(const struct inst_info *inst);
+extern const int const instance_dbox_width(const struct inst_info *inst);
+extern const int const instance_dbox_height(const struct inst_info *inst);
+extern const int const instance_gbar_width(const struct inst_info *inst);
+extern const int const instance_gbar_height(const struct inst_info *inst);
 extern const enum instance_state const instance_state(const struct inst_info *inst);
 
 /*!
@@ -202,44 +194,53 @@ extern const enum instance_state const instance_state(const struct inst_info *in
 extern int instance_unicast_created_event(struct inst_info *inst, struct client_node *client);
 extern int instance_unicast_deleted_event(struct inst_info *inst, struct client_node *client, int reason);
 
-extern int instance_create_lb_buffer(struct inst_info *inst, int pixels);
-extern int instance_create_pd_buffer(struct inst_info *inst, int pixels);
+extern int instance_create_dbox_buffer(struct inst_info *inst, int pixels);
+extern int instance_create_dbox_extra_buffer(struct inst_info *inst, int pixels, int idx);
+extern int instance_create_gbar_buffer(struct inst_info *inst, int pixels);
+extern int instance_create_gbar_extra_buffer(struct inst_info *inst, int pixels, int idx);
 
-extern void instance_slave_set_pd_pos(struct inst_info *inst, double x, double y);
-extern void instance_slave_get_pd_pos(struct inst_info *inst, double *x, double *y);
+extern void instance_slave_set_gbar_pos(struct inst_info *inst, double x, double y);
+extern void instance_slave_get_gbar_pos(struct inst_info *inst, double *x, double *y);
 
-extern int instance_slave_open_pd(struct inst_info *inst, struct client_node *client);
-extern int instance_slave_close_pd(struct inst_info *inst, struct client_node *client, int reason);
+extern int instance_slave_open_gbar(struct inst_info *inst, struct client_node *client);
+extern int instance_slave_close_gbar(struct inst_info *inst, struct client_node *client, int reason);
 
 extern int instance_freeze_updator(struct inst_info *inst);
 extern int instance_thaw_updator(struct inst_info *inst);
 
 extern int instance_send_access_event(struct inst_info *inst, int status);
 
-extern int instance_lb_update_begin(struct inst_info *inst, double priority, const char *content, const char *title);
-extern int instance_lb_update_end(struct inst_info *inst);
+extern int instance_dbox_update_begin(struct inst_info *inst, double priority, const char *content, const char *title);
+extern int instance_dbox_update_end(struct inst_info *inst);
 
-extern int instance_pd_update_begin(struct inst_info *inst);
-extern int instance_pd_update_end(struct inst_info *inst);
+extern int instance_gbar_update_begin(struct inst_info *inst);
+extern int instance_gbar_update_end(struct inst_info *inst);
 
-extern void instance_pd_updated(const char *pkgname, const char *id, const char *descfile);
-extern void instance_lb_updated_by_instance(struct inst_info *inst, const char *safe_file);
-extern void instance_pd_updated_by_instance(struct inst_info *inst, const char *descfile);
+extern void instance_gbar_updated(const char *pkgname, const char *id, const char *descfile, int x, int y, int w, int h);
+extern void instance_dbox_updated_by_instance(struct inst_info *inst, const char *safe_file, int x, int y, int w, int h);
+extern void instance_gbar_updated_by_instance(struct inst_info *inst, const char *descfile, int x, int y, int w, int h);
+extern void instance_extra_updated_by_instance(struct inst_info *inst, int is_gbar, int idx, int x, int y, int w, int h);
 extern void instance_extra_info_updated_by_instance(struct inst_info *inst);
 
 /*!
  * \note
- * if the status is LB_STATUS_ERROR_FAULT (slave is faulted)
- * even though the PD is not created, this will forcely send the PD_DESTROYED event to the client.
+ * if the status is DBOX_STATUS_ERROR_FAULT (slave is faulted)
+ * even though the GBAR is not created, this will forcely send the GBAR_DESTROYED event to the client.
  */
-extern int instance_client_pd_destroyed(struct inst_info *inst, int status);
-extern int instance_client_pd_created(struct inst_info *inst, int status);
+extern int instance_client_gbar_destroyed(struct inst_info *inst, int status);
+extern int instance_client_gbar_created(struct inst_info *inst, int status);
+
+extern int instance_client_gbar_extra_buffer_created(struct inst_info *inst, int idx);
+extern int instance_client_gbar_extra_buffer_destroyed(struct inst_info *inst, int idx);
+
+extern int instance_client_dbox_extra_buffer_created(struct inst_info *inst, int idx);
+extern int instance_client_dbox_extra_buffer_destroyed(struct inst_info *inst, int idx);
 
 extern int instance_send_access_status(struct inst_info *inst, int status);
 extern int instance_send_key_status(struct inst_info *inst, int status);
 extern int instance_forward_packet(struct inst_info *inst, struct packet *packet);
 
-extern struct client_node *instance_pd_owner(struct inst_info *inst);
+extern struct client_node *instance_gbar_owner(struct inst_info *inst);
 
 /*!
  * Multiple viewer
index c3d83b4..5647d52 100644 (file)
@@ -17,9 +17,9 @@
 extern int io_init(void);
 extern int io_fini(void);
 extern int io_load_package_db(struct pkg_info *info);
-extern char *io_livebox_pkgname(const char *pkgname);
-extern int io_update_livebox_package(const char *pkgname, int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data);
-extern int io_crawling_liveboxes(int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data);
+extern char *io_dynamicbox_pkgname(const char *pkgname);
+extern int io_update_dynamicbox_package(const char *pkgname, int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data);
+extern int io_crawling_dynamicboxes(int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data);
 extern int io_is_exists(const char *lbid);
 
 /* End of a file */
index a46b9f5..3046725 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __LIVEBOX_ERRNO_H
-#define __LIVEBOX_ERRNO_H
+#ifndef __DYNAMICBOX_ERRNO_H
+#define __DYNAMICBOX_ERRNO_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/*!
- * \addtogroup CAPI_LIVEBOX_SERVICE_MODULE
- * \{
+/**
+ * @addtogroup CAPI_DYNAMICBOX_SERVICE_MODULE
+ * @{
  */
 
-/*!
- * \brief
- * Definitions for the result status of livebox operation.
+/**
+ * @brief
+ * Definitions for the result status of dynamicbox operation.
  */
-enum livebox_status {
-       LB_STATUS_SUCCESS = 0x00000000, /*!< Operation is successfully completed */
-       LB_STATUS_ERROR = 0x80000000, /*!< This will be OR'd with other specific error value */
-       LB_STATUS_ERROR_INVALID = LB_STATUS_ERROR | 0x0001, /*!< Invalid request */
-       LB_STATUS_ERROR_FAULT = LB_STATUS_ERROR | 0x0002, /*!< Fault - Unable to recover from the error */
-       LB_STATUS_ERROR_MEMORY = LB_STATUS_ERROR | 0x0004, /*!< Memory is not enough to do this operation */
-       LB_STATUS_ERROR_EXIST = LB_STATUS_ERROR | 0x0008, /*!< Already exists */
-       LB_STATUS_ERROR_BUSY = LB_STATUS_ERROR | 0x0010, /*!< Busy so the operation is not started(accepted), try again */
-       LB_STATUS_ERROR_PERMISSION = LB_STATUS_ERROR | 0x0020, /*!< Permission error */
-       LB_STATUS_ERROR_ALREADY = LB_STATUS_ERROR | 0x0040, /*!< Operation is already started */
-       LB_STATUS_ERROR_CANCEL = LB_STATUS_ERROR | 0x0080, /*!< Operation is canceled */
-       LB_STATUS_ERROR_IO = LB_STATUS_ERROR | 0x0100, /*!< I/O Error */
-       LB_STATUS_ERROR_NOT_EXIST = LB_STATUS_ERROR | 0x0200, /*!< Not exists */
-       LB_STATUS_ERROR_TIMEOUT = LB_STATUS_ERROR | 0x0400, /*!< Timeout */
-       LB_STATUS_ERROR_NOT_IMPLEMENTED = LB_STATUS_ERROR | 0x0800, /*!< Operation is not implemented */
-       LB_STATUS_ERROR_NO_SPACE = LB_STATUS_ERROR | 0x1000, /*!< No space to operate */
-       LB_STATUS_ERROR_DISABLED = LB_STATUS_ERROR | 0x2000 /*!< Disabled */
+enum dynamicbox_status {
+       DBOX_STATUS_ERROR_NONE = 0x00000000, /**< Operation is successfully completed */
+       DBOX_STATUS_ERROR = 0x80000000, /**< This will be OR'd with other specific error value */
+       DBOX_STATUS_ERROR_INVALID_PARAMETER = DBOX_STATUS_ERROR | 0x0001, /**< Invalid request */
+       DBOX_STATUS_ERROR_FAULT = DBOX_STATUS_ERROR | 0x0002, /**< Fault - Unable to recover from the error */
+       DBOX_STATUS_ERROR_OUT_OF_MEMORY = DBOX_STATUS_ERROR | 0x0004, /**< Memory is not enough to do this operation */
+       DBOX_STATUS_ERROR_EXIST = DBOX_STATUS_ERROR | 0x0008, /**< Already exists */
+       DBOX_STATUS_ERROR_BUSY = DBOX_STATUS_ERROR | 0x0010, /**< Busy so the operation is not started(accepted), try again */
+       DBOX_STATUS_ERROR_PERMISSION_DENIED = DBOX_STATUS_ERROR | 0x0020, /**< Permission error */
+       DBOX_STATUS_ERROR_ALREADY = DBOX_STATUS_ERROR | 0x0040, /**< Operation is already started */
+       DBOX_STATUS_ERROR_CANCEL = DBOX_STATUS_ERROR | 0x0080, /**< Operation is canceled */
+       DBOX_STATUS_ERROR_IO_ERROR = DBOX_STATUS_ERROR | 0x0100, /**< I/O Error */
+       DBOX_STATUS_ERROR_NOT_EXIST = DBOX_STATUS_ERROR | 0x0200, /**< Not exists */
+       DBOX_STATUS_ERROR_TIMEOUT = DBOX_STATUS_ERROR | 0x0400, /**< Timeout */
+       DBOX_STATUS_ERROR_NOT_IMPLEMENTED = DBOX_STATUS_ERROR | 0x0800, /**< Operation is not implemented */
+       DBOX_STATUS_ERROR_NO_SPACE = DBOX_STATUS_ERROR | 0x1000, /**< No space to operate */
+       DBOX_STATUS_ERROR_DISABLED = DBOX_STATUS_ERROR | 0x2000 /**< Disabled */
 };
 
+
 /*!
  * \brief Check whether given code value indicates error or not.
  * \param[in] s
  * \return 1 or 0
  */
-#define LB_STATUS_IS_ERROR(s)  (!!((s) & LB_STATUS_ERROR))
+#define DBOX_STATUS_IS_ERROR(s)        (!!((s) & DBOX_STATUS_ERROR))
 
 /*!
  * \}
index dd5d3f6..492739f 100644 (file)
  * limitations under the License.
  */
 
-enum lb_type {
-       LB_TYPE_NONE = 0x0,
-       LB_TYPE_SCRIPT,
-       LB_TYPE_FILE,
-       LB_TYPE_TEXT,
-       LB_TYPE_BUFFER
-};
-
-enum pd_type {
-       PD_TYPE_NONE = 0x0,
-       PD_TYPE_SCRIPT,
-       PD_TYPE_TEXT,
-       PD_TYPE_BUFFER
-};
-
 enum alter_type {
        ALTER_CREATE,
        ALTER_DESTROY
@@ -45,8 +30,8 @@ struct slave_node;
  */
 extern struct pkg_info *package_create(const char *pkgid, const char *lbid);
 extern int package_destroy(struct pkg_info *info);
-extern char *package_lb_pkgname(const char *pkgname);
-extern int package_is_lb_pkgname(const char *pkgname);
+extern char *package_dbox_pkgname(const char *pkgname);
+extern int package_is_dbox_pkgname(const char *pkgname);
 extern struct pkg_info *package_find(const char *pkgname);
 extern const char *package_find_by_secured_slave(struct slave_node *slave);
 extern struct inst_info *package_find_instance_by_id(const char *pkgname, const char *id);
@@ -66,15 +51,15 @@ extern const double const package_period(const struct pkg_info *info);
 extern const int const package_secured(const struct pkg_info *info);
 extern const char * const package_script(const struct pkg_info *info);
 extern const char * const package_abi(const struct pkg_info *info);
-extern const char * const package_lb_path(const struct pkg_info *info);
-extern const char * const package_lb_group(const struct pkg_info *info);
-extern const char * const package_pd_path(const struct pkg_info *info);
-extern const char * const package_pd_group(const struct pkg_info *info);
+extern const char * const package_dbox_path(const struct pkg_info *info);
+extern const char * const package_dbox_group(const struct pkg_info *info);
+extern const char * const package_gbar_path(const struct pkg_info *info);
+extern const char * const package_gbar_group(const struct pkg_info *info);
 extern const int const package_pinup(const struct pkg_info *info);
 extern const char * const package_auto_launch(const struct pkg_info *info);
 extern const unsigned int const package_size_list(const struct pkg_info *info);
-extern const int const package_pd_width(const struct pkg_info *info);
-extern const int const package_pd_height(const struct pkg_info *info);
+extern const int const package_gbar_width(const struct pkg_info *info);
+extern const int const package_gbar_height(const struct pkg_info *info);
 extern const char * const package_name(const struct pkg_info *info);
 extern const char * const package_libexec(struct pkg_info *info);
 extern int package_network(struct pkg_info *info);
@@ -84,19 +69,19 @@ extern int package_set_libexec(struct pkg_info *info, const char *libexec);
 extern void package_set_pinup(struct pkg_info *info, int pinup);
 extern void package_set_auto_launch(struct pkg_info *info, const char *auto_launch);
 extern void package_set_size_list(struct pkg_info *info, unsigned int size_list);
-extern void package_set_lb_type(struct pkg_info *info, enum lb_type type);
-extern void package_set_pd_type(struct pkg_info *info, enum pd_type type);
-extern int package_set_lb_group(struct pkg_info *info, const char *group);
-extern int package_set_lb_path(struct pkg_info *info, const char *path);
-extern int package_set_pd_group(struct pkg_info *info, const char *group);
-extern int package_set_pd_path(struct pkg_info *info, const char *path);
+extern void package_set_dbox_type(struct pkg_info *info, enum dynamicbox_dbox_type type);
+extern void package_set_gbar_type(struct pkg_info *info, enum dynamicbox_gbar_type type);
+extern int package_set_dbox_group(struct pkg_info *info, const char *group);
+extern int package_set_dbox_path(struct pkg_info *info, const char *path);
+extern int package_set_gbar_group(struct pkg_info *info, const char *group);
+extern int package_set_gbar_path(struct pkg_info *info, const char *path);
 extern int package_set_script(struct pkg_info *info, const char *script);
 extern void package_set_secured(struct pkg_info *info, int secured);
 extern void package_set_period(struct pkg_info *info, double period);
 extern void package_set_timeout(struct pkg_info *info, int timeout);
 extern void package_set_network(struct pkg_info *info, int network);
-extern void package_set_pd_height(struct pkg_info *info, int height);
-extern void package_set_pd_width(struct pkg_info *info, int width);
+extern void package_set_gbar_height(struct pkg_info *info, int height);
+extern void package_set_gbar_width(struct pkg_info *info, int width);
 extern int package_set_abi(struct pkg_info *info, const char *abi);
 extern void package_add_ctx_info(struct pkg_info *pkginfo, struct context_info *info);
 extern void package_del_ctx_info(struct pkg_info *pkginfo, struct context_info *info);
@@ -109,8 +94,8 @@ extern struct pkg_info * const package_ref(struct pkg_info *info);
 extern struct pkg_info * const package_unref(struct pkg_info *info);
 extern const int const package_refcnt(const struct pkg_info *info);
 
-extern const enum pd_type const package_pd_type(const struct pkg_info *info);
-extern const enum lb_type const package_lb_type(const struct pkg_info *info);
+extern const enum dynamicbox_gbar_type const package_gbar_type(const struct pkg_info *info);
+extern const enum dynamicbox_dbox_type const package_dbox_type(const struct pkg_info *info);
 
 extern int package_add_instance(struct pkg_info *info, struct inst_info *inst);
 extern int package_del_instance(struct pkg_info *info, struct inst_info *inst);
index 16e297a..71349e5 100644 (file)
@@ -23,22 +23,22 @@ extern int parser_network(struct parser *handle);
 extern int parser_timeout(struct parser *handle);
 extern const char *parser_auto_launch(struct parser *handle);
 extern unsigned int parser_size(struct parser *handle);
-extern void parser_get_pdsize(struct parser *handle, unsigned int *width, unsigned int *height);
+extern void parser_get_gbar_size(struct parser *handle, unsigned int *width, unsigned int *height);
 extern const char *parser_group_str(struct parser *handle);
 extern int parser_secured(struct parser *handle);
 extern int parser_pinup(struct parser *handler);
 
-extern const char *parser_lb_path(struct parser *handle);
-extern const char *parser_lb_group(struct parser *handle);
-extern const char *parser_pd_path(struct parser *handle);
-extern const char *parser_pd_group(struct parser *handle);
+extern const char *parser_dbox_path(struct parser *handle);
+extern const char *parser_dbox_group(struct parser *handle);
+extern const char *parser_gbar_path(struct parser *handle);
+extern const char *parser_gbar_group(struct parser *handle);
 
 extern const char *parser_abi(struct parser *handle);
 
-extern int parser_text_pd(struct parser *handle);
-extern int parser_text_lb(struct parser *handle);
-extern int parser_buffer_lb(struct parser *handle);
-extern int parser_buffer_pd(struct parser *handle);
+extern int parser_text_gbar(struct parser *handle);
+extern int parser_text_dbox(struct parser *handle);
+extern int parser_buffer_dbox(struct parser *handle);
+extern int parser_buffer_gbar(struct parser *handle);
 
 extern const char *parser_script(struct parser *handle);
 
diff --git a/include/provider_cmd_list.h b/include/provider_cmd_list.h
deleted file mode 100644 (file)
index 91e5771..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-// provider -> master
-// master -> client
-#define CMD_UPDATED            0x00000001
-#define CMD_LB_UPDATED         0x00000001      // same with UPDATED
-#define CMD_DESC_UPDATED       0x00000101
-#define CMD_PD_UPDATED         0x00000101      // same with DESC_UPDATED
-#define CMD_EXTRA_INFO         0x00000201
-#define CMD_DELETED            0x00000301
-#define CMD_FAULTED            0x00000401
-#define CMD_FAULT_PACKAGE      0x00000401
-#define CMD_SCROLL             0x00000501
-#define CMD_LB_UPDATE_BEGIN    0x00000601
-#define CMD_LB_UPDATE_END      0x00000701
-#define CMD_PD_UPDATE_BEGIN    0x00000801
-#define CMD_PD_UPDATE_END      0x00000901
-#define CMD_ACCESS_STATUS      0x00000A01
-#define CMD_KEY_STATUS         0x00000B01
-#define CMD_CLOSE_PD           0x00000C01
-
-// provider -> master
-// Upper list must be sync'd with client(viewer)'s result event table
-#define CMD_CALL               0x00000D01
-#define CMD_RET                        0x00000E01
-#define CMD_ACQUIRE_BUFFER     0x00000F01
-#define CMD_RESIZE_BUFFER      0x00001001
-#define CMD_RELEASE_BUFFER     0x00001101
-#define CMD_HELLO              0x00001201
-#define CMD_PING               0x00001301
-#define CMD_CTRL               0x00001401
-
-// Following list is only for the viewer
-// master -> client
-#define CMD_PD_CREATED         0x00000D01
-#define CMD_PD_DESTROYED       0x00000E01
-#define CMD_CREATED            0x00000F01
-#define CMD_GROUP_CHANGED      0x00001001
-#define CMD_PERIOD_CHANGED     0x00001101
-#define CMD_SIZE_CHANGED       0x00001201
-#define CMD_RESULT_PINUP       0x00001301      // viewer
-#define CMD_RESULT_UPDATE_MODE 0x00001401      // viewer
-
-// Following list should be started after the common list of client_cmd_list
-// master -> provider
-#define CMD_PD_SHOW            0x00003701
-#define CMD_PD_HIDE            0x00003801
-#define CMD_LB_PAUSE           0x00003901
-#define CMD_LB_RESUME          0x00003A01
-#define CMD_SCRIPT             0x00003B01
-#define CMD_RENEW              0x00003C01
-#define CMD_PINUP              0x00003D01
-#define CMD_UPDATE_CONTENT     0x00003E01
-#define CMD_PAUSE              0x00003F01
-#define CMD_RESUME             0x00004001
-#define CMD_DISCONNECT         0x00004101
-
-// Live Info -> 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
-
-// client -> master
-// master -> provider
-#define CMD_PD_MOUSE_MOVE              0x00000001
-#define CMD_LB_MOUSE_MOVE              0x00000101
-#define CMD_PD_MOUSE_DOWN              0x00000201
-#define CMD_PD_MOUSE_UP                        0x00000301
-#define CMD_LB_MOUSE_DOWN              0x00000401
-#define CMD_LB_MOUSE_UP                        0x00000501
-#define CMD_PD_MOUSE_ENTER             0x00000601
-#define CMD_PD_MOUSE_LEAVE             0x00000701
-#define CMD_LB_MOUSE_ENTER             0x00000801
-#define CMD_LB_MOUSE_LEAVE             0x00000901
-#define CMD_LB_MOUSE_ON_SCROLL         0x00000A01
-#define CMD_LB_MOUSE_OFF_SCROLL                0x00000B01
-#define CMD_PD_MOUSE_ON_SCROLL         0x00000C01
-#define CMD_PD_MOUSE_OFF_SCROLL                0x00000D01
-#define CMD_LB_MOUSE_ON_HOLD           0x00000E01
-#define CMD_LB_MOUSE_OFF_HOLD          0x00000F01
-#define CMD_PD_MOUSE_ON_HOLD           0x00001001
-#define CMD_PD_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_PD_MOVE                    0x00001901
-#define CMD_PD_ACCESS_HL               0x00001A01
-#define CMD_PD_ACCESS_ACTIVATE         0x00001B01
-#define CMD_PD_ACCESS_ACTION           0x00001C01
-#define CMD_PD_ACCESS_SCROLL           0x00001D01
-#define CMD_PD_ACCESS_VALUE_CHANGE     0x00001E01
-#define CMD_PD_ACCESS_MOUSE            0x00001F01
-#define CMD_PD_ACCESS_BACK             0x00002001
-#define CMD_PD_ACCESS_OVER             0x00002101
-#define CMD_PD_ACCESS_READ             0x00002201
-#define CMD_PD_ACCESS_ENABLE           0x00002301
-#define CMD_LB_ACCESS_HL               0x00002401
-#define CMD_LB_ACCESS_ACTIVATE         0x00002501
-#define CMD_LB_ACCESS_ACTION           0x00002601
-#define CMD_LB_ACCESS_SCROLL           0x00002701
-#define CMD_LB_ACCESS_VALUE_CHANGE     0x00002801
-#define CMD_LB_ACCESS_MOUSE            0x00002901
-#define CMD_LB_ACCESS_BACK             0x00002A01
-#define CMD_LB_ACCESS_OVER             0x00002B01
-#define CMD_LB_ACCESS_READ             0x00002C01
-#define CMD_LB_ACCESS_ENABLE           0x00002D01
-#define CMD_LB_KEY_DOWN                        0x00002E01
-#define CMD_LB_KEY_UP                  0x00002F01
-#define CMD_LB_KEY_FOCUS_IN            0x00003001
-#define CMD_LB_KEY_FOCUS_OUT           0x00003101
-#define CMD_PD_KEY_DOWN                        0x00003201
-#define CMD_PD_KEY_UP                  0x00003301
-#define CMD_PD_KEY_FOCUS_IN            0x00003401
-#define CMD_PD_KEY_FOCUS_OUT           0x00003501
-#define CMD_UPDATE_MODE                        0x00003601
-
-// client -> master
-#define CMD_LB_MOUSE_SET               0x00003701
-#define CMD_LB_MOUSE_UNSET             0x00003801
-#define CMD_PD_MOUSE_SET               0x00003901
-#define CMD_PD_MOUSE_UNSET             0x00003A01
-#define CMD_CHANGE_VISIBILITY          0x00003B01
-#define CMD_LB_ACQUIRE_PIXMAP          0x00003C01
-#define CMD_LB_RELEASE_PIXMAP          0x00003D01
-#define CMD_PD_ACQUIRE_PIXMAP          0x00003E01
-#define CMD_PD_RELEASE_PIXMAP          0x00003F01
-#define CMD_ACQUIRE                    0x00004001
-#define CMD_RELEASE                    0x00004101
-#define CMD_PINUP_CHANGED              0x00004201
-#define CMD_CREATE_PD                  0x00004301
-#define CMD_DESTROY_PD                 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_LB_KEY_SET                 0x00004C01
-#define CMD_LB_KEY_UNSET               0x00004D01
-#define CMD_PD_KEY_SET                 0x00004E01
-#define CMD_PD_KEY_UNSET               0x00004F01
-#define CMD_CLIENT_PAUSED              0x00005001
-#define CMD_CLIENT_RESUMED             0x00005101
-
-// service -> master
-#define CMD_SERVICE_UPDATE             0x00000001
-#define CMD_SERVICE_CHANGE_PERIOD      0x00000101
-#define CMD_SERVICE_INST_CNT           0x00000201
index 4f32a76..56348f1 100644 (file)
@@ -17,7 +17,6 @@
 extern unsigned long util_string_hash(const char *str);
 extern double util_timestamp(void);
 extern int util_check_ext(const char *filename, const char *check_ptr);
-extern int util_validate_livebox_package(const char *pkgname);
 extern int util_unlink(const char *filename);
 extern int util_unlink_files(const char *folder);
 extern char *util_slavename(void);
index ee86158..e0992e3 100644 (file)
@@ -42,7 +42,7 @@
                <filesystem path="/usr/share/data-provider-master" label="data-provider-master::data" />
                <filesystem path="/usr/share/data-provider-master/abi.ini" label="data-provider-master::data" />
 
-               <!-- livebox-service is able to access the resolution.ini file -->
+               <!-- dynamicbox_service is able to access the resolution.ini file -->
                <filesystem path="/usr/share/data-provider-master/resolution.ini" label="_" />
                <filesystem path="/usr/share/data-provider-master/320x480/resolution.ini" label="_" />
                <filesystem path="/usr/share/data-provider-master/800x480/resolution.ini" label="_" />
                <filesystem path="/opt/usr/share/live_magazine/always" label="data-provider-master::share" type="transmutable" />
 
                <!-- Database -->
-               <filesystem path="/opt/dbspace/.livebox.db" label="data-provider-master::db" />
-               <filesystem path="/opt/dbspace/.livebox.db-journal" label="data-provider-master::db" />
+               <filesystem path="/opt/dbspace/.dynamicbox.db" label="data-provider-master::db" />
+               <filesystem path="/opt/dbspace/.dynamicbox.db-journal" label="data-provider-master::db" />
 
                <filesystem path="/usr/lib/systemd/system/data-provider-master.service" label="_" />
                <filesystem path="/usr/lib/systemd/system/multi-user.target.wants/data-provider-master.service" label="_" />
 
                <!-- Package manager plugin -->
-               <filesystem path="/usr/etc/package-manager/parserlib/liblivebox.so" label="_" />
+               <filesystem path="/usr/etc/package-manager/parserlib/libdynamicbox.so" label="_" />
 
                <!-- Logdump script -->
-               <filesystem path="/opt/etc/dump.d/module.d/dump_livebox.sh" label="_" exec_label="_" />
+               <filesystem path="/opt/etc/dump.d/module.d/dump_dynamicbox.sh" label="_" exec_label="_" />
        </assign>
 </manifest>
index 6c86741..ec21600 100755 (executable)
@@ -1,11 +1,10 @@
 %bcond_with wayland
-%define _repository wearable
 
 Name: data-provider-master
-Summary: Master service provider for liveboxes
-Version: 0.46.0
+Summary: Master service provider for dynamicboxes
+Version: 1.0.0
 Release: 1
-Group: HomeTF/Livebox
+Group: HomeTF/DynamicBox
 License: Flora
 Source0: %{name}-%{version}.tar.gz
 Source1001: %{name}.manifest
@@ -43,7 +42,7 @@ BuildRequires: pkgconfig(pkgmgr-info)
 
 # This will not be works, I know. But...
 %if "%{sec_product_feature_livebox}" != "0"
-BuildRequires: pkgconfig(livebox-service)
+BuildRequires: pkgconfig(dynamicbox_service)
 %endif
 
 BuildRequires: pkgconfig(notification)
@@ -57,8 +56,8 @@ Requires(post): sys-assert
 Requires(post): dbus
 
 %description
-Manage the 2nd stage livebox service provider and communicate with the viewer application.
-Keep trace on the life-cycle of the livebox and status of the service providers, viewer applications.
+Manage the 2nd stage dynamicbox service provider and communicate with the viewer application.
+Keep trace on the life-cycle of the dynamicbox and status of the service providers, viewer applications.
 
 %prep
 %setup -q
@@ -99,6 +98,18 @@ export MOBILE=On
 export WEARABLE=Off
 %endif
 
+%if "%{sec_product_feature_display_resolution}" == "360x480"
+export LIVEBOX_SHM="${LIVEBOX_SHM}.360x480"
+%endif
+
+%if "%{sec_product_feature_display_resolution}" == "320x480"
+export LIVEBOX_SHM="${LIVEBOX_SHM}.320x480"
+%endif
+
+%if "%{sec_product_feature_display_resolution}" == "480x800"
+export LIVEBOX_SHM="${LIVEBOX_SHM}.480x800"
+%endif
+
 %if "%{sec_product_feature_livebox}" == "0"
 export LIVEBOX=Off
 %else
@@ -124,20 +135,20 @@ mkdir -p %{buildroot}/opt/usr/share/live_magazine/reader
 mkdir -p %{buildroot}/opt/usr/share/live_magazine/always
 mkdir -p %{buildroot}/opt/usr/devel/usr/bin
 mkdir -p %{buildroot}/opt/dbspace
-touch %{buildroot}/opt/dbspace/.livebox.db
-touch %{buildroot}/opt/dbspace/.livebox.db-journal
-if [ ! -s %{buildroot}/opt/dbspace/.livebox.db ]; then
-echo "LiveBox DB file is not exists, initiate it"
-sqlite3 %{buildroot}/opt/dbspace/.livebox.db <<EOF
+touch %{buildroot}/opt/dbspace/.dynamicbox.db
+touch %{buildroot}/opt/dbspace/.dynamicbox.db-journal
+if [ ! -s %{buildroot}/opt/dbspace/.dynamicbox.db ]; then
+echo "DynamicBox DB file is not exists, initiate it"
+sqlite3 %{buildroot}/opt/dbspace/.dynamicbox.db <<EOF
 CREATE TABLE version ( version INTEGER );
 CREATE TABLE box_size ( pkgid TEXT NOT NULL, size_type INTEGER, preview TEXT, touch_effect INTEGER, need_frame INTEGER, mouse_event INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
-CREATE TABLE client (pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch TEXT, pd_size TEXT, content TEXT, nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
+CREATE TABLE client (pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch TEXT, gbar_size TEXT, content TEXT, nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
 CREATE TABLE groupinfo ( id INTEGER PRIMARY KEY AUTOINCREMENT, cluster TEXT NOT NULL, category TEXT NOT NULL, pkgid TEXT NOT NULL, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
 CREATE TABLE groupmap (option_id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER, pkgid TEXT NOT NULL, ctx_item TEXT NOT NULL, FOREIGN KEY(id) REFERENCES groupinfo(id), FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
 CREATE TABLE i18n ( pkgid TEXT NOT NULL, lang TEXT COLLATE NOCASE, name TEXT, icon TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
 CREATE TABLE option ( pkgid TEXT NOT NULL, option_id INTEGER, key TEXT NOT NULL, value TEXT NOT NULL, FOREIGN KEY(option_id) REFERENCES groupmap(option_id), FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
 CREATE TABLE pkgmap ( pkgid TEXT PRIMARY KEY NOT NULL, appid TEXT, uiapp TEXT, prime INTEGER, category TEXT DEFAULT 'http://tizen.org/category/default' );
-CREATE TABLE provider ( pkgid TEXT PRIMARY KEY NOT NULL, network INTEGER, abi TEXT, secured INTEGER, box_type INTEGER, box_src TEXT, box_group TEXT, pd_type INTEGER, pd_src TEXT, pd_group TEXT, libexec TEXT, timeout INTEGER, period TEXT, script TEXT, pinup INTEGER, count INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
+CREATE TABLE provider ( pkgid TEXT PRIMARY KEY NOT NULL, network INTEGER, abi TEXT, secured INTEGER, box_type INTEGER, box_src TEXT, box_group TEXT, gbar_type INTEGER, gbar_src TEXT, gbar_group TEXT, libexec TEXT, timeout INTEGER, period TEXT, script TEXT, pinup INTEGER, count INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE);
 EOF
 fi
 %endif
@@ -160,10 +171,10 @@ chown 5000:5000 /opt/usr/share/live_magazine/reader
 chmod 750 /opt/usr/share/live_magazine/reader
 chown 5000:5000 /opt/usr/share/live_magazine/always
 chmod 750 /opt/usr/share/live_magazine/always
-chown 0:5000 /opt/dbspace/.livebox.db
-chmod 640 /opt/dbspace/.livebox.db
-chown 0:5000 /opt/dbspace/.livebox.db-journal
-chmod 640 /opt/dbspace/.livebox.db-journal
+chown 0:5000 /opt/dbspace/.dynamicbox.db
+chmod 640 /opt/dbspace/.dynamicbox.db
+chown 0:5000 /opt/dbspace/.dynamicbox.db-journal
+chmod 640 /opt/dbspace/.dynamicbox.db-journal
 %endif
 vconftool set -t bool "memory/data-provider-master/started" 0 -i -u 5000 -f -s system::vconf_system
 vconftool set -t int "memory/private/data-provider-master/restart_count" 0 -i -u 5000 -f -s data-provider-master
@@ -186,10 +197,10 @@ echo "%{_sysconfdir}/init.d/data-provider-master start"
 %else
 %{_prefix}/etc/package-manager/parserlib/*
 %{_datarootdir}/data-provider-master/*
-/opt/etc/dump.d/module.d/dump_livebox.sh
+/opt/etc/dump.d/module.d/dump_dynamicbox.sh
 /opt/usr/share/live_magazine/*
-/opt/dbspace/.livebox.db
-/opt/dbspace/.livebox.db-journal
+/opt/dbspace/.dynamicbox.db
+/opt/dbspace/.dynamicbox.db-journal
 %endif
 
 # End of a file
similarity index 83%
rename from pkgmgr_livebox/CMakeLists.txt
rename to pkgmgr_dynamicbox/CMakeLists.txt
index c20b5c1..06ad219 100644 (file)
@@ -1,6 +1,6 @@
-PROJECT(livebox C)
+PROJECT(dynamicbox C)
 
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/pkgmgr_livebox/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/pkgmgr_dynamicbox/include)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(bin_pkgs REQUIRED
@@ -8,7 +8,7 @@ pkg_check_modules(bin_pkgs REQUIRED
        sqlite3
        libxml-2.0
        db-util
-       livebox-service
+       dynamicbox_service
 )
 
 FOREACH(flag ${bin_pkgs_CFLAGS})
similarity index 64%
rename from pkgmgr_livebox/livebox.xml
rename to pkgmgr_dynamicbox/dynamicbox.xml
index 5df1b89..7e274b5 100644 (file)
@@ -1,41 +1,43 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <manifest xmlns="http://tizen.org/ns/packages" package="com.samsung.nicesj" version="1.0" install-location="auto">
 
-<livebox appid="com.samsung.nicesj.livebox" primary="true" secured="false" network="false" abi="c" timeout="20" period="10.0" libexec="/usr/apps/com.samsung.myapp/libexec/liblive-com.samsung.nicesj.so" pinup="false" script="edje" nodisplay="false">
-       <label>My livebox</label>
+<dynamicbox appid="com.samsung.nicesj.dynamicbox" primary="true" secured="false" network="false" abi="c" timeout="20" period="10.0" libexec="/usr/apps/com.samsung.myapp/libexec/liblive-com.samsung.nicesj.so" pinup="false" script="edje" nodisplay="false">
+       <label>My Dynamic Box</label>
        <icon>/usr/share/icons/small/com.samsung.live-nicesj.png</icon>
        <label xml:lang="en_US">Sample</label>
        <label xml:lang="ko_KR">Hangul</label>
-       <content>Content information</content>
-       <category name="http://tizen.org/dynamicbox/default"></category>
+       <content>Content information</content>  <!-- This string will be passed to the dynamicbox_create -->
+       <category name="http://tizen.org/dynamicbox/default"></category>        <!-- Used for categorizing a package -->
 
-       <launch>com.samsung.nicesj</launch>
+       <launch>com.samsung.nicesj</launch> <!-- Launch this app from homescreen directly -->
 
-       <setup>com.samsung.nicesj</setup>
+       <setup>com.samsung.nicesj</setup> <!-- If the box needs to be setting up before adding it to the homscreen, this app will be launched -->
 
        <box type="image" mouse_event="false" count="0">
-               <size touch_effect="true" preview="ABSPATH">1x1</size>
-               <size touch_effect="true" preview="ABSPATH">2x1</size>
-               <size touch_effect="true" need_frame="true">2x2</size>
+               <!-- 1x1 should be exists, mandatory size -->
+               <size touch_effect="true" preview="ABSPATH" mouse_event="false">1x1</size>
+
+               <size touch_effect="true" preview="ABSPATH" mouse_event="false">2x1</size>
+               <size touch_effect="true" need_frame="true" mouse_event="false">2x2</size>
                <size>4x1</size>
                <size need_frame="true">4x2</size>
-               <size touch_effect="false" need_frame="true">4x3</size>
-               <size touch_effect="false">4x4</size>
+               <size touch_effect="false" need_frame="true" mouse_event="false">4x3</size>
+               <size touch_effect="false" mouse_event="false">4x4</size>
 
-               <!-- Easy home -->
+               <!-- Only for the Easy home -->
                <size>21x21</size>
                <size preview="ABSPATH">23x21</size>
                <size>23x23</size>
 
-               <!-- Only supported for special livebox - inhouse / commercialization target only -->
+               <!-- Only supported for special Dynamic Box - inhouse / commercialization target only -->
                <size>0x0</size>
                <script src="/opt/usr/apps/com.samsung.myapp/res/script/my.edj" group="my_group" />
        </box>
 
-       <pd type="script">
+       <glancebar type="script">
                <size>720x100</size>
                <script src="/opt/usr/apps/com.samsung.myapp/res/script/mypd.edj" group="group_string" />
-       </pd>
+       </glancebar>
 
        <group>
                <cluster name="cluster1">
@@ -75,5 +77,5 @@
                     MUSIC_PLAYED_FREQUENTLY(DATA_PROVIDER, TIME_SPAN, RESULT_SIZE)
                -->
        </group>
-</livebox>
+</dynamicbox>
 </manifest>
similarity index 78%
rename from pkgmgr_livebox/src/service_register.c
rename to pkgmgr_dynamicbox/src/service_register.c
index 576dc5e..ebb0613 100644 (file)
@@ -28,7 +28,7 @@
 #include <libxml/tree.h>
 #include <dlog.h>
 
-#include <livebox-service.h>
+#include <dynamicbox_service.h>
 
 #include "dlist.h"
 
  *
  * provider
  * +-------+---------+-----+---------+----------+---------+-----------+---------+--------+----------+---------+---------+--------+--------+-------+-----------------------+
- * | pkgid | network | abi | secured | box_type | box_src | box_group | pd_type | pd_src | pd_group | libexec | timeout | period | script | pinup | count(from ver 4) |
+ * | pkgid | network | abi | secured | box_type | box_src | box_group | gbar_type | gbar_src | gbar_group | libexec | timeout | period | script | pinup | count(from ver 4) |
  * +-------+---------+-----+---------+----------+---------+-----------+---------+--------+----------+---------+---------+--------+--------+-------+-----------------------+
  * |   -   |    -    |  -  |    -    |     -    |    -    |     -     |    -    |    -   |     -    |     -   |    -    |    -   |    -   |   -   |           -           |
  * +-------+---------+-----+---------+----------+---------+-----------+---------+--------+----------+---------+---------+--------+--------+-------+-----------------------+
- * CREATE TABLE provider ( pkgid TEXT PRIMARY KEY NOT NULL, network INTEGER, abi TEXT, secured INTEGER, box_type INTEGER, box_src TEXT, box_group TEXT, pd_type TEXT, pd_src TEXT, pd_group TEXT, libexec TEXT, timeout INTEGER, period TEXT, script TEXT, pinup INTEGER, count INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid))
+ * CREATE TABLE provider ( pkgid TEXT PRIMARY KEY NOT NULL, network INTEGER, abi TEXT, secured INTEGER, box_type INTEGER, box_src TEXT, box_group TEXT, gbar_type TEXT, gbar_src TEXT, gbar_group TEXT, libexec TEXT, timeout INTEGER, period TEXT, script TEXT, pinup INTEGER, count INTEGER, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid))
  *
  * = box_type = { text | buffer | script | image }
- * = pd_type = { text | buffer | script }
+ * = gbar_type = { text | buffer | script }
  * = network = { 1 | 0 }
  * = secured = { 1 | 0 }
  *
  *
  * client
  * +-------+------+---------+-------------+---------+---------+-----------+-------+
- * | pkgid | Icon |  Name   | auto_launch | pd_size | content | nodisplay | setup |
+ * | pkgid | Icon |  Name   | auto_launch | gbar_size | content | nodisplay | setup |
  * +-------+------+---------+-------------+---------+---------+-----------+-------+
  * |   -   |   -  |    -    |      -      |    -    |    -    |     -     |   -   |
  * +-------+------+---------+-------------+---------+---------+-----------+-------+
- * CREATE TABLE client ( pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch TEXT, pd_size TEXT, content TEXT, nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) )
+ * CREATE TABLE client ( pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, auto_launch TEXT, gbar_size TEXT, content TEXT, nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) )
  *
  * = auto_launch = UI-APPID
- * = pd_size = WIDTHxHEIGHT
+ * = gbar_size = WIDTHxHEIGHT
  *
  *
  * i18n
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "PKGMGR_LIVEBOX"
+#define LOG_TAG "PKGMGR_DYNAMICBOX"
 
 int errno;
 
@@ -148,24 +148,7 @@ struct i18n {
        xmlChar *icon;
 };
 
-enum lb_type {
-       LB_TYPE_NONE = 0x0,
-       LB_TYPE_SCRIPT,
-       LB_TYPE_FILE,
-       LB_TYPE_TEXT,
-       LB_TYPE_BUFFER,
-       LB_TYPE_ELEMENTARY
-};
-
-enum pd_type {
-       PD_TYPE_NONE = 0x0,
-       PD_TYPE_SCRIPT,
-       PD_TYPE_TEXT,
-       PD_TYPE_BUFFER,
-       PD_TYPE_ELEMENTARY
-};
-
-struct livebox {
+struct dynamicbox {
        xmlChar *pkgid;
        int secured;
        int network;
@@ -183,28 +166,28 @@ struct livebox {
        xmlChar *category; /* Category of this box */
 
        int pinup; /* Is this support the pinup feature? */
-       int primary; /* Is this primary livebox? */
+       int primary; /* Is this primary dynamicbox? */
        int nodisplay;
        int count; /* Max count of instances */
 
-       int default_mouse_event; /* Mouse event processing option for livebox */
+       int default_mouse_event; /* Mouse event processing option for dynamicbox */
        int default_touch_effect;
        int default_need_frame;
 
-       enum lb_type lb_type;
-       xmlChar *lb_src;
-       xmlChar *lb_group;
+       enum dynamicbox_dbox_type dbox_type;
+       xmlChar *dbox_src;
+       xmlChar *dbox_group;
        int size_list; /* 1x1, 2x1, 2x2, 4x1, 4x2, 4x3, 4x4 */
 
-       xmlChar *preview[NR_OF_SIZE_LIST];
-       int touch_effect[NR_OF_SIZE_LIST]; /* Touch effect of a livebox */
-       int need_frame[NR_OF_SIZE_LIST]; /* Box needs frame which should be cared by viewer */
-       int mouse_event[NR_OF_SIZE_LIST];
+       xmlChar *preview[DBOX_NR_OF_SIZE_LIST];
+       int touch_effect[DBOX_NR_OF_SIZE_LIST]; /* Touch effect of a dynamicbox */
+       int need_frame[DBOX_NR_OF_SIZE_LIST]; /* Box needs frame which should be cared by viewer */
+       int mouse_event[DBOX_NR_OF_SIZE_LIST];
 
-       enum pd_type pd_type;
-       xmlChar *pd_src;
-       xmlChar *pd_group;
-       xmlChar *pd_size; /* Default PD size */
+       enum dynamicbox_gbar_type gbar_type;
+       xmlChar *gbar_src;
+       xmlChar *gbar_group;
+       xmlChar *gbar_size; /* Default PD size */
 
        struct dlist *i18n_list;
        struct dlist *group_list;
@@ -226,7 +209,7 @@ static struct {
        const char *dbfile;
        sqlite3 *handle;
 } s_info = {
-       .dbfile = "/opt/dbspace/.livebox.db",
+       .dbfile = "/opt/dbspace/.dynamicbox.db",
        .handle = NULL,
 };
 
@@ -427,8 +410,8 @@ static void upgrade_pkgmap_for_category(void)
  * \note
  * From version 3 to 4
  * "provider" table should have "count" column.
- * "count" will be used for limiting creatable count of instances for each livebox.
- * Every livebox developer should describe their max count of creatable instances.
+ * "count" will be used for limiting creatable count of instances for each dynamicbox.
+ * Every dynamicbox developer should describe their max count of creatable instances.
  */
 static void upgrade_to_version_4(void)
 {
@@ -713,8 +696,8 @@ static inline int db_create_provider(void)
        ddl = "CREATE TABLE provider (" \
                "pkgid TEXT PRIMARY KEY NOT NULL, network INTEGER, " \
                "abi TEXT, secured INTEGER, box_type INTEGER, " \
-               "box_src TEXT, box_group TEXT, pd_type INTEGER, " \
-               "pd_src TEXT, pd_group TEXT, libexec TEXT, timeout INTEGER, period TEXT, script TEXT, pinup INTEGER, "\
+               "box_src TEXT, box_group TEXT, gbar_type INTEGER, " \
+               "gbar_src TEXT, gbar_group TEXT, libexec TEXT, timeout INTEGER, period TEXT, script TEXT, pinup INTEGER, "\
                "count INTEGER, "\
                "FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE)";
 
@@ -762,20 +745,20 @@ out:
        sqlite3_finalize(stmt);
        return ret;
 }
-static int db_insert_provider(struct livebox *livebox)
+static int db_insert_provider(struct dynamicbox *dynamicbox)
 {
        static const char *dml;
        int ret;
        sqlite3_stmt *stmt;
-       char *abi = (char *)livebox->abi;
-       char *box_src = (char *)livebox->lb_src;
-       char *box_group = (char *)livebox->lb_group;
-       char *pd_src = (char *)livebox->pd_src;
-       char *pd_group = (char *)livebox->pd_group;
-       char *libexec = (char *)livebox->libexec;
-       char *timeout = (char *)livebox->timeout;
-       char *period = (char *)livebox->period;
-       char *script = (char *)livebox->script;
+       char *abi = (char *)dynamicbox->abi;
+       char *box_src = (char *)dynamicbox->dbox_src;
+       char *box_group = (char *)dynamicbox->dbox_group;
+       char *gbar_src = (char *)dynamicbox->gbar_src;
+       char *gbar_group = (char *)dynamicbox->gbar_group;
+       char *libexec = (char *)dynamicbox->libexec;
+       char *timeout = (char *)dynamicbox->timeout;
+       char *period = (char *)dynamicbox->period;
+       char *script = (char *)dynamicbox->script;
 
        if (!abi) {
                abi = "c";
@@ -793,21 +776,21 @@ static int db_insert_provider(struct livebox *livebox)
                script = "edje";
        }
 
-       dml = "INSERT INTO provider ( pkgid, network, abi, secured, box_type, box_src, box_group, pd_type, pd_src, pd_group, libexec, timeout, period, script, pinup, count ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
+       dml = "INSERT INTO provider ( pkgid, network, abi, secured, box_type, box_src, box_group, gbar_type, gbar_src, gbar_group, libexec, timeout, period, script, pinup, count ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                return -EIO;
        }
 
-       ret = sqlite3_bind_text(stmt, 1, (char *)livebox->pkgid, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 1, (char *)dynamicbox->pkgid, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_int(stmt, 2, livebox->network);
+       ret = sqlite3_bind_int(stmt, 2, dynamicbox->network);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
@@ -820,14 +803,14 @@ static int db_insert_provider(struct livebox *livebox)
                ret = -EIO;
                goto out;
        }
-       ret = sqlite3_bind_int(stmt, 4, livebox->secured);
+       ret = sqlite3_bind_int(stmt, 4, dynamicbox->secured);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_int(stmt, 5, livebox->lb_type);
+       ret = sqlite3_bind_int(stmt, 5, dynamicbox->dbox_type);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
@@ -848,21 +831,21 @@ static int db_insert_provider(struct livebox *livebox)
                goto out;
        }
 
-       ret = sqlite3_bind_int(stmt, 8, livebox->pd_type);
+       ret = sqlite3_bind_int(stmt, 8, dynamicbox->gbar_type);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 9, pd_src, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 9, gbar_src, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 10, pd_group, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 10, gbar_group, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
@@ -897,14 +880,14 @@ static int db_insert_provider(struct livebox *livebox)
                goto out;
        }
 
-       ret = sqlite3_bind_int(stmt, 15, livebox->pinup);
+       ret = sqlite3_bind_int(stmt, 15, dynamicbox->pinup);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_int(stmt, 16, livebox->count);
+       ret = sqlite3_bind_int(stmt, 16, dynamicbox->count);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
@@ -931,7 +914,7 @@ static inline int db_create_client(void)
 
        ddl = "CREATE TABLE client (" \
                "pkgid TEXT PRIMARY KEY NOT NULL, icon TEXT, name TEXT, " \
-               "auto_launch TEXT, pd_size TEXT, content TEXT, nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE)";
+               "auto_launch TEXT, gbar_size TEXT, content TEXT, nodisplay INTEGER, setup TEXT, FOREIGN KEY(pkgid) REFERENCES pkgmap(pkgid) ON DELETE CASCADE)";
        if (sqlite3_exec(s_info.handle, ddl, NULL, NULL, &err) != SQLITE_OK) {
                ErrPrint("Failed to execute the DDL (%s)\n", err);
                return -EIO;
@@ -944,69 +927,69 @@ static inline int db_create_client(void)
        return 0;
 }
 
-static inline int db_insert_client(struct livebox *livebox)
+static inline int db_insert_client(struct dynamicbox *dynamicbox)
 {
        static const char *dml;
        int ret;
        sqlite3_stmt *stmt;
 
-       dml = "INSERT INTO client ( pkgid, icon, name, auto_launch, pd_size, content, nodisplay, setup ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
+       dml = "INSERT INTO client ( pkgid, icon, name, auto_launch, gbar_size, content, nodisplay, setup ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                return -EIO;
        }
 
-       ret = sqlite3_bind_text(stmt, 1, (char *)livebox->pkgid, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 1, (char *)dynamicbox->pkgid, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 2, (char *)livebox->icon, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 2, (char *)dynamicbox->icon, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 3, (char *)livebox->name, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 3, (char *)dynamicbox->name, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 4, (char *)livebox->auto_launch, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 4, (char *)dynamicbox->auto_launch, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 5, (char *)livebox->pd_size, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 5, (char *)dynamicbox->gbar_size, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 6, (char *)livebox->content, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 6, (char *)dynamicbox->content, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_int(stmt, 7, livebox->nodisplay);
+       ret = sqlite3_bind_int(stmt, 7, dynamicbox->nodisplay);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
                goto out;
        }
 
-       ret = sqlite3_bind_text(stmt, 8, (char *)livebox->setup, -1, SQLITE_TRANSIENT);
+       ret = sqlite3_bind_text(stmt, 8, (char *)dynamicbox->setup, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrintWithConsole("Error: %s\n", sqlite3_errmsg(s_info.handle));
                ret = -EIO;
@@ -1809,7 +1792,7 @@ static inline int validate_pkgid(const char *appid, const char *pkgid)
        return 1 || !strncmp(appid, pkgid, strlen(appid));
 }
 
-static int livebox_destroy(struct livebox *livebox)
+static int dynamicbox_destroy(struct dynamicbox *dynamicbox)
 {
        struct dlist *l;
        struct dlist *n;
@@ -1819,46 +1802,46 @@ static int livebox_destroy(struct livebox *livebox)
        struct dlist *il;
        struct dlist *in;
 
-       xmlFree(livebox->auto_launch);
-       xmlFree(livebox->pkgid);
-       xmlFree(livebox->abi);
-       xmlFree(livebox->name);
-       xmlFree(livebox->icon);
-       xmlFree(livebox->lb_src);
-       xmlFree(livebox->lb_group);
-       xmlFree(livebox->pd_src);
-       xmlFree(livebox->pd_group);
-       xmlFree(livebox->pd_size);
-       xmlFree(livebox->libexec);
-       xmlFree(livebox->script);
-       xmlFree(livebox->period);
-       xmlFree(livebox->content);
-       xmlFree(livebox->setup);
-       xmlFree(livebox->category);
-       xmlFree(livebox->preview[0]); /* 1x1 */
-       xmlFree(livebox->preview[1]); /* 2x1 */
-       xmlFree(livebox->preview[2]); /* 2x2 */
-       xmlFree(livebox->preview[3]); /* 4x1 */
-       xmlFree(livebox->preview[4]); /* 4x2 */
-       xmlFree(livebox->preview[5]); /* 4x3 */
-       xmlFree(livebox->preview[6]); /* 4x4 */
-       xmlFree(livebox->preview[7]); /* 4x5 */
-       xmlFree(livebox->preview[8]); /* 4x6 */
-       xmlFree(livebox->preview[9]); /* easy 1x1 */
-       xmlFree(livebox->preview[10]); /* easy 3x1 */
-       xmlFree(livebox->preview[11]); /* easy 3x3 */
-       xmlFree(livebox->preview[12]); /* full */
-
-       dlist_foreach_safe(livebox->i18n_list, l, n, i18n) {
-               livebox->i18n_list = dlist_remove(livebox->i18n_list, l);
+       xmlFree(dynamicbox->auto_launch);
+       xmlFree(dynamicbox->pkgid);
+       xmlFree(dynamicbox->abi);
+       xmlFree(dynamicbox->name);
+       xmlFree(dynamicbox->icon);
+       xmlFree(dynamicbox->dbox_src);
+       xmlFree(dynamicbox->dbox_group);
+       xmlFree(dynamicbox->gbar_src);
+       xmlFree(dynamicbox->gbar_group);
+       xmlFree(dynamicbox->gbar_size);
+       xmlFree(dynamicbox->libexec);
+       xmlFree(dynamicbox->script);
+       xmlFree(dynamicbox->period);
+       xmlFree(dynamicbox->content);
+       xmlFree(dynamicbox->setup);
+       xmlFree(dynamicbox->category);
+       xmlFree(dynamicbox->preview[0]); /* 1x1 */
+       xmlFree(dynamicbox->preview[1]); /* 2x1 */
+       xmlFree(dynamicbox->preview[2]); /* 2x2 */
+       xmlFree(dynamicbox->preview[3]); /* 4x1 */
+       xmlFree(dynamicbox->preview[4]); /* 4x2 */
+       xmlFree(dynamicbox->preview[5]); /* 4x3 */
+       xmlFree(dynamicbox->preview[6]); /* 4x4 */
+       xmlFree(dynamicbox->preview[7]); /* 4x5 */
+       xmlFree(dynamicbox->preview[8]); /* 4x6 */
+       xmlFree(dynamicbox->preview[9]); /* easy 1x1 */
+       xmlFree(dynamicbox->preview[10]); /* easy 3x1 */
+       xmlFree(dynamicbox->preview[11]); /* easy 3x3 */
+       xmlFree(dynamicbox->preview[12]); /* full */
+
+       dlist_foreach_safe(dynamicbox->i18n_list, l, n, i18n) {
+               dynamicbox->i18n_list = dlist_remove(dynamicbox->i18n_list, l);
                xmlFree(i18n->name);
                xmlFree(i18n->icon);
                xmlFree(i18n->lang);
                free(i18n);
        }
 
-       dlist_foreach_safe(livebox->group_list, l, n, group) {
-               livebox->group_list = dlist_remove(livebox->group_list, l);
+       dlist_foreach_safe(dynamicbox->group_list, l, n, group) {
+               dynamicbox->group_list = dlist_remove(dynamicbox->group_list, l);
                DbgPrint("Release %s/%s\n", group->cluster, group->category);
 
                if (group->ctx_item) {
@@ -1877,11 +1860,11 @@ static int livebox_destroy(struct livebox *livebox)
                free(group);
        }
 
-       free(livebox);
+       free(dynamicbox);
        return 0;
 }
 
-static inline void update_i18n_name(struct livebox *livebox, xmlNodePtr node)
+static inline void update_i18n_name(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        struct i18n *i18n;
        struct dlist *l;
@@ -1896,16 +1879,16 @@ static inline void update_i18n_name(struct livebox *livebox, xmlNodePtr node)
 
        lang = xmlNodeGetLang(node);
        if (!lang) {
-               if (livebox->name) {
-                       DbgPrint("Override default name: %s\n", livebox->name);
-                       xmlFree(livebox->name);
+               if (dynamicbox->name) {
+                       DbgPrint("Override default name: %s\n", dynamicbox->name);
+                       xmlFree(dynamicbox->name);
                }
 
-               livebox->name = name;
+               dynamicbox->name = name;
                return;
        }
 
-       dlist_foreach(livebox->i18n_list, l, i18n) {
+       dlist_foreach(dynamicbox->i18n_list, l, i18n) {
                if (!xmlStrcasecmp(i18n->lang, lang)) {
                        if (i18n->name) {
                                DbgPrint("Override name: %s\n", i18n->name);
@@ -1928,10 +1911,10 @@ static inline void update_i18n_name(struct livebox *livebox, xmlNodePtr node)
        i18n->name = name;
        i18n->lang = lang;
        DbgPrint("Label[%s] - [%s] added\n", i18n->lang, i18n->name);
-       livebox->i18n_list = dlist_append(livebox->i18n_list, i18n);
+       dynamicbox->i18n_list = dlist_append(dynamicbox->i18n_list, i18n);
 }
 
-static inline void update_i18n_icon(struct livebox *livebox, xmlNodePtr node)
+static inline void update_i18n_icon(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        struct i18n *i18n;
        struct dlist *l;
@@ -1946,16 +1929,16 @@ static inline void update_i18n_icon(struct livebox *livebox, xmlNodePtr node)
 
        lang = xmlNodeGetLang(node);
        if (!lang) {
-               if (livebox->icon) {
-                       DbgPrint("Override default icon: %s\n", livebox->icon);
-                       xmlFree(livebox->icon);
+               if (dynamicbox->icon) {
+                       DbgPrint("Override default icon: %s\n", dynamicbox->icon);
+                       xmlFree(dynamicbox->icon);
                }
 
-               livebox->icon = icon;
+               dynamicbox->icon = icon;
                return;
        }
 
-       dlist_foreach(livebox->i18n_list, l, i18n) {
+       dlist_foreach(dynamicbox->i18n_list, l, i18n) {
                if (!xmlStrcasecmp(i18n->lang, lang)) {
                        if (i18n->icon) {
                                DbgPrint("Override icon %s for %s\n", i18n->icon, i18n->name);
@@ -1978,10 +1961,10 @@ static inline void update_i18n_icon(struct livebox *livebox, xmlNodePtr node)
        i18n->icon = icon;
        i18n->lang = lang;
        DbgPrint("Icon[%s] - [%s] added\n", i18n->lang, i18n->icon);
-       livebox->i18n_list = dlist_append(livebox->i18n_list, i18n);
+       dynamicbox->i18n_list = dlist_append(dynamicbox->i18n_list, i18n);
 }
 
-static inline void update_launch(struct livebox *livebox, xmlNodePtr node)
+static inline void update_launch(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        xmlChar *launch;
 
@@ -1991,18 +1974,18 @@ static inline void update_launch(struct livebox *livebox, xmlNodePtr node)
                return;
        }
 
-       if (livebox->auto_launch) {
-               xmlFree(livebox->auto_launch);
+       if (dynamicbox->auto_launch) {
+               xmlFree(dynamicbox->auto_launch);
        }
 
-       livebox->auto_launch = xmlStrdup(launch);
-       if (!livebox->auto_launch) {
+       dynamicbox->auto_launch = xmlStrdup(launch);
+       if (!dynamicbox->auto_launch) {
                ErrPrint("Failed to duplicate string: %s\n", (char *)launch);
                return;
        }
 }
 
-static inline void update_category(struct livebox *livebox, xmlNodePtr node)
+static inline void update_category(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        xmlChar *category;
 
@@ -2012,18 +1995,18 @@ static inline void update_category(struct livebox *livebox, xmlNodePtr node)
                return;
        }
 
-       if (livebox->category) {
-               xmlFree(livebox->category);
+       if (dynamicbox->category) {
+               xmlFree(dynamicbox->category);
        }
 
-       livebox->category = xmlStrdup(category);
-       if (!livebox->category) {
+       dynamicbox->category = xmlStrdup(category);
+       if (!dynamicbox->category) {
                ErrPrint("Failed to duplicate string: %s\n", (char *)category);
                return;
        }
 }
 
-static inline void update_ui_appid(struct livebox *livebox, xmlNodePtr node)
+static inline void update_ui_appid(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        xmlChar *uiapp;
        uiapp = xmlNodeGetContent(node);
@@ -2032,18 +2015,18 @@ static inline void update_ui_appid(struct livebox *livebox, xmlNodePtr node)
                return;
        }
 
-       if (livebox->uiapp) {
-               xmlFree(livebox->uiapp);
+       if (dynamicbox->uiapp) {
+               xmlFree(dynamicbox->uiapp);
        }
 
-       livebox->uiapp = xmlStrdup(uiapp);
-       if (!livebox->uiapp) {
+       dynamicbox->uiapp = xmlStrdup(uiapp);
+       if (!dynamicbox->uiapp) {
                ErrPrint("Failed to duplicate string: %s\n", (char *)uiapp);
                return;
        }
 }
 
-static inline void update_setup(struct livebox *livebox, xmlNodePtr node)
+static inline void update_setup(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        xmlChar *setup;
        setup = xmlNodeGetContent(node);
@@ -2052,18 +2035,18 @@ static inline void update_setup(struct livebox *livebox, xmlNodePtr node)
                return;
        }
 
-       if (livebox->setup) {
-               xmlFree(livebox->setup);
+       if (dynamicbox->setup) {
+               xmlFree(dynamicbox->setup);
        }
 
-       livebox->setup = xmlStrdup(setup);
-       if (!livebox->setup) {
+       dynamicbox->setup = xmlStrdup(setup);
+       if (!dynamicbox->setup) {
                ErrPrint("Failed to duplicate string: %s\n", (char *)setup);
                return;
        }
 }
 
-static inline void update_content(struct livebox *livebox, xmlNodePtr node)
+static inline void update_content(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        xmlChar *content;
        content = xmlNodeGetContent(node);
@@ -2072,21 +2055,21 @@ static inline void update_content(struct livebox *livebox, xmlNodePtr node)
                return;
        }
 
-       if (livebox->content) {
-               xmlFree(livebox->content);
+       if (dynamicbox->content) {
+               xmlFree(dynamicbox->content);
        }
 
-       livebox->content = xmlStrdup(content);
-       if (!livebox->content) {
+       dynamicbox->content = xmlStrdup(content);
+       if (!dynamicbox->content) {
                ErrPrint("Failed to duplicate string: %s\n", (char *)content);
                return;
        }
 }
 
-static void update_size_info(struct livebox *livebox, int idx, xmlNodePtr node)
+static void update_size_info(struct dynamicbox *dynamicbox, int idx, xmlNodePtr node)
 {
        if (xmlHasProp(node, (const xmlChar *)"preview")) {
-               livebox->preview[idx] = xmlGetProp(node, (const xmlChar *)"preview");
+               dynamicbox->preview[idx] = xmlGetProp(node, (const xmlChar *)"preview");
        }
 
        if (xmlHasProp(node, (const xmlChar *)"need_frame")) {
@@ -2094,13 +2077,13 @@ static void update_size_info(struct livebox *livebox, int idx, xmlNodePtr node)
 
                need_frame = xmlGetProp(node, (const xmlChar *)"need_frame");
                if (need_frame) {
-                       livebox->need_frame[idx] = !xmlStrcasecmp(need_frame, (const xmlChar *)"true");
+                       dynamicbox->need_frame[idx] = !xmlStrcasecmp(need_frame, (const xmlChar *)"true");
                        xmlFree(need_frame);
                } else {
-                       livebox->need_frame[idx] = livebox->default_need_frame;
+                       dynamicbox->need_frame[idx] = dynamicbox->default_need_frame;
                }
        } else {
-               livebox->need_frame[idx] = livebox->default_need_frame;
+               dynamicbox->need_frame[idx] = dynamicbox->default_need_frame;
        }
 
        if (xmlHasProp(node, (const xmlChar *)"touch_effect")) {
@@ -2108,13 +2091,13 @@ static void update_size_info(struct livebox *livebox, int idx, xmlNodePtr node)
 
                touch_effect = xmlGetProp(node, (const xmlChar *)"touch_effect");
                if (touch_effect) {
-                       livebox->touch_effect[idx] = !xmlStrcasecmp(touch_effect, (const xmlChar *)"true");
+                       dynamicbox->touch_effect[idx] = !xmlStrcasecmp(touch_effect, (const xmlChar *)"true");
                        xmlFree(touch_effect);
                } else {
-                       livebox->touch_effect[idx] = livebox->default_touch_effect;
+                       dynamicbox->touch_effect[idx] = dynamicbox->default_touch_effect;
                }
        } else {
-               livebox->touch_effect[idx] = livebox->default_touch_effect;
+               dynamicbox->touch_effect[idx] = dynamicbox->default_touch_effect;
        }
 
        if (xmlHasProp(node, (const xmlChar *)"mouse_event")) {
@@ -2122,38 +2105,38 @@ static void update_size_info(struct livebox *livebox, int idx, xmlNodePtr node)
 
                mouse_event = xmlGetProp(node, (const xmlChar *)"mouse_event");
                if (mouse_event) {
-                       livebox->mouse_event[idx] = !xmlStrcasecmp(mouse_event, (const xmlChar *)"true");
+                       dynamicbox->mouse_event[idx] = !xmlStrcasecmp(mouse_event, (const xmlChar *)"true");
                        xmlFree(mouse_event);
                } else {
-                       livebox->mouse_event[idx] = livebox->default_mouse_event;
+                       dynamicbox->mouse_event[idx] = dynamicbox->default_mouse_event;
                }
        } else {
-               livebox->mouse_event[idx] = livebox->default_mouse_event;
+               dynamicbox->mouse_event[idx] = dynamicbox->default_mouse_event;
        }
 }
 
-static inline void update_box(struct livebox *livebox, xmlNodePtr node)
+static inline void update_box(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        if (!xmlHasProp(node, (const xmlChar *)"type")) {
-               livebox->lb_type = LB_TYPE_FILE;
+               dynamicbox->dbox_type = DBOX_TYPE_FILE;
        } else {
                xmlChar *type;
 
                type = xmlGetProp(node, (const xmlChar *)"type");
                if (!type) {
                        ErrPrint("Type is NIL\n");
-                       livebox->lb_type = LB_TYPE_FILE;
+                       dynamicbox->dbox_type = DBOX_TYPE_FILE;
                } else {
                        if (!xmlStrcasecmp(type, (const xmlChar *)"text")) {
-                               livebox->lb_type = LB_TYPE_TEXT;
+                               dynamicbox->dbox_type = DBOX_TYPE_TEXT;
                        } else if (!xmlStrcasecmp(type, (const xmlChar *)"buffer")) {
-                               livebox->lb_type = LB_TYPE_BUFFER;
+                               dynamicbox->dbox_type = DBOX_TYPE_BUFFER;
                        } else if (!xmlStrcasecmp(type, (const xmlChar *)"script")) {
-                               livebox->lb_type = LB_TYPE_SCRIPT;
+                               dynamicbox->dbox_type = DBOX_TYPE_SCRIPT;
                        } else if (!xmlStrcasecmp(type, (const xmlChar *)"elm")) {
-                               livebox->lb_type = LB_TYPE_ELEMENTARY;
+                               dynamicbox->dbox_type = DBOX_TYPE_UIFW;
                        } else { /* Default */
-                               livebox->lb_type = LB_TYPE_FILE;
+                               dynamicbox->dbox_type = DBOX_TYPE_FILE;
                        }
 
                        xmlFree(type);
@@ -2161,46 +2144,46 @@ static inline void update_box(struct livebox *livebox, xmlNodePtr node)
        }
 
        if (!xmlHasProp(node, (const xmlChar *)"mouse_event")) {
-               livebox->default_mouse_event = 0;
+               dynamicbox->default_mouse_event = 0;
        } else {
                xmlChar *mouse_event;
 
                mouse_event = xmlGetProp(node, (const xmlChar *)"mouse_event");
                if (!mouse_event) {
                        ErrPrint("mouse_event is NIL\n");
-                       livebox->default_mouse_event = 0;
+                       dynamicbox->default_mouse_event = 0;
                } else {
-                       livebox->default_mouse_event = !xmlStrcasecmp(mouse_event, (const xmlChar *)"true");
+                       dynamicbox->default_mouse_event = !xmlStrcasecmp(mouse_event, (const xmlChar *)"true");
                        xmlFree(mouse_event);
                }
        }
 
        if (!xmlHasProp(node, (const xmlChar *)"touch_effect")) {
-               livebox->default_touch_effect = 1;
+               dynamicbox->default_touch_effect = 1;
        } else {
                xmlChar *touch_effect;
 
                touch_effect = xmlGetProp(node, (const xmlChar *)"touch_effect");
                if (!touch_effect) {
                        ErrPrint("default touch_effect is NIL\n");
-                       livebox->default_touch_effect = 1;
+                       dynamicbox->default_touch_effect = 1;
                } else {
-                       livebox->default_touch_effect = !xmlStrcasecmp(touch_effect, (const xmlChar *)"true");
+                       dynamicbox->default_touch_effect = !xmlStrcasecmp(touch_effect, (const xmlChar *)"true");
                        xmlFree(touch_effect);
                }
        }
 
        if (!xmlHasProp(node, (const xmlChar *)"need_frame")) {
-               livebox->default_need_frame = 0;
+               dynamicbox->default_need_frame = 0;
        } else {
                xmlChar *need_frame;
 
                need_frame = xmlGetProp(node, (const xmlChar *)"need_frame");
                if (!need_frame) {
                        ErrPrint("default need_frame is NIL\n");
-                       livebox->default_need_frame = 0;
+                       dynamicbox->default_need_frame = 0;
                } else {
-                       livebox->default_need_frame = !xmlStrcasecmp(need_frame, (const xmlChar *)"true");
+                       dynamicbox->default_need_frame = !xmlStrcasecmp(need_frame, (const xmlChar *)"true");
                        xmlFree(need_frame);
                }
        }
@@ -2228,62 +2211,62 @@ static inline void update_box(struct livebox *livebox, xmlNodePtr node)
 
                        if (!xmlStrcasecmp(size, (const xmlChar *)"1x1")) {
                                if (is_easy) {
-                                       livebox->size_list |= LB_SIZE_TYPE_EASY_1x1;
-                                       update_size_info(livebox, 9, node);
+                                       dynamicbox->size_list |= DBOX_SIZE_TYPE_EASY_1x1;
+                                       update_size_info(dynamicbox, 9, node);
                                } else {
-                                       livebox->size_list |= LB_SIZE_TYPE_1x1;
-                                       update_size_info(livebox, 0, node);
+                                       dynamicbox->size_list |= DBOX_SIZE_TYPE_1x1;
+                                       update_size_info(dynamicbox, 0, node);
                                }
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"3x1")) {
                                if (is_easy) {
-                                       livebox->size_list |= LB_SIZE_TYPE_EASY_3x1;
-                                       update_size_info(livebox, 10, node);
+                                       dynamicbox->size_list |= DBOX_SIZE_TYPE_EASY_3x1;
+                                       update_size_info(dynamicbox, 10, node);
                                } else {
                                        ErrPrint("Invalid size tag (%s)\n", size);
                                }
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"3x3")) {
                                if (is_easy) {
-                                       livebox->size_list |= LB_SIZE_TYPE_EASY_3x3;
-                                       update_size_info(livebox, 11, node);
+                                       dynamicbox->size_list |= DBOX_SIZE_TYPE_EASY_3x3;
+                                       update_size_info(dynamicbox, 11, node);
                                } else {
                                        ErrPrint("Invalid size tag (%s)\n", size);
                                }
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"2x1")) {
-                               livebox->size_list |= LB_SIZE_TYPE_2x1;
-                               update_size_info(livebox, 1, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_2x1;
+                               update_size_info(dynamicbox, 1, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"2x2")) {
-                               livebox->size_list |= LB_SIZE_TYPE_2x2;
-                               update_size_info(livebox, 2, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_2x2;
+                               update_size_info(dynamicbox, 2, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"4x1")) {
-                               livebox->size_list |= LB_SIZE_TYPE_4x1;
-                               update_size_info(livebox, 3, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_4x1;
+                               update_size_info(dynamicbox, 3, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"4x2")) {
-                               livebox->size_list |= LB_SIZE_TYPE_4x2;
-                               update_size_info(livebox, 4, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_4x2;
+                               update_size_info(dynamicbox, 4, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"4x3")) {
-                               livebox->size_list |= LB_SIZE_TYPE_4x3;
-                               update_size_info(livebox, 5, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_4x3;
+                               update_size_info(dynamicbox, 5, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"4x4")) {
-                               livebox->size_list |= LB_SIZE_TYPE_4x4;
-                               update_size_info(livebox, 6, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_4x4;
+                               update_size_info(dynamicbox, 6, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"4x5")) {
-                               livebox->size_list |= LB_SIZE_TYPE_4x5;
-                               update_size_info(livebox, 7, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_4x5;
+                               update_size_info(dynamicbox, 7, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"4x6")) {
-                               livebox->size_list |= LB_SIZE_TYPE_4x6;
-                               update_size_info(livebox, 8, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_4x6;
+                               update_size_info(dynamicbox, 8, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"21x21")) {
-                               livebox->size_list |= LB_SIZE_TYPE_EASY_1x1;
-                               update_size_info(livebox, 9, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_EASY_1x1;
+                               update_size_info(dynamicbox, 9, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"23x21")) {
-                               livebox->size_list |= LB_SIZE_TYPE_EASY_3x1;
-                               update_size_info(livebox, 10, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_EASY_3x1;
+                               update_size_info(dynamicbox, 10, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"23x23")) {
-                               livebox->size_list |= LB_SIZE_TYPE_EASY_3x3;
-                               update_size_info(livebox, 11, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_EASY_3x3;
+                               update_size_info(dynamicbox, 11, node);
                        } else if (!xmlStrcasecmp(size, (const xmlChar *)"0x0")) {
-                               livebox->size_list |= LB_SIZE_TYPE_0x0;
-                               update_size_info(livebox, 12, node);
+                               dynamicbox->size_list |= DBOX_SIZE_TYPE_0x0;
+                               update_size_info(dynamicbox, 12, node);
                        } else {
                                ErrPrint("Invalid size tag (%s)\n", size);
                        }
@@ -2303,12 +2286,12 @@ static inline void update_box(struct livebox *livebox, xmlNodePtr node)
                                continue;
                        }
 
-                       if (livebox->lb_src) {
-                               DbgPrint("Override lb src: %s\n", livebox->lb_src);
-                               xmlFree(livebox->lb_src);
+                       if (dynamicbox->dbox_src) {
+                               DbgPrint("Override lb src: %s\n", dynamicbox->dbox_src);
+                               xmlFree(dynamicbox->dbox_src);
                        }
 
-                       livebox->lb_src = src;
+                       dynamicbox->dbox_src = src;
 
                        if (xmlHasProp(node, (const xmlChar *)"group")) {
                                xmlChar *group;
@@ -2316,19 +2299,19 @@ static inline void update_box(struct livebox *livebox, xmlNodePtr node)
                                if (!group) {
                                        ErrPrint("Group is NIL\n");
                                } else {
-                                       if (livebox->lb_group) {
-                                               DbgPrint("Override lb group: %s\n", livebox->lb_group);
-                                               xmlFree(livebox->lb_group);
+                                       if (dynamicbox->dbox_group) {
+                                               DbgPrint("Override lb group: %s\n", dynamicbox->dbox_group);
+                                               xmlFree(dynamicbox->dbox_group);
                                        }
 
-                                       livebox->lb_group = group;
+                                       dynamicbox->dbox_group = group;
                                }
                        }
                }
        }
 }
 
-static inline void update_group(struct livebox *livebox, xmlNodePtr node)
+static inline void update_group(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        xmlNodePtr cluster;
        xmlNodePtr category;
@@ -2394,7 +2377,7 @@ static inline void update_group(struct livebox *livebox, xmlNodePtr node)
                        }
 
                        group->category = category_name;
-                       livebox->group_list = dlist_append(livebox->group_list, group);
+                       dynamicbox->group_list = dlist_append(dynamicbox->group_list, group);
 
                        if (!xmlHasProp(category, (const xmlChar *)"context")) {
                                DbgPrint("%s, %s has no ctx info\n", group->cluster, group->category);
@@ -2458,10 +2441,10 @@ static inline void update_group(struct livebox *livebox, xmlNodePtr node)
        }
 }
 
-static inline void update_pd(struct livebox *livebox, xmlNodePtr node)
+static inline void update_pd(struct dynamicbox *dynamicbox, xmlNodePtr node)
 {
        if (!xmlHasProp(node, (const xmlChar *)"type")) {
-               livebox->pd_type = PD_TYPE_SCRIPT;
+               dynamicbox->gbar_type = GBAR_TYPE_SCRIPT;
        } else {
                xmlChar *type;
 
@@ -2472,13 +2455,13 @@ static inline void update_pd(struct livebox *livebox, xmlNodePtr node)
                }
 
                if (!xmlStrcasecmp(type, (const xmlChar *)"text")) {
-                       livebox->pd_type = PD_TYPE_TEXT;
+                       dynamicbox->gbar_type = GBAR_TYPE_TEXT;
                } else if (!xmlStrcasecmp(type, (const xmlChar *)"buffer")) {
-                       livebox->pd_type = PD_TYPE_BUFFER;
+                       dynamicbox->gbar_type = GBAR_TYPE_BUFFER;
                } else if (!xmlStrcasecmp(type, (const xmlChar *)"elm")) {
-                       livebox->pd_type = PD_TYPE_ELEMENTARY;
+                       dynamicbox->gbar_type = GBAR_TYPE_UIFW;
                } else {
-                       livebox->pd_type = PD_TYPE_SCRIPT;
+                       dynamicbox->gbar_type = GBAR_TYPE_SCRIPT;
                }
 
                xmlFree(type);
@@ -2494,11 +2477,11 @@ static inline void update_pd(struct livebox *livebox, xmlNodePtr node)
                                continue;
                        }
 
-                       if (livebox->pd_size) {
-                               DbgPrint("Override pd size: %s\n", livebox->pd_size);
-                               xmlFree(livebox->pd_size);
+                       if (dynamicbox->gbar_size) {
+                               DbgPrint("Override pd size: %s\n", dynamicbox->gbar_size);
+                               xmlFree(dynamicbox->gbar_size);
                        }
-                       livebox->pd_size = size;
+                       dynamicbox->gbar_size = size;
                } else if (!xmlStrcasecmp(node->name, (const xmlChar *)"script")) {
                        xmlChar *src;
 
@@ -2513,12 +2496,12 @@ static inline void update_pd(struct livebox *livebox, xmlNodePtr node)
                                continue;
                        }
 
-                       if (livebox->pd_src) {
-                               DbgPrint("Overide PD src: %s\n", livebox->pd_src);
-                               xmlFree(livebox->pd_src);
+                       if (dynamicbox->gbar_src) {
+                               DbgPrint("Overide PD src: %s\n", dynamicbox->gbar_src);
+                               xmlFree(dynamicbox->gbar_src);
                        }
 
-                       livebox->pd_src = src;
+                       dynamicbox->gbar_src = src;
 
                        if (xmlHasProp(node, (const xmlChar *)"group")) {
                                xmlChar *group;
@@ -2526,19 +2509,19 @@ static inline void update_pd(struct livebox *livebox, xmlNodePtr node)
                                if (!group) {
                                        ErrPrint("Group is NIL\n");
                                } else {
-                                       if (livebox->pd_group) {
-                                               DbgPrint("Override PD group : %s\n", livebox->pd_group);
-                                               xmlFree(livebox->pd_group);
+                                       if (dynamicbox->gbar_group) {
+                                               DbgPrint("Override PD group : %s\n", dynamicbox->gbar_group);
+                                               xmlFree(dynamicbox->gbar_group);
                                        }
 
-                                       livebox->pd_group = group;
+                                       dynamicbox->gbar_group = group;
                                }
                        }
                }
        }
 }
 
-static int db_insert_livebox(struct livebox *livebox, const char *appid)
+static int db_insert_dynamicbox(struct dynamicbox *dynamicbox, const char *appid)
 {
        struct dlist *l;
        struct dlist *il;
@@ -2549,126 +2532,126 @@ static int db_insert_livebox(struct livebox *livebox, const char *appid)
        struct option *option;
 
        begin_transaction();
-       ret = db_insert_pkgmap(appid, (char *)livebox->pkgid, (char *)livebox->uiapp, livebox->primary, (char *)livebox->category);
+       ret = db_insert_pkgmap(appid, (char *)dynamicbox->pkgid, (char *)dynamicbox->uiapp, dynamicbox->primary, (char *)dynamicbox->category);
        if (ret < 0) {
                goto errout;
        }
 
-       ret = db_insert_provider(livebox);
+       ret = db_insert_provider(dynamicbox);
        if (ret < 0) {
                goto errout;
        }
 
-       ret = db_insert_client(livebox);
+       ret = db_insert_client(dynamicbox);
        if (ret < 0) {
                goto errout;
        }
 
-       dlist_foreach(livebox->i18n_list, l, i18n) {
-               ret = db_insert_i18n((char *)livebox->pkgid, (char *)i18n->lang, (char *)i18n->name, (char *)i18n->icon);
+       dlist_foreach(dynamicbox->i18n_list, l, i18n) {
+               ret = db_insert_i18n((char *)dynamicbox->pkgid, (char *)i18n->lang, (char *)i18n->name, (char *)i18n->icon);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_1x1) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_1x1, (char *)livebox->preview[0], livebox->touch_effect[0], livebox->need_frame[0], livebox->mouse_event[0]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_1x1) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_1x1, (char *)dynamicbox->preview[0], dynamicbox->touch_effect[0], dynamicbox->need_frame[0], dynamicbox->mouse_event[0]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_2x1) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_2x1, (char *)livebox->preview[1], livebox->touch_effect[1], livebox->need_frame[1], livebox->mouse_event[1]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_2x1) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_2x1, (char *)dynamicbox->preview[1], dynamicbox->touch_effect[1], dynamicbox->need_frame[1], dynamicbox->mouse_event[1]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_2x2) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_2x2, (char *)livebox->preview[2], livebox->touch_effect[2], livebox->need_frame[2], livebox->mouse_event[2]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_2x2) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_2x2, (char *)dynamicbox->preview[2], dynamicbox->touch_effect[2], dynamicbox->need_frame[2], dynamicbox->mouse_event[2]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_4x1) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_4x1, (char *)livebox->preview[3], livebox->touch_effect[3], livebox->need_frame[3], livebox->mouse_event[3]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_4x1) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_4x1, (char *)dynamicbox->preview[3], dynamicbox->touch_effect[3], dynamicbox->need_frame[3], dynamicbox->mouse_event[3]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_4x2) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_4x2, (char *)livebox->preview[4], livebox->touch_effect[4], livebox->need_frame[4], livebox->mouse_event[4]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_4x2) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_4x2, (char *)dynamicbox->preview[4], dynamicbox->touch_effect[4], dynamicbox->need_frame[4], dynamicbox->mouse_event[4]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_4x3) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_4x3, (char *)livebox->preview[5], livebox->touch_effect[5], livebox->need_frame[5], livebox->mouse_event[5]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_4x3) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_4x3, (char *)dynamicbox->preview[5], dynamicbox->touch_effect[5], dynamicbox->need_frame[5], dynamicbox->mouse_event[5]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_4x4) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_4x4, (char *)livebox->preview[6], livebox->touch_effect[6], livebox->need_frame[6], livebox->mouse_event[6]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_4x4) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_4x4, (char *)dynamicbox->preview[6], dynamicbox->touch_effect[6], dynamicbox->need_frame[6], dynamicbox->mouse_event[6]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_4x5) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_4x5, (char *)livebox->preview[7], livebox->touch_effect[7], livebox->need_frame[7], livebox->mouse_event[7]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_4x5) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_4x5, (char *)dynamicbox->preview[7], dynamicbox->touch_effect[7], dynamicbox->need_frame[7], dynamicbox->mouse_event[7]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_4x6) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_4x6, (char *)livebox->preview[8], livebox->touch_effect[8], livebox->need_frame[8], livebox->mouse_event[8]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_4x6) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_4x6, (char *)dynamicbox->preview[8], dynamicbox->touch_effect[8], dynamicbox->need_frame[8], dynamicbox->mouse_event[8]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_EASY_1x1) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_EASY_1x1, (char *)livebox->preview[9], livebox->touch_effect[9], livebox->need_frame[9], livebox->mouse_event[9]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_EASY_1x1) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_EASY_1x1, (char *)dynamicbox->preview[9], dynamicbox->touch_effect[9], dynamicbox->need_frame[9], dynamicbox->mouse_event[9]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_EASY_3x1) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_EASY_3x1, (char *)livebox->preview[10], livebox->touch_effect[10], livebox->need_frame[10], livebox->mouse_event[10]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_EASY_3x1) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_EASY_3x1, (char *)dynamicbox->preview[10], dynamicbox->touch_effect[10], dynamicbox->need_frame[10], dynamicbox->mouse_event[10]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_EASY_3x3) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_EASY_3x3, (char *)livebox->preview[11], livebox->touch_effect[11], livebox->need_frame[11], livebox->mouse_event[11]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_EASY_3x3) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_EASY_3x3, (char *)dynamicbox->preview[11], dynamicbox->touch_effect[11], dynamicbox->need_frame[11], dynamicbox->mouse_event[11]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       if (livebox->size_list & LB_SIZE_TYPE_0x0) {
-               ret = db_insert_box_size((char *)livebox->pkgid, LB_SIZE_TYPE_0x0, (char *)livebox->preview[12], livebox->touch_effect[12], livebox->need_frame[12], livebox->mouse_event[12]);
+       if (dynamicbox->size_list & DBOX_SIZE_TYPE_0x0) {
+               ret = db_insert_box_size((char *)dynamicbox->pkgid, DBOX_SIZE_TYPE_0x0, (char *)dynamicbox->preview[12], dynamicbox->touch_effect[12], dynamicbox->need_frame[12], dynamicbox->mouse_event[12]);
                if (ret < 0) {
                        goto errout;
                }
        }
 
-       dlist_foreach(livebox->group_list, l, group) {
+       dlist_foreach(dynamicbox->group_list, l, group) {
                /* group ID "id" */
                id = db_get_group_id((char *)group->cluster, (char *)group->category);
                if (id < 0) {
                        int ret;
                        
-                       ret = db_insert_group((char *)livebox->pkgid, (char *)group->cluster, (char *)group->category);
+                       ret = db_insert_group((char *)dynamicbox->pkgid, (char *)group->cluster, (char *)group->category);
                        if (ret < 0) {
                                ErrPrint("[%s]-[%s] is not exists\n", group->cluster, group->category);
                                continue;
@@ -2687,19 +2670,19 @@ static int db_insert_livebox(struct livebox *livebox, const char *appid)
                        continue;
                }
 
-               ret = db_insert_groupmap(id, (char *)livebox->pkgid, (char *)group->ctx_item);
+               ret = db_insert_groupmap(id, (char *)dynamicbox->pkgid, (char *)group->ctx_item);
                if (ret < 0) {
                        goto errout;
                }
 
                /* REUSE "id" from here , option ID */
-               id = db_get_option_id(id, (char *)livebox->pkgid, (char *)group->ctx_item);
+               id = db_get_option_id(id, (char *)dynamicbox->pkgid, (char *)group->ctx_item);
                if (id < 0) {
                        goto errout;
                }
 
                dlist_foreach(group->option_list, il, option) {
-                       ret = db_insert_option((char *)livebox->pkgid, id, (char *)option->key, (char *)option->value);
+                       ret = db_insert_option((char *)dynamicbox->pkgid, id, (char *)option->key, (char *)option->value);
                        if (ret < 0) {
                                goto errout;
                        }
@@ -2707,19 +2690,19 @@ static int db_insert_livebox(struct livebox *livebox, const char *appid)
        }
 
        commit_transaction();
-       livebox_destroy(livebox);
+       dynamicbox_destroy(dynamicbox);
        return 0;
 
 errout:
        ErrPrint("ROLLBACK\n");
        rollback_transaction();
-       livebox_destroy(livebox);
+       dynamicbox_destroy(dynamicbox);
        return ret;
 }
 
 static int do_install(xmlNodePtr node, const char *appid)
 {
-       struct livebox *livebox;
+       struct dynamicbox *dynamicbox;
        xmlChar *pkgid;
        xmlChar *tmp;
 
@@ -2737,18 +2720,18 @@ static int do_install(xmlNodePtr node, const char *appid)
 
        DbgPrint("appid: %s\n", (char *)pkgid);
 
-       livebox = calloc(1, sizeof(*livebox));
-       if (!livebox) {
+       dynamicbox = calloc(1, sizeof(*dynamicbox));
+       if (!dynamicbox) {
                ErrPrint("Heap: %s\n", strerror(errno));
                xmlFree(pkgid);
                return -ENOMEM;
        }
 
-       livebox->pkgid = pkgid;
+       dynamicbox->pkgid = pkgid;
 
        if (xmlHasProp(node, (const xmlChar *)"count")) {
                tmp = xmlGetProp(node, (const xmlChar *)"count");
-               if (sscanf((const char *)tmp, "%d", &livebox->count) != 1) {
+               if (sscanf((const char *)tmp, "%d", &dynamicbox->count) != 1) {
                        ErrPrint("Invalid syntax: %s\n", (const char *)tmp);
                }
                xmlFree(tmp);
@@ -2756,97 +2739,97 @@ static int do_install(xmlNodePtr node, const char *appid)
 
        if (xmlHasProp(node, (const xmlChar *)"primary")) {
                tmp = xmlGetProp(node, (const xmlChar *)"primary");
-               livebox->primary = !xmlStrcasecmp(tmp, (const xmlChar *)"true");
+               dynamicbox->primary = !xmlStrcasecmp(tmp, (const xmlChar *)"true");
                xmlFree(tmp);
        }
 
        if (xmlHasProp(node, (const xmlChar *)"script")) {
-               livebox->script = xmlGetProp(node, (const xmlChar *)"script");
-               if (!livebox->script) {
+               dynamicbox->script = xmlGetProp(node, (const xmlChar *)"script");
+               if (!dynamicbox->script) {
                        ErrPrint("script is NIL\n");
                }
        }
 
        if (xmlHasProp(node, (const xmlChar *)"nodisplay")) {
                tmp = xmlGetProp(node, (const xmlChar *)"nodisplay");
-               livebox->nodisplay = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
+               dynamicbox->nodisplay = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
                xmlFree(tmp);
        }
 
        if (xmlHasProp(node, (const xmlChar *)"pinup")) {
                tmp = xmlGetProp(node, (const xmlChar *)"pinup");
-               livebox->pinup = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
+               dynamicbox->pinup = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
                xmlFree(tmp);
        }
 
        if (xmlHasProp(node, (const xmlChar *)"period")) {
-               livebox->period = xmlGetProp(node, (const xmlChar *)"period");
-               if (!livebox->period) {
+               dynamicbox->period = xmlGetProp(node, (const xmlChar *)"period");
+               if (!dynamicbox->period) {
                        ErrPrint("Period is NIL\n");
                }
        }
 
        if (xmlHasProp(node, (const xmlChar *)"timeout")) {
-               livebox->timeout = xmlGetProp(node, (const xmlChar *)"timeout");
-               if (!livebox->timeout) {
+               dynamicbox->timeout = xmlGetProp(node, (const xmlChar *)"timeout");
+               if (!dynamicbox->timeout) {
                        ErrPrint("Timeout is NIL\n");
                }
        }
 
        if (xmlHasProp(node, (const xmlChar *)"secured")) {
                tmp = xmlGetProp(node, (const xmlChar *)"secured");
-               livebox->secured = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
+               dynamicbox->secured = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
                xmlFree(tmp);
        }
 
        if (xmlHasProp(node, (const xmlChar *)"network")) {
                tmp = xmlGetProp(node, (const xmlChar *)"network");
-               livebox->network = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
+               dynamicbox->network = tmp && !xmlStrcasecmp(tmp, (const xmlChar *)"true");
                xmlFree(tmp);
        }
 
        if (xmlHasProp(node, (const xmlChar *)"abi")) {
-               livebox->abi = xmlGetProp(node, (const xmlChar *)"abi");
-               if (!livebox->abi) {
+               dynamicbox->abi = xmlGetProp(node, (const xmlChar *)"abi");
+               if (!dynamicbox->abi) {
                        ErrPrint("ABI is NIL\n");
-                       livebox_destroy(livebox);
+                       dynamicbox_destroy(dynamicbox);
                        return -EFAULT;
                }
        } else {
-               livebox->abi = xmlStrdup((const xmlChar *)"c");
-               if (!livebox->abi) {
+               dynamicbox->abi = xmlStrdup((const xmlChar *)"c");
+               if (!dynamicbox->abi) {
                        ErrPrint("Heap: %s\n", strerror(errno));
-                       livebox_destroy(livebox);
+                       dynamicbox_destroy(dynamicbox);
                        return -ENOMEM;
                }
        }
 
        if (xmlHasProp(node, (const xmlChar *)"libexec")) {
-               livebox->libexec = xmlGetProp(node, (const xmlChar *)"libexec");
-               if (!livebox->libexec) {
+               dynamicbox->libexec = xmlGetProp(node, (const xmlChar *)"libexec");
+               if (!dynamicbox->libexec) {
                        ErrPrint("libexec is NIL\n");
-                       livebox_destroy(livebox);
+                       dynamicbox_destroy(dynamicbox);
                        return -EFAULT;
                }
-       } else if (!xmlStrcasecmp(livebox->abi, (const xmlChar *)"c") || !xmlStrcasecmp(livebox->abi, (const xmlChar *)"cpp")) {
+       } else if (!xmlStrcasecmp(dynamicbox->abi, (const xmlChar *)"c") || !xmlStrcasecmp(dynamicbox->abi, (const xmlChar *)"cpp")) {
                char *filename;
                int len;
 
-               len = strlen((char *)livebox->pkgid) + strlen("/libexec/liblive-.so") + 1;
+               len = strlen((char *)dynamicbox->pkgid) + strlen("/libexec/liblive-.so") + 1;
 
                filename = malloc(len);
                if (!filename) {
-                       livebox_destroy(livebox);
+                       dynamicbox_destroy(dynamicbox);
                        return -ENOMEM;
                }
 
-               snprintf(filename, len, "/libexec/liblive-%s.so", livebox->pkgid);
-               livebox->libexec = xmlStrdup((xmlChar *)filename);
+               snprintf(filename, len, "/libexec/liblive-%s.so", dynamicbox->pkgid);
+               dynamicbox->libexec = xmlStrdup((xmlChar *)filename);
                DbgPrint("Use the default libexec: %s\n", filename);
                free(filename);
 
-               if (!livebox->libexec) {
-                       livebox_destroy(livebox);
+               if (!dynamicbox->libexec) {
+                       dynamicbox_destroy(dynamicbox);
                        return -ENOMEM;
                }
        }
@@ -2858,57 +2841,57 @@ static int do_install(xmlNodePtr node, const char *appid)
 
                DbgPrint("Nodename: %s\n", node->name);
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"label")) {
-                       update_i18n_name(livebox, node);
+                       update_i18n_name(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"icon")) {
-                       update_i18n_icon(livebox, node);
+                       update_i18n_icon(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"box")) {
-                       update_box(livebox, node);
+                       update_box(dynamicbox, node);
                        continue;
                }
 
-               if (!xmlStrcasecmp(node->name, (const xmlChar *)"pd")) {
-                       update_pd(livebox, node);
+               if (!xmlStrcasecmp(node->name, (const xmlChar *)"glancebar")) {
+                       update_pd(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"group")) {
-                       update_group(livebox, node);
+                       update_group(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"content")) {
-                       update_content(livebox, node);
+                       update_content(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"setup")) {
-                       update_setup(livebox, node);
+                       update_setup(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"launch")) {
-                       update_launch(livebox, node);
+                       update_launch(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"ui-appid")) {
-                       update_ui_appid(livebox, node);
+                       update_ui_appid(dynamicbox, node);
                        continue;
                }
 
                if (!xmlStrcasecmp(node->name, (const xmlChar *)"category")) {
-                       update_category(livebox, node);
+                       update_category(dynamicbox, node);
                        continue;
                }
        }
 
-       return db_insert_livebox(livebox, appid);
+       return db_insert_dynamicbox(dynamicbox, appid);
 }
 
 static inline int do_uninstall(xmlNodePtr node, const char *appid)
@@ -3125,7 +3108,7 @@ int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr docPtr, const char *appid)
 
        for (node = node->children; node; node = node->next) {
                DbgPrint("node->name: %s\n", node->name);
-               if (!xmlStrcasecmp(node->name, (const xmlChar *)"livebox")) {
+               if (!xmlStrcasecmp(node->name, (const xmlChar *)"dynamicbox")) {
                        ret = do_install(node, appid);
                        if (ret < 0) {
                                DbgPrint("Returns: %d\n", ret);
@@ -3187,7 +3170,7 @@ int PKGMGR_PARSER_PLUGIN_UPGRADE(xmlDocPtr docPtr, const char *appid)
        }
 
        for (node = node->children; node; node = node->next) {
-               if (!xmlStrcasecmp(node->name, (const xmlChar *)"livebox")) {
+               if (!xmlStrcasecmp(node->name, (const xmlChar *)"dynamicbox")) {
                        ret = do_install(node, appid);
                        if (ret < 0) {
                                DbgPrint("Returns: %d\n", ret);
index edbfa21..dfc9251 100644 (file)
--- a/src/abi.c
+++ b/src/abi.c
@@ -20,7 +20,7 @@
 
 #include <Eina.h>
 #include <dlog.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 
 #include "util.h"
 #include "debug.h"
@@ -46,14 +46,14 @@ HAPI int abi_add_entry(const char *abi, const char *pkgname)
        item = malloc(sizeof(*item));
        if (!item) {
                ErrPrint("Failed to add a new entry for abi[%s - %s]\n", abi, pkgname);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->abi = strdup(abi);
        if (!item->abi) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(item);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->pkgname = strdup(pkgname);
@@ -61,11 +61,11 @@ HAPI int abi_add_entry(const char *abi, const char *pkgname)
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(item->abi);
                DbgFree(item);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        s_abi.list = eina_list_append(s_abi.list, item);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int abi_update_entry(const char *abi, const char *pkgname)
@@ -78,7 +78,7 @@ HAPI int abi_update_entry(const char *abi, const char *pkgname)
        _pkgname = strdup(pkgname);
        if (!_pkgname) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        EINA_LIST_FOREACH_SAFE(s_abi.list, l, n, item) {
@@ -90,7 +90,7 @@ HAPI int abi_update_entry(const char *abi, const char *pkgname)
        }
 
        DbgFree(_pkgname);
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI int abi_del_entry(const char *abi)
@@ -105,11 +105,11 @@ HAPI int abi_del_entry(const char *abi)
                        DbgFree(item->abi);
                        DbgFree(item->pkgname);
                        DbgFree(item);
-                       return LB_STATUS_SUCCESS;
+                       return DBOX_STATUS_ERROR_NONE;
                }
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI void abi_del_all(void)
index 6e68b63..5502245 100755 (executable)
@@ -20,7 +20,7 @@
 
 #include <dlog.h>
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #else
 #include "lite-errno.h"
 #endif
@@ -547,13 +547,13 @@ HAPI int badge_service_init(void)
 {
        if (s_info.svc_ctx) {
                ErrPrint("Already initialized\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        s_info.svc_ctx = service_common_create(BADGE_SOCKET, service_thread_main, NULL);
        if (!s_info.svc_ctx) {
                ErrPrint("Unable to activate service thread\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), BADGE_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
@@ -561,7 +561,7 @@ HAPI int badge_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
@@ -570,24 +570,24 @@ HAPI int badge_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
        DbgPrint("Successfully initiated\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int badge_service_fini(void)
 {
        if (!s_info.svc_ctx) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        service_common_destroy(s_info.svc_ctx);
        s_info.svc_ctx = NULL;
        DbgPrint("Successfully finalized\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index 2519403..54531b3 100644 (file)
 
 #include <dlog.h>
 #include <packet.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_buffer.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_conf.h>
 
 #include "debug.h"
 #include "conf.h"
 #include "buffer_handler.h"
 #include "script_handler.h" // Reverse dependency. must has to be broken
 
-struct buffer {
-       enum {
-               CREATED = 0x00beef00,
-               DESTROYED = 0x00dead00
-       } state;
-       enum buffer_type type;
-       int refcnt;
-       void *info;
-       char data[];
-};
-
 /*!
  * \brief Allocate this in the buffer->data.
  */
@@ -88,10 +80,9 @@ struct buffer_info
 {
        void *buffer;
        char *id;
-       char *lock;
-       int lock_fd;
+       dynamicbox_lock_info_t lock_info;
 
-       enum buffer_type type;
+       enum dynamicbox_fb_type type;
 
        int w;
        int h;
@@ -116,127 +107,10 @@ static struct {
        .pixmap_list = NULL,
 };
 
-static int destroy_lock_file(struct buffer_info *info)
-{
-       if (!info->inst) {
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       if (!info->lock) {
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       if (close(info->lock_fd) < 0) {
-               ErrPrint("close: %s\n", strerror(errno));
-       }
-       info->lock_fd = -1;
-
-       if (unlink(info->lock) < 0) {
-               ErrPrint("unlink: %s\n", strerror(errno));
-       }
-
-       DbgFree(info->lock);
-       info->lock = NULL;
-       return LB_STATUS_SUCCESS;
-}
-
-static int create_lock_file(struct buffer_info *info)
-{
-       const char *id;
-       int len;
-       char *file;
-       char target[3] = "pd";
-
-       if (!info->inst) {
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       id = instance_id(info->inst);
-       if (!id) {
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       len = strlen(id);
-       file = malloc(len + 20);
-       if (!file) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
-       }
-
-       if (script_handler_buffer_info(instance_pd_script(info->inst)) != info && instance_pd_buffer(info->inst) != info) {
-               target[0] = 'l';
-               target[1] = 'b';
-               /* target[2] = '\0'; // We already have this ;) */
-       }
-
-       snprintf(file, len + 20, "%s.%s.lck", util_uri_to_path(id), target);
-       info->lock_fd = open(file, O_WRONLY|O_CREAT, 0644);
-       if (info->lock_fd < 0) {
-               ErrPrint("open: %s\n", strerror(errno));
-               DbgFree(file);
-               return LB_STATUS_ERROR_IO;
-       }
-
-       info->lock = file;
-       return LB_STATUS_SUCCESS;
-}
-
-static int do_buffer_lock(struct buffer_info *info)
-{
-       struct flock flock;
-       int ret;
-
-       if (info->lock_fd < 0) {
-               return LB_STATUS_SUCCESS;
-       }
-
-       flock.l_type = F_WRLCK;
-       flock.l_whence = SEEK_SET;
-       flock.l_start = 0;
-       flock.l_len = 0;
-       flock.l_pid = getpid();
-
-       do {
-               ret = fcntl(info->lock_fd, F_SETLKW, &flock);
-               if (ret < 0) {
-                       ret = errno;
-                       ErrPrint("fcntl: %s\n", strerror(errno));
-               }
-       } while (ret == EINTR);
-
-       return LB_STATUS_SUCCESS;
-}
-
-static int do_buffer_unlock(struct buffer_info *info)
-{
-       struct flock flock;
-       int ret;
-
-       if (info->lock_fd < 0) {
-               return LB_STATUS_SUCCESS;
-       }
-
-       flock.l_type = F_UNLCK;
-       flock.l_whence = SEEK_SET;
-       flock.l_start = 0;
-       flock.l_len = 0;
-       flock.l_pid = getpid();
-
-       do {
-               ret = fcntl(info->lock_fd, F_SETLKW, &flock);
-               if (ret < 0) {
-                       ret = errno;
-                       ErrPrint("fcntl: %s\n", strerror(errno));
-               }
-       } while (ret == EINTR);
-
-       return LB_STATUS_SUCCESS;
-}
-
-static inline struct buffer *create_pixmap(struct buffer_info *info)
+static inline dynamicbox_fb_t create_pixmap(struct buffer_info *info)
 {
        struct gem_data *gem;
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        Display *disp;
        Window parent;
        XGCValues gcv;
@@ -257,9 +131,9 @@ static inline struct buffer *create_pixmap(struct buffer_info *info)
 
        gem = (struct gem_data *)buffer->data;
 
-       buffer->type = BUFFER_TYPE_PIXMAP;
+       buffer->type = DBOX_FB_TYPE_PIXMAP;
        buffer->refcnt = 1;
-       buffer->state = CREATED;
+       buffer->state = DBOX_FB_STATE_CREATED;
 
        gem->attachments[0] = DRI2BufferFrontLeft;
        gem->count = 1;
@@ -297,7 +171,7 @@ static inline struct buffer *create_pixmap(struct buffer_info *info)
        return buffer;
 }
 
-static inline int create_gem(struct buffer *buffer)
+static inline int create_gem(dynamicbox_fb_t buffer)
 {
        struct gem_data *gem;
        Display *disp;
@@ -305,7 +179,7 @@ static inline int create_gem(struct buffer *buffer)
        disp = ecore_x_display_get();
        if (!disp) {
                ErrPrint("Failed to get display\n");
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        gem = (struct gem_data *)buffer->data;
@@ -314,11 +188,11 @@ static inline int create_gem(struct buffer *buffer)
                gem->data = calloc(1, gem->w * gem->h * gem->depth);
                if (!gem->data) {
                        ErrPrint("Heap: %s\n", strerror(errno));
-                       return LB_STATUS_ERROR_MEMORY;
+                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                }
 
                ErrPrint("DRI2(gem) is not supported - Fallback to the S/W Backend\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        DRI2CreateDrawable(disp, gem->pixmap);
@@ -328,7 +202,7 @@ static inline int create_gem(struct buffer *buffer)
        if (!gem->dri2_buffer || !gem->dri2_buffer->name) {
                ErrPrint("Failed to get a gem buffer\n");
                DRI2DestroyDrawable(disp, gem->pixmap);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
        /*!
         * \How can I destroy this?
@@ -337,10 +211,10 @@ static inline int create_gem(struct buffer *buffer)
        if (!gem->pixmap_bo) {
                ErrPrint("Failed to import BO\n");
                DRI2DestroyDrawable(disp, gem->pixmap);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
-       if (AUTO_ALIGN && gem->dri2_buffer->pitch != gem->w * gem->depth) {
+       if (DYNAMICBOX_CONF_AUTO_ALIGN && gem->dri2_buffer->pitch != gem->w * gem->depth) {
                gem->compensate_data = calloc(1, gem->w * gem->h * gem->depth);
                if (!gem->compensate_data) {
                        ErrPrint("Failed to allocate heap\n");
@@ -349,12 +223,12 @@ static inline int create_gem(struct buffer *buffer)
 
        DbgPrint("dri2_buffer: %p, name: %p, %dx%d, pitch: %d, buf_count: %d, depth: %d, compensate: %p (%d)\n",
                                gem->dri2_buffer, gem->dri2_buffer->name, gem->w, gem->h,
-                               gem->dri2_buffer->pitch, gem->buf_count, gem->depth, gem->compensate_data, AUTO_ALIGN);
+                               gem->dri2_buffer->pitch, gem->buf_count, gem->depth, gem->compensate_data, DYNAMICBOX_CONF_AUTO_ALIGN);
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-static inline void *acquire_gem(struct buffer *buffer)
+static inline void *acquire_gem(dynamicbox_fb_t buffer)
 {
        struct gem_data *gem;
 
@@ -394,7 +268,7 @@ static inline void *acquire_gem(struct buffer *buffer)
        return gem->compensate_data ? gem->compensate_data : gem->data;
 }
 
-static inline void release_gem(struct buffer *buffer)
+static inline void release_gem(dynamicbox_fb_t buffer)
 {
        struct gem_data *gem;
 
@@ -453,7 +327,7 @@ static inline void release_gem(struct buffer *buffer)
        }
 }
 
-static inline int destroy_pixmap(struct buffer *buffer)
+static inline int destroy_pixmap(dynamicbox_fb_t buffer)
 {
        struct gem_data *gem;
 
@@ -464,24 +338,24 @@ static inline int destroy_pixmap(struct buffer *buffer)
 
                disp = ecore_x_display_get();
                if (!disp) {
-                       return LB_STATUS_ERROR_IO;
+                       return DBOX_STATUS_ERROR_IO_ERROR;
                }
 
                DbgPrint("pixmap %lu\n", gem->pixmap);
                XFreePixmap(disp, gem->pixmap);
        }
 
-       buffer->state = DESTROYED;
+       buffer->state = DBOX_FB_STATE_DESTROYED;
        DbgFree(buffer);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-static inline int destroy_gem(struct buffer *buffer)
+static inline int destroy_gem(dynamicbox_fb_t buffer)
 {
        struct gem_data *gem;
 
        if (!buffer) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        /*!
@@ -489,7 +363,7 @@ static inline int destroy_gem(struct buffer *buffer)
         */
        gem = (struct gem_data *)buffer->data;
        if (!gem) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (s_info.fd >= 0) {
@@ -512,44 +386,44 @@ static inline int destroy_gem(struct buffer *buffer)
                gem->data = NULL;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int load_file_buffer(struct buffer_info *info)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        double timestamp;
        int size;
        char *new_id;
        int len;
 
-       len = strlen(IMAGE_PATH) + 40;
+       len = strlen(DYNAMICBOX_CONF_IMAGE_PATH) + 40;
        new_id = malloc(len);
        if (!new_id) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        timestamp = util_timestamp();
-       snprintf(new_id, len, SCHEMA_FILE "%s%lf", IMAGE_PATH, timestamp);
+       snprintf(new_id, len, SCHEMA_FILE "%s%lf", DYNAMICBOX_CONF_IMAGE_PATH, timestamp);
 
        size = sizeof(*buffer) + info->w * info->h * info->pixel_size;
        if (!size) {
                ErrPrint("Canvas buffer size is ZERO\n");
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        buffer = calloc(1, size);
        if (!buffer) {
                ErrPrint("Failed to allocate buffer\n");
                DbgFree(new_id);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       buffer->type = BUFFER_TYPE_FILE;
+       buffer->type = DBOX_FB_TYPE_FILE;
        buffer->refcnt = 0;
-       buffer->state = CREATED;
+       buffer->state = DBOX_FB_STATE_CREATED;
        buffer->info = info;
 
        DbgFree(info->id);
@@ -558,27 +432,27 @@ static inline int load_file_buffer(struct buffer_info *info)
        info->is_loaded = 1;
 
        DbgPrint("FILE type %d created\n", size);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int load_shm_buffer(struct buffer_info *info)
 {
        int id;
        int size;
-       struct buffer *buffer; /* Just for getting a size */
+       dynamicbox_fb_t buffer; /* Just for getting a size */
        char *new_id;
        int len;
 
        size = info->w * info->h * info->pixel_size;
        if (!size) {
                ErrPrint("Invalid buffer size\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        id = shmget(IPC_PRIVATE, size + sizeof(*buffer), IPC_CREAT | 0666);
        if (id < 0) {
                ErrPrint("shmget: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        buffer = shmat(id, NULL, 0);
@@ -589,12 +463,12 @@ static inline int load_shm_buffer(struct buffer_info *info)
                        ErrPrint("%s shmctl: %s\n", info->id, strerror(errno));
                }
 
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
-       buffer->type = BUFFER_TYPE_SHM;
+       buffer->type = DBOX_FB_TYPE_SHM;
        buffer->refcnt = id;
-       buffer->state = CREATED; /*!< Needless */
+       buffer->state = DBOX_FB_STATE_CREATED; /*!< Needless */
        buffer->info = (void *)size; /*!< Use this field to indicates the size of SHM */
 
        len = strlen(SCHEMA_SHM) + 30; /* strlen("shm://") + 30 */
@@ -610,7 +484,7 @@ static inline int load_shm_buffer(struct buffer_info *info)
                        ErrPrint("shmctl: %s\n", strerror(errno));
                }
 
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        snprintf(new_id, len, SCHEMA_SHM "%d", id);
@@ -619,12 +493,12 @@ static inline int load_shm_buffer(struct buffer_info *info)
        info->id = new_id;
        info->buffer = buffer;
        info->is_loaded = 1;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int load_pixmap_buffer(struct buffer_info *info)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        struct gem_data *gem;
        char *new_id;
        int len;
@@ -645,7 +519,7 @@ static inline int load_pixmap_buffer(struct buffer_info *info)
        if (!buffer) {
                DbgPrint("Failed to make a reference of a pixmap\n");
                info->is_loaded = 0;
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        len = strlen(SCHEMA_PIXMAP) + 30; /* strlen("pixmap://") + 30 */
@@ -654,7 +528,7 @@ static inline int load_pixmap_buffer(struct buffer_info *info)
                ErrPrint("Heap: %s\n", strerror(errno));
                info->is_loaded = 0;
                buffer_handler_pixmap_unref(buffer);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        DbgFree(info->id);
@@ -664,38 +538,47 @@ static inline int load_pixmap_buffer(struct buffer_info *info)
 
        snprintf(info->id, len, SCHEMA_PIXMAP "%d:%d", (int)gem->pixmap, info->pixel_size);
        DbgPrint("Loaded pixmap(info->id): %s\n", info->id);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_load(struct buffer_info *info)
 {
        int ret;
+       dynamicbox_target_type_e type = DBOX_TYPE_GBAR;
 
        if (!info) {
                ErrPrint("buffer handler is nil\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (info->is_loaded) {
                DbgPrint("Buffer is already loaded\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        switch (info->type) {
-       case BUFFER_TYPE_FILE:
+       case DBOX_FB_TYPE_FILE:
                ret = load_file_buffer(info);
-               (void)create_lock_file(info);
+
+               if (script_handler_buffer_info(instance_gbar_script(info->inst)) != info && instance_gbar_buffer(info->inst) != info) {
+                       type = DBOX_TYPE_DBOX;
+               }
+               info->lock_info = dynamicbox_service_create_lock(instance_id(info->inst), type, DBOX_LOCK_WRITE);
                break;
-       case BUFFER_TYPE_SHM:
+       case DBOX_FB_TYPE_SHM:
                ret = load_shm_buffer(info);
-               (void)create_lock_file(info);
+
+               if (script_handler_buffer_info(instance_gbar_script(info->inst)) != info && instance_gbar_buffer(info->inst) != info) {
+                       type = DBOX_TYPE_DBOX;
+               }
+               info->lock_info = dynamicbox_service_create_lock(instance_id(info->inst), type, DBOX_LOCK_WRITE);
                break;
-       case BUFFER_TYPE_PIXMAP:
+       case DBOX_FB_TYPE_PIXMAP:
                ret = load_pixmap_buffer(info);
                break;
        default:
                ErrPrint("Invalid buffer\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                break;
        }
 
@@ -710,7 +593,7 @@ static inline int unload_file_buffer(struct buffer_info *info)
        new_id = strdup(SCHEMA_FILE "/tmp/.live.undefined");
        if (!new_id) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        DbgFree(info->buffer);
@@ -723,7 +606,7 @@ static inline int unload_file_buffer(struct buffer_info *info)
 
        DbgFree(info->id);
        info->id = new_id;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int unload_shm_buffer(struct buffer_info *info)
@@ -734,19 +617,19 @@ static inline int unload_shm_buffer(struct buffer_info *info)
        new_id = strdup(SCHEMA_SHM "-1");
        if (!new_id) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        if (sscanf(info->id, SCHEMA_SHM "%d", &id) != 1) {
                ErrPrint("%s Invalid ID\n", info->id);
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (id < 0) {
                ErrPrint("(%s) Invalid id: %d\n", info->id, id);
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (shmdt(info->buffer) < 0) {
@@ -761,7 +644,7 @@ static inline int unload_shm_buffer(struct buffer_info *info)
 
        DbgFree(info->id);
        info->id = new_id;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int unload_pixmap_buffer(struct buffer_info *info)
@@ -773,19 +656,19 @@ static inline int unload_pixmap_buffer(struct buffer_info *info)
        new_id = strdup(SCHEMA_PIXMAP "0:0");
        if (!new_id) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        if (sscanf(info->id, SCHEMA_PIXMAP "%d:%d", &id, &pixels) != 2) {
                ErrPrint("Invalid ID (%s)\n", info->id);
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (id == 0) {
                ErrPrint("(%s) Invalid id: %d\n", info->id, id);
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        /*!
@@ -802,7 +685,7 @@ static inline int unload_pixmap_buffer(struct buffer_info *info)
 
        DbgFree(info->id);
        info->id = new_id;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_unload(struct buffer_info *info)
@@ -811,29 +694,31 @@ EAPI int buffer_handler_unload(struct buffer_info *info)
 
        if (!info) {
                ErrPrint("buffer handler is NIL\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!info->is_loaded) {
                ErrPrint("Buffer is not loaded\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (info->type) {
-       case BUFFER_TYPE_FILE:
-               (void)destroy_lock_file(info);
+       case DBOX_FB_TYPE_FILE:
+               dynamicbox_service_destroy_lock(info->lock_info);
+               info->lock_info = NULL;
                ret = unload_file_buffer(info);
                break;
-       case BUFFER_TYPE_SHM:
-               (void)destroy_lock_file(info);
+       case DBOX_FB_TYPE_SHM:
+               dynamicbox_service_destroy_lock(info->lock_info);
+               info->lock_info = NULL;
                ret = unload_shm_buffer(info);
                break;
-       case BUFFER_TYPE_PIXMAP:
+       case DBOX_FB_TYPE_PIXMAP:
                ret = unload_pixmap_buffer(info);
                break;
        default:
                ErrPrint("Invalid buffer\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                break;
        }
 
@@ -849,14 +734,14 @@ EAPI const char *buffer_handler_id(const struct buffer_info *info)
        return info ? info->id : "";
 }
 
-EAPI enum buffer_type buffer_handler_type(const struct buffer_info *info)
+EAPI enum dynamicbox_fb_type buffer_handler_type(const struct buffer_info *info)
 {
-       return info ? info->type : BUFFER_TYPE_ERROR;
+       return info ? info->type : DBOX_FB_TYPE_ERROR;
 }
 
 EAPI void *buffer_handler_fb(struct buffer_info *info)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
 
        if (!info) {
                return NULL;
@@ -864,7 +749,7 @@ EAPI void *buffer_handler_fb(struct buffer_info *info)
 
        buffer = info->buffer;
 
-       if (info->type == BUFFER_TYPE_PIXMAP) {
+       if (info->type == DBOX_FB_TYPE_PIXMAP) {
                void *canvas;
                int ret;
 
@@ -885,7 +770,7 @@ EAPI void *buffer_handler_fb(struct buffer_info *info)
 
 EAPI int buffer_handler_pixmap(const struct buffer_info *info)
 {
-       struct buffer *buf;
+       dynamicbox_fb_t buf;
        struct gem_data *gem;
 
        if (!info) {
@@ -893,12 +778,12 @@ EAPI int buffer_handler_pixmap(const struct buffer_info *info)
                return 0;
        }
 
-       if (info->type != BUFFER_TYPE_PIXMAP) {
+       if (info->type != DBOX_FB_TYPE_PIXMAP) {
                ErrPrint("Invalid buffer type\n");
                return 0;
        }
 
-       buf = (struct buffer *)info->buffer;
+       buf = (dynamicbox_fb_t)info->buffer;
        if (!buf) {
                ErrPrint("Invalid buffer data\n");
                return 0;
@@ -910,7 +795,7 @@ EAPI int buffer_handler_pixmap(const struct buffer_info *info)
 
 EAPI void *buffer_handler_pixmap_acquire_buffer(struct buffer_info *info)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
 
        if (!info || !info->is_loaded) {
                ErrPrint("Buffer is not loaded\n");
@@ -927,7 +812,7 @@ EAPI void *buffer_handler_pixmap_acquire_buffer(struct buffer_info *info)
 
 EAPI void *buffer_handler_pixmap_buffer(struct buffer_info *info)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        struct gem_data *gem;
 
        if (!info) {
@@ -948,67 +833,84 @@ EAPI void *buffer_handler_pixmap_buffer(struct buffer_info *info)
        return gem->compensate_data ? gem->compensate_data : gem->data;
 }
 
-/*!
- * \return "buffer" object (Not the buffer_info)
+/**
+ * @return "buffer" object (Not the buffer_info)
  */
 EAPI void *buffer_handler_pixmap_ref(struct buffer_info *info)
 {
-       struct buffer *buffer;
+    dynamicbox_fb_t buffer;
 
-       if (!info->is_loaded) {
-               ErrPrint("Buffer is not loaded\n");
-               return NULL;
-       }
+    if (!info->is_loaded) {
+       ErrPrint("Buffer is not loaded\n");
+       return NULL;
+    }
 
-       if (info->type != BUFFER_TYPE_PIXMAP) {
-               ErrPrint("Buffer type is not matched\n");
-               return NULL;
-       }
+    if (info->type != DBOX_FB_TYPE_PIXMAP) {
+       ErrPrint("Buffer type is not matched\n");
+       return NULL;
+    }
 
-       buffer = info->buffer;
+    buffer = info->buffer;
+    if (!buffer) {
+       int need_gem = 1;
+
+       buffer = create_pixmap(info);
        if (!buffer) {
-               int need_gem = 1;
+           ErrPrint("Failed to create a pixmap\n");
+           return NULL;
+       }
 
-               buffer = create_pixmap(info);
-               if (!buffer) {
-                       ErrPrint("Failed to create a pixmap\n");
-                       return NULL;
-               }
+       info->buffer = buffer;
 
-               info->buffer = buffer;
+       if (info->inst) {
+           struct pkg_info *pkg;
 
-               if (info->inst) {
-                       struct pkg_info *pkg;
+           pkg = instance_package(info->inst);
 
-                       if (instance_lb_buffer(info->inst) == info) {
-                               pkg = instance_package(info->inst);
-                               if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-                                       need_gem = 0;
-                               }
-                       } else if (instance_pd_buffer(info->inst) == info) {
-                               pkg = instance_package(info->inst);
-                               if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-                                       need_gem = 0;
-                               }
-                       }
+           if (instance_dbox_buffer(info->inst) == info) {
+               if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+                   need_gem = 0;
+               }
+           } else if (instance_gbar_buffer(info->inst) == info) {
+               if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+                   need_gem = 0;
                }
+           } else {
+               int idx;
+
+               for (idx = 0; idx < DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT; idx++) {
+                   if (instance_dbox_extra_buffer(info->inst, idx) == info) {
+                       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+                           need_gem = 0;
+                           break;
+                       }
+                   }
 
-               if (need_gem) {
-                       if (create_gem(buffer) < 0) {
-                               /* okay, something goes wrong */
+                   if (instance_gbar_extra_buffer(info->inst, idx) == info) {
+                       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+                           need_gem = 0;
+                           break;
                        }
+                   }
                }
-
-       } else if (buffer->state != CREATED || buffer->type != BUFFER_TYPE_PIXMAP) {
-               ErrPrint("Invalid buffer\n");
-               return NULL;
-       } else if (buffer->refcnt > 0) {
-               buffer->refcnt++;
-               return buffer;
+           }
        }
 
-       s_info.pixmap_list = eina_list_append(s_info.pixmap_list, buffer);
+       if (need_gem) {
+           if (create_gem(buffer) < 0) {
+               /* okay, something goes wrong */
+           }
+       }
+    } else if (buffer->state != DBOX_FB_STATE_CREATED || buffer->type != DBOX_FB_TYPE_PIXMAP) {
+       ErrPrint("Invalid buffer\n");
+       return NULL;
+    } else if (buffer->refcnt > 0) {
+       buffer->refcnt++;
        return buffer;
+    }
+
+    s_info.pixmap_list = eina_list_append(s_info.pixmap_list, buffer);
+    return buffer;
 }
 
 /*!
@@ -1016,7 +918,7 @@ EAPI void *buffer_handler_pixmap_ref(struct buffer_info *info)
  */
 EAPI void *buffer_handler_pixmap_find(int pixmap)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        struct gem_data *gem;
        Eina_List *l;
        Eina_List *n;
@@ -1026,7 +928,7 @@ EAPI void *buffer_handler_pixmap_find(int pixmap)
        }
 
        EINA_LIST_FOREACH_SAFE(s_info.pixmap_list, l, n, buffer) {
-               if (!buffer || buffer->state != CREATED || buffer->type != BUFFER_TYPE_PIXMAP) {
+               if (!buffer || buffer->state != DBOX_FB_STATE_CREATED || buffer->type != DBOX_FB_TYPE_PIXMAP) {
                        s_info.pixmap_list = eina_list_remove(s_info.pixmap_list, buffer);
                        DbgPrint("Invalid buffer (List Removed: %p)\n", buffer);
                        continue;
@@ -1043,18 +945,18 @@ EAPI void *buffer_handler_pixmap_find(int pixmap)
 
 EAPI int buffer_handler_pixmap_release_buffer(void *canvas)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        struct gem_data *gem;
        Eina_List *l;
        Eina_List *n;
        void *_ptr;
 
        if (!canvas) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        EINA_LIST_FOREACH_SAFE(s_info.pixmap_list, l, n, buffer) {
-               if (!buffer || buffer->state != CREATED || buffer->type != BUFFER_TYPE_PIXMAP) {
+               if (!buffer || buffer->state != DBOX_FB_STATE_CREATED || buffer->type != DBOX_FB_TYPE_PIXMAP) {
                        s_info.pixmap_list = eina_list_remove(s_info.pixmap_list, buffer);
                        continue;
                }
@@ -1069,11 +971,11 @@ EAPI int buffer_handler_pixmap_release_buffer(void *canvas)
                if (_ptr == canvas) {
                        release_gem(buffer);
                        buffer_handler_pixmap_unref(buffer);
-                       return LB_STATUS_SUCCESS;
+                       return DBOX_STATUS_ERROR_NONE;
                }
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 /*!
@@ -1084,12 +986,12 @@ EAPI int buffer_handler_pixmap_release_buffer(void *canvas)
  */
 EAPI int buffer_handler_pixmap_unref(void *buffer_ptr)
 {
-       struct buffer *buffer = buffer_ptr;
+       dynamicbox_fb_t buffer = buffer_ptr;
        struct buffer_info *info;
 
        buffer->refcnt--;
        if (buffer->refcnt > 0) {
-               return LB_STATUS_SUCCESS; /* Return NULL means, gem buffer still in use */
+               return DBOX_STATUS_ERROR_NONE; /* Return NULL means, gem buffer still in use */
        }
 
        s_info.pixmap_list = eina_list_remove(s_info.pixmap_list, buffer);
@@ -1108,7 +1010,7 @@ EAPI int buffer_handler_pixmap_unref(void *buffer_ptr)
                info->buffer = NULL;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_is_loaded(const struct buffer_info *info)
@@ -1132,19 +1034,19 @@ EAPI int buffer_handler_resize(struct buffer_info *info, int w, int h)
 
        if (!info) {
                ErrPrint("Invalid handler\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (info->w == w && info->h == h) {
                DbgPrint("No changes\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        buffer_handler_update_size(info, w, h);
 
        if (!info->is_loaded) {
                DbgPrint("Buffer size is updated[%dx%d]\n", w, h);
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        ret = buffer_handler_unload(info);
@@ -1157,13 +1059,13 @@ EAPI int buffer_handler_resize(struct buffer_info *info, int w, int h)
                ErrPrint("Load: %d\n", ret);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_get_size(struct buffer_info *info, int *w, int *h)
 {
        if (!info) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (w) {
@@ -1173,7 +1075,7 @@ EAPI int buffer_handler_get_size(struct buffer_info *info, int *w, int *h)
                *h = info->h;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI struct inst_info *buffer_handler_instance(struct buffer_info *info)
@@ -1185,7 +1087,7 @@ EAPI struct inst_info *buffer_handler_instance(struct buffer_info *info)
  * \note
  * Only for used S/W Backend
  */
-static inline int sync_for_pixmap(struct buffer *buffer)
+static inline int sync_for_pixmap(dynamicbox_fb_t buffer)
 {
        XShmSegmentInfo si;
        XImage *xim;
@@ -1195,32 +1097,32 @@ static inline int sync_for_pixmap(struct buffer *buffer)
        Screen *screen;
        Visual *visual;
 
-       if (buffer->state != CREATED) {
+       if (buffer->state != DBOX_FB_STATE_CREATED) {
                ErrPrint("Invalid state of a FB\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       if (buffer->type != BUFFER_TYPE_PIXMAP) {
+       if (buffer->type != DBOX_FB_TYPE_PIXMAP) {
                ErrPrint("Invalid buffer\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        disp = ecore_x_display_get();
        if (!disp) {
                ErrPrint("Failed to get a display\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        gem = (struct gem_data *)buffer->data;
        if (gem->w == 0 || gem->h == 0) {
                DbgPrint("Nothing can be sync\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        si.shmid = shmget(IPC_PRIVATE, gem->w * gem->h * gem->depth, IPC_CREAT | 0666);
        if (si.shmid < 0) {
                ErrPrint("shmget: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        si.readOnly = False;
@@ -1229,7 +1131,7 @@ static inline int sync_for_pixmap(struct buffer *buffer)
                if (shmctl(si.shmid, IPC_RMID, 0) < 0) {
                        ErrPrint("shmctl: %s\n", strerror(errno));
                }
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        screen = DefaultScreenOfDisplay(disp);
@@ -1247,7 +1149,7 @@ static inline int sync_for_pixmap(struct buffer *buffer)
                if (shmctl(si.shmid, IPC_RMID, 0) < 0) {
                        ErrPrint("shmctl: %s\n", strerror(errno));
                }
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        xim->data = si.shmaddr;
@@ -1267,7 +1169,7 @@ static inline int sync_for_pixmap(struct buffer *buffer)
                        ErrPrint("shmctl: %s\n", strerror(errno));
                }
 
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        memcpy(xim->data, gem->data, gem->w * gem->h * gem->depth);
@@ -1291,14 +1193,14 @@ static inline int sync_for_pixmap(struct buffer *buffer)
                ErrPrint("shmctl: %s\n", strerror(errno));
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI void buffer_handler_flush(struct buffer_info *info)
 {
        int fd;
        int size;
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
 
        if (!info || !info->buffer) {
                return;
@@ -1306,7 +1208,7 @@ EAPI void buffer_handler_flush(struct buffer_info *info)
 
        buffer = info->buffer;
 
-       if (buffer->type == BUFFER_TYPE_PIXMAP) {
+       if (buffer->type == DBOX_FB_TYPE_PIXMAP) {
                if (s_info.fd > 0) {
                        //return;
                        //PERF_INIT();
@@ -1329,7 +1231,7 @@ EAPI void buffer_handler_flush(struct buffer_info *info)
                                ErrPrint("Failed to sync via S/W Backend\n");
                        }
                }
-       } else if (buffer->type == BUFFER_TYPE_FILE) {
+       } else if (buffer->type == DBOX_FB_TYPE_FILE) {
                fd = open(util_uri_to_path(info->id), O_WRONLY | O_CREAT, 0644);
                if (fd < 0) {
                        ErrPrint("%s open falied: %s\n", util_uri_to_path(info->id), strerror(errno));
@@ -1337,11 +1239,11 @@ EAPI void buffer_handler_flush(struct buffer_info *info)
                }
 
                size = info->w * info->h * info->pixel_size;
-               do_buffer_lock(info);
+               dynamicbox_service_acquire_lock(info->lock_info);
                if (write(fd, info->buffer, size) != size) {
                        ErrPrint("Write is not completed: %s\n", strerror(errno));
                }
-               do_buffer_unlock(info);
+               dynamicbox_service_release_lock(info->lock_info);
 
                if (close(fd) < 0) {
                        ErrPrint("close: %s\n", strerror(errno));
@@ -1359,30 +1261,30 @@ HAPI int buffer_handler_init(void)
 
        if (!DRI2QueryExtension(ecore_x_display_get(), &s_info.evt_base, &s_info.err_base)) {
                ErrPrint("DRI2 is not supported\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (!DRI2QueryVersion(ecore_x_display_get(), &dri2Major, &dri2Minor)) {
                ErrPrint("DRI2 is not supported\n");
                s_info.evt_base = 0;
                s_info.err_base = 0;
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (!DRI2Connect(ecore_x_display_get(), DefaultRootWindow(ecore_x_display_get()), &driverName, &deviceName)) {
                ErrPrint("DRI2 is not supported\n");
                s_info.evt_base = 0;
                s_info.err_base = 0;
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       if (USE_SW_BACKEND) {
+       if (DYNAMICBOX_CONF_USE_SW_BACKEND) {
                DbgPrint("Fallback to the S/W Backend\n");
                s_info.evt_base = 0;
                s_info.err_base = 0;
                DbgFree(deviceName);
                DbgFree(driverName);
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        s_info.fd = open(deviceName, O_RDWR);
@@ -1392,7 +1294,7 @@ HAPI int buffer_handler_init(void)
                ErrPrint("Failed to open a drm device: (%s)\n", strerror(errno));
                s_info.evt_base = 0;
                s_info.err_base = 0;
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        drmGetMagic(s_info.fd, &magic);
@@ -1405,7 +1307,7 @@ HAPI int buffer_handler_init(void)
                s_info.fd = -1;
                s_info.evt_base = 0;
                s_info.err_base = 0;
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        s_info.slp_bufmgr = tbm_bufmgr_init(s_info.fd);
@@ -1417,10 +1319,10 @@ HAPI int buffer_handler_init(void)
                s_info.fd = -1;
                s_info.evt_base = 0;
                s_info.err_base = 0;
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int buffer_handler_fini(void)
@@ -1437,12 +1339,12 @@ HAPI int buffer_handler_fini(void)
                s_info.slp_bufmgr = NULL;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-static inline struct buffer *raw_open_file(const char *filename)
+static inline dynamicbox_fb_t raw_open_file(const char *filename)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        int fd;
        off_t off;
        int ret;
@@ -1485,8 +1387,8 @@ static inline struct buffer *raw_open_file(const char *filename)
                return NULL;
        }
 
-       buffer->state = CREATED;
-       buffer->type = BUFFER_TYPE_FILE;
+       buffer->state = DBOX_FB_STATE_CREATED;
+       buffer->type = DBOX_FB_TYPE_FILE;
        buffer->refcnt = 0;
        buffer->info = (void *)off;
 
@@ -1509,18 +1411,18 @@ static inline struct buffer *raw_open_file(const char *filename)
        return buffer;
 }
 
-static inline int raw_close_file(struct buffer *buffer)
+static inline int raw_close_file(dynamicbox_fb_t buffer)
 {
        DbgFree(buffer);
        return 0;
 }
 
-static inline struct buffer *raw_open_shm(int shm)
+static inline dynamicbox_fb_t raw_open_shm(int shm)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
 
-       buffer = (struct buffer *)shmat(shm, NULL, SHM_RDONLY);
-       if (buffer == (struct buffer *)-1) {
+       buffer = (dynamicbox_fb_t)shmat(shm, NULL, SHM_RDONLY);
+       if (buffer == (dynamicbox_fb_t)-1) {
                ErrPrint("shmat: %s\n", strerror(errno));
                return NULL;
        }
@@ -1528,7 +1430,7 @@ static inline struct buffer *raw_open_shm(int shm)
        return buffer;
 }
 
-static inline int raw_close_shm(struct buffer *buffer)
+static inline int raw_close_shm(dynamicbox_fb_t buffer)
 {
        int ret;
 
@@ -1540,58 +1442,58 @@ static inline int raw_close_shm(struct buffer *buffer)
        return ret;
 }
 
-static inline struct buffer *raw_open_pixmap(unsigned int pixmap)
+static inline dynamicbox_fb_t raw_open_pixmap(unsigned int pixmap)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
 
-       buffer = calloc(1, sizeof(*buffer) + DEFAULT_PIXELS);
+       buffer = calloc(1, sizeof(*buffer) + DYNAMICBOX_CONF_DEFAULT_PIXELS);
        if (!buffer) {
                ErrPrint("Heap: %s\n", strerror(errno));
                return NULL;
        }
 
-       buffer->state = CREATED;
-       buffer->type = BUFFER_TYPE_PIXMAP;
+       buffer->state = DBOX_FB_STATE_CREATED;
+       buffer->type = DBOX_FB_TYPE_PIXMAP;
 
        return buffer;
 }
 
-static inline int raw_close_pixmap(struct buffer *buffer)
+static inline int raw_close_pixmap(dynamicbox_fb_t buffer)
 {
        DbgFree(buffer);
        return 0;
 }
 
-EAPI void *buffer_handler_raw_data(struct buffer *buffer)
+EAPI void *buffer_handler_raw_data(dynamicbox_fb_t buffer)
 {
-       if (!buffer || buffer->state != CREATED) {
+       if (!buffer || buffer->state != DBOX_FB_STATE_CREATED) {
                return NULL;
        }
 
        return buffer->data;
 }
 
-EAPI int buffer_handler_raw_size(struct buffer *buffer)
+EAPI int buffer_handler_raw_size(dynamicbox_fb_t buffer)
 {
-       if (!buffer || buffer->state != CREATED) {
-               return LB_STATUS_ERROR_INVALID;
+       if (!buffer || buffer->state != DBOX_FB_STATE_CREATED) {
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        return (int)buffer->info;
 }
 
-EAPI struct buffer *buffer_handler_raw_open(enum buffer_type buffer_type, void *resource)
+EAPI dynamicbox_fb_t buffer_handler_raw_open(enum dynamicbox_fb_type dynamicbox_fb_type, void *resource)
 {
-       struct buffer *handle;
+       dynamicbox_fb_t handle;
 
-       switch (buffer_type) {
-       case BUFFER_TYPE_SHM:
+       switch (dynamicbox_fb_type) {
+       case DBOX_FB_TYPE_SHM:
                handle = raw_open_shm((int)resource);
                break;
-       case BUFFER_TYPE_FILE:
+       case DBOX_FB_TYPE_FILE:
                handle = raw_open_file(resource);
                break;
-       case BUFFER_TYPE_PIXMAP:
+       case DBOX_FB_TYPE_PIXMAP:
                handle = raw_open_pixmap((unsigned int)resource);
                break;
        default:
@@ -1602,26 +1504,26 @@ EAPI struct buffer *buffer_handler_raw_open(enum buffer_type buffer_type, void *
        return handle;
 }
 
-EAPI int buffer_handler_raw_close(struct buffer *buffer)
+EAPI int buffer_handler_raw_close(dynamicbox_fb_t buffer)
 {
        int ret;
 
-       if (!buffer || buffer->state != CREATED) {
-               return LB_STATUS_ERROR_INVALID;
+       if (!buffer || buffer->state != DBOX_FB_STATE_CREATED) {
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (buffer->type) {
-       case BUFFER_TYPE_SHM:
+       case DBOX_FB_TYPE_SHM:
                ret = raw_close_shm(buffer);
                break;
-       case BUFFER_TYPE_FILE:
+       case DBOX_FB_TYPE_FILE:
                ret = raw_close_file(buffer);
                break;
-       case BUFFER_TYPE_PIXMAP:
+       case DBOX_FB_TYPE_PIXMAP:
                ret = raw_close_pixmap(buffer);
                break;
        default:
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                break;
        }
 
@@ -1631,41 +1533,41 @@ EAPI int buffer_handler_raw_close(struct buffer *buffer)
 EAPI int buffer_handler_lock(struct buffer_info *info)
 {
        if (!info) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       if (info->type == BUFFER_TYPE_PIXMAP) {
-               return LB_STATUS_SUCCESS;
+       if (info->type == DBOX_FB_TYPE_PIXMAP) {
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       if (info->type == BUFFER_TYPE_FILE) {
-               return LB_STATUS_SUCCESS;
+       if (info->type == DBOX_FB_TYPE_FILE) {
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       return do_buffer_lock(info);
+       return dynamicbox_service_acquire_lock(info->lock_info);
 }
 
 EAPI int buffer_handler_unlock(struct buffer_info *info)
 {
        if (!info) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       if (info->type == BUFFER_TYPE_PIXMAP) {
-               return LB_STATUS_SUCCESS;
+       if (info->type == DBOX_FB_TYPE_PIXMAP) {
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       if (info->type == BUFFER_TYPE_FILE) {
-               return LB_STATUS_SUCCESS;
+       if (info->type == DBOX_FB_TYPE_FILE) {
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       return do_buffer_unlock(info);
+       return dynamicbox_service_release_lock(info->lock_info);
 }
 
 EAPI int buffer_handler_pixels(struct buffer_info *info)
 {
        if (!info) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        return info->pixel_size;
@@ -1673,34 +1575,34 @@ EAPI int buffer_handler_pixels(struct buffer_info *info)
 
 EAPI int buffer_handler_auto_align(void)
 {
-       return AUTO_ALIGN;
+       return DYNAMICBOX_CONF_AUTO_ALIGN;
 }
 
 EAPI int buffer_handler_stride(struct buffer_info *info)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        struct gem_data *gem;
        int stride;
 
        if (!info) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (info->type) {
-       case BUFFER_TYPE_FILE:
-       case BUFFER_TYPE_SHM:
+       case DBOX_FB_TYPE_FILE:
+       case DBOX_FB_TYPE_SHM:
                stride = info->w * info->pixel_size;
                break;
-       case BUFFER_TYPE_PIXMAP:
+       case DBOX_FB_TYPE_PIXMAP:
                buffer = info->buffer;
                if (!buffer) {
-                       stride = LB_STATUS_ERROR_INVALID;
+                       stride = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                        break;
                }
 
                gem = (struct gem_data *)buffer->data;
                if (!gem) {
-                       stride = LB_STATUS_ERROR_INVALID;
+                       stride = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                        break;
                }
 
@@ -1709,14 +1611,14 @@ EAPI int buffer_handler_stride(struct buffer_info *info)
                         * Uhm...
                         */
                        ErrPrint("dri2_buffer info is not ready yet!\n");
-                       stride = LB_STATUS_ERROR_INVALID;
+                       stride = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                        break;
                }
 
                stride = gem->dri2_buffer->pitch;
                break;
        default:
-               stride = LB_STATUS_ERROR_INVALID;
+               stride = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                break;
        }
 
@@ -1733,11 +1635,11 @@ HAPI int buffer_handler_set_data(struct buffer_info *info, void *data)
 {
        if (!info) {
                ErrPrint("Invalid handle\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        info->data = data;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void *buffer_handler_data(struct buffer_info *info)
@@ -1753,11 +1655,11 @@ HAPI void *buffer_handler_data(struct buffer_info *info)
 HAPI int buffer_handler_destroy(struct buffer_info *info)
 {
        Eina_List *l;
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
 
        if (!info) {
                DbgPrint("Buffer is not created yet. info is NIL\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        EINA_LIST_FOREACH(s_info.pixmap_list, l, buffer) {
@@ -1769,10 +1671,10 @@ HAPI int buffer_handler_destroy(struct buffer_info *info)
        buffer_handler_unload(info);
        DbgFree(info->id);
        DbgFree(info);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buffer_type type, int w, int h, int pixel_size)
+HAPI struct buffer_info *buffer_handler_create(struct inst_info *inst, enum dynamicbox_fb_type type, int w, int h, int pixel_size)
 {
        struct buffer_info *info;
 
@@ -1783,10 +1685,10 @@ HAPI struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buff
        }
 
        switch (type) {
-       case BUFFER_TYPE_SHM:
-               if (pixel_size != DEFAULT_PIXELS) {
-                       DbgPrint("SHM only supportes %d bytes pixels (requested: %d)\n", DEFAULT_PIXELS, pixel_size);
-                       pixel_size = DEFAULT_PIXELS;
+       case DBOX_FB_TYPE_SHM:
+               if (pixel_size != DYNAMICBOX_CONF_DEFAULT_PIXELS) {
+                       DbgPrint("SHM only supportes %d bytes pixels (requested: %d)\n", DYNAMICBOX_CONF_DEFAULT_PIXELS, pixel_size);
+                       pixel_size = DYNAMICBOX_CONF_DEFAULT_PIXELS;
                }
 
                info->id = strdup(SCHEMA_SHM "-1");
@@ -1796,10 +1698,10 @@ HAPI struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buff
                        return NULL;
                }
                break;
-       case BUFFER_TYPE_FILE:
-               if (pixel_size != DEFAULT_PIXELS) {
-                       DbgPrint("FILE only supportes %d bytes pixels (requested: %d)\n", DEFAULT_PIXELS, pixel_size);
-                       pixel_size = DEFAULT_PIXELS;
+       case DBOX_FB_TYPE_FILE:
+               if (pixel_size != DYNAMICBOX_CONF_DEFAULT_PIXELS) {
+                       DbgPrint("FILE only supportes %d bytes pixels (requested: %d)\n", DYNAMICBOX_CONF_DEFAULT_PIXELS, pixel_size);
+                       pixel_size = DYNAMICBOX_CONF_DEFAULT_PIXELS;
                }
 
                info->id = strdup(SCHEMA_FILE "/tmp/.live.undefined");
@@ -1809,7 +1711,7 @@ HAPI struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buff
                        return NULL;
                }
                break;
-       case BUFFER_TYPE_PIXMAP:
+       case DBOX_FB_TYPE_PIXMAP:
                info->id = strdup(SCHEMA_PIXMAP "0:0");
                if (!info->id) {
                        ErrPrint("Heap: %s\n", strerror(errno));
@@ -1823,8 +1725,7 @@ HAPI struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buff
                return NULL;
        }
 
-       info->lock = NULL;
-       info->lock_fd = -1;
+       info->lock_info = NULL;
        info->w = w;
        info->h = h;
        info->pixel_size = pixel_size;
index 158f844..8530dd5 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <dlog.h>
 #include <packet.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 
 #include "debug.h"
 #include "conf.h"
@@ -75,11 +75,11 @@ struct buffer_info
 static int destroy_lock_file(struct buffer_info *info)
 {
        if (!info->inst) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!info->lock) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (close(info->lock_fd) < 0) {
@@ -93,7 +93,7 @@ static int destroy_lock_file(struct buffer_info *info)
 
        DbgFree(info->lock);
        info->lock = NULL;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int create_lock_file(struct buffer_info *info)
@@ -104,22 +104,22 @@ static int create_lock_file(struct buffer_info *info)
        char target[3] = "pd";
 
        if (!info->inst) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        id = instance_id(info->inst);
        if (!id) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        len = strlen(id);
        file = malloc(len + 20);
        if (!file) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       if (script_handler_buffer_info(instance_pd_script(info->inst)) != info && instance_pd_buffer(info->inst) != info) {
+       if (script_handler_buffer_info(instance_gbar_script(info->inst)) != info && instance_gbar_buffer(info->inst) != info) {
                target[0] = 'l';
                target[1] = 'b';
                /* target[2] = '\0'; // We already have this ;) */
@@ -130,11 +130,11 @@ static int create_lock_file(struct buffer_info *info)
        if (info->lock_fd < 0) {
                ErrPrint("open: %s\n", strerror(errno));
                DbgFree(file);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        info->lock = file;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int do_buffer_lock(struct buffer_info *buffer)
@@ -143,7 +143,7 @@ static int do_buffer_lock(struct buffer_info *buffer)
        int ret;
 
        if (buffer->lock_fd < 0) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        flock.l_type = F_WRLCK;
@@ -160,7 +160,7 @@ static int do_buffer_lock(struct buffer_info *buffer)
                }
        } while (ret == EINTR);
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int do_buffer_unlock(struct buffer_info *buffer)
@@ -169,7 +169,7 @@ static int do_buffer_unlock(struct buffer_info *buffer)
        int ret;
 
        if (buffer->lock_fd < 0) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        flock.l_type = F_UNLCK;
@@ -186,7 +186,7 @@ static int do_buffer_unlock(struct buffer_info *buffer)
                }
        } while (ret == EINTR);
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int load_file_buffer(struct buffer_info *info)
@@ -201,7 +201,7 @@ static inline int load_file_buffer(struct buffer_info *info)
        new_id = malloc(len);
        if (!new_id) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        timestamp = util_timestamp();
@@ -211,14 +211,14 @@ static inline int load_file_buffer(struct buffer_info *info)
        if (!size) {
                ErrPrint("Canvas buffer size is ZERO\n");
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        buffer = calloc(1, size);
        if (!buffer) {
                ErrPrint("Failed to allocate buffer\n");
                DbgFree(new_id);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        buffer->type = BUFFER_TYPE_FILE;
@@ -232,7 +232,7 @@ static inline int load_file_buffer(struct buffer_info *info)
        info->is_loaded = 1;
 
        DbgPrint("FILE type %d created\n", size);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int load_shm_buffer(struct buffer_info *info)
@@ -246,13 +246,13 @@ static inline int load_shm_buffer(struct buffer_info *info)
        size = info->w * info->h * info->pixel_size;
        if (!size) {
                ErrPrint("Invalid buffer size\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        id = shmget(IPC_PRIVATE, size + sizeof(*buffer), IPC_CREAT | 0666);
        if (id < 0) {
                ErrPrint("shmget: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        buffer = shmat(id, NULL, 0);
@@ -263,7 +263,7 @@ static inline int load_shm_buffer(struct buffer_info *info)
                        ErrPrint("%s shmctl: %s\n", info->id, strerror(errno));
                }
 
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        buffer->type = BUFFER_TYPE_SHM;
@@ -284,7 +284,7 @@ static inline int load_shm_buffer(struct buffer_info *info)
                        ErrPrint("shmctl: %s\n", strerror(errno));
                }
 
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        snprintf(new_id, len, SCHEMA_SHM "%d", id);
@@ -293,7 +293,7 @@ static inline int load_shm_buffer(struct buffer_info *info)
        info->id = new_id;
        info->buffer = buffer;
        info->is_loaded = 1;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_load(struct buffer_info *info)
@@ -302,12 +302,12 @@ EAPI int buffer_handler_load(struct buffer_info *info)
 
        if (!info) {
                ErrPrint("buffer handler is nil\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (info->is_loaded) {
                DbgPrint("Buffer is already loaded\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        switch (info->type) {
@@ -322,7 +322,7 @@ EAPI int buffer_handler_load(struct buffer_info *info)
        case BUFFER_TYPE_PIXMAP:
        default:
                ErrPrint("Invalid buffer\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                break;
        }
 
@@ -337,7 +337,7 @@ static inline int unload_file_buffer(struct buffer_info *info)
        new_id = strdup(SCHEMA_FILE "/tmp/.live.undefined");
        if (!new_id) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        DbgFree(info->buffer);
@@ -350,7 +350,7 @@ static inline int unload_file_buffer(struct buffer_info *info)
 
        DbgFree(info->id);
        info->id = new_id;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int unload_shm_buffer(struct buffer_info *info)
@@ -361,19 +361,19 @@ static inline int unload_shm_buffer(struct buffer_info *info)
        new_id = strdup(SCHEMA_SHM "-1");
        if (!new_id) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        if (sscanf(info->id, SCHEMA_SHM "%d", &id) != 1) {
                ErrPrint("%s Invalid ID\n", info->id);
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (id < 0) {
                ErrPrint("(%s) Invalid id: %d\n", info->id, id);
                DbgFree(new_id);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (shmdt(info->buffer) < 0) {
@@ -388,7 +388,7 @@ static inline int unload_shm_buffer(struct buffer_info *info)
 
        DbgFree(info->id);
        info->id = new_id;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_unload(struct buffer_info *info)
@@ -397,12 +397,12 @@ EAPI int buffer_handler_unload(struct buffer_info *info)
 
        if (!info) {
                ErrPrint("buffer handler is NIL\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!info->is_loaded) {
                ErrPrint("Buffer is not loaded\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (info->type) {
@@ -417,7 +417,7 @@ EAPI int buffer_handler_unload(struct buffer_info *info)
        case BUFFER_TYPE_PIXMAP:
        default:
                ErrPrint("Invalid buffer\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                break;
        }
 
@@ -488,7 +488,7 @@ EAPI void *buffer_handler_pixmap_find(int pixmap)
 
 EAPI int buffer_handler_pixmap_release_buffer(void *canvas)
 {
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 /*!
@@ -499,7 +499,7 @@ EAPI int buffer_handler_pixmap_release_buffer(void *canvas)
  */
 EAPI int buffer_handler_pixmap_unref(void *buffer_ptr)
 {
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_is_loaded(const struct buffer_info *info)
@@ -523,19 +523,19 @@ EAPI int buffer_handler_resize(struct buffer_info *info, int w, int h)
 
        if (!info) {
                ErrPrint("Invalid handler\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (info->w == w && info->h == h) {
                DbgPrint("No changes\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        buffer_handler_update_size(info, w, h);
 
        if (!info->is_loaded) {
                DbgPrint("Buffer size is updated[%dx%d]\n", w, h);
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        ret = buffer_handler_unload(info);
@@ -548,13 +548,13 @@ EAPI int buffer_handler_resize(struct buffer_info *info, int w, int h)
                ErrPrint("Load: %d\n", ret);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI int buffer_handler_get_size(struct buffer_info *info, int *w, int *h)
 {
        if (!info) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (w) {
@@ -564,7 +564,7 @@ EAPI int buffer_handler_get_size(struct buffer_info *info, int *w, int *h)
                *h = info->h;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 EAPI struct inst_info *buffer_handler_instance(struct buffer_info *info)
@@ -619,10 +619,10 @@ HAPI int buffer_handler_init(void)
         */
        if (USE_SW_BACKEND) {
                DbgPrint("Fallback to the S/W Backend\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int buffer_handler_fini(void)
@@ -631,7 +631,7 @@ HAPI int buffer_handler_fini(void)
         * \TODO
         * Implement this for wayland
         */
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline struct buffer *raw_open_file(const char *filename)
@@ -746,7 +746,7 @@ EAPI void *buffer_handler_raw_data(struct buffer *buffer)
 EAPI int buffer_handler_raw_size(struct buffer *buffer)
 {
        if (!buffer || buffer->state != CREATED) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        return (int)buffer->info;
@@ -785,7 +785,7 @@ EAPI int buffer_handler_raw_close(struct buffer *buffer)
                break;
        case BUFFER_TYPE_PIXMAP:
        default:
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                break;
        }
 
@@ -795,11 +795,11 @@ EAPI int buffer_handler_raw_close(struct buffer *buffer)
 EAPI int buffer_handler_lock(struct buffer_info *buffer)
 {
        if (buffer->type == BUFFER_TYPE_PIXMAP) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (buffer->type == BUFFER_TYPE_FILE) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        return do_buffer_lock(buffer);
@@ -808,11 +808,11 @@ EAPI int buffer_handler_lock(struct buffer_info *buffer)
 EAPI int buffer_handler_unlock(struct buffer_info *buffer)
 {
        if (buffer->type == BUFFER_TYPE_PIXMAP) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (buffer->type == BUFFER_TYPE_FILE) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        return do_buffer_unlock(buffer);
@@ -828,11 +828,11 @@ HAPI int buffer_handler_set_data(struct buffer_info *buffer, void *data)
 {
        if (!buffer) {
                ErrPrint("Invalid handle\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        buffer->data = data;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void *buffer_handler_data(struct buffer_info *buffer)
@@ -852,13 +852,13 @@ HAPI int buffer_handler_destroy(struct buffer_info *info)
 
        if (!info) {
                DbgPrint("Buffer is not created yet. info is NIL\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        buffer_handler_unload(info);
        DbgFree(info->id);
        DbgFree(info);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buffer_type type, int w, int h, int pixel_size, int auto_align)
index e6d1ed6..edb5048 100644 (file)
@@ -27,7 +27,8 @@
 
 #include <dlog.h>
 #include <packet.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_service.h>
 
 #include "client_life.h"
 #include "instance.h"
@@ -486,13 +487,13 @@ HAPI int client_event_callback_add(struct client_node *client, enum client_event
 
        if (!cb) {
                ErrPrint("Invalid callback (cb == NULL)\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        item = malloc(sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->cb = cb;
@@ -526,10 +527,10 @@ HAPI int client_event_callback_add(struct client_node *client, enum client_event
                break;
        default:
                DbgFree(item);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int client_event_callback_del(struct client_node *client, enum client_event event, int (*cb)(struct client_node *, void *), void *data)
@@ -540,7 +541,7 @@ HAPI int client_event_callback_del(struct client_node *client, enum client_event
 
        if (!cb) {
                ErrPrint("Invalid callback (cb == NULL)\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (event) {
@@ -553,7 +554,7 @@ HAPI int client_event_callback_del(struct client_node *client, enum client_event
                                        client->event_deactivate_list = eina_list_remove(client->event_deactivate_list, item);
                                        DbgFree(item);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -567,7 +568,7 @@ HAPI int client_event_callback_del(struct client_node *client, enum client_event
                                        client->event_activate_list = eina_list_remove(client->event_activate_list, item);
                                        DbgFree(item);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -577,7 +578,7 @@ HAPI int client_event_callback_del(struct client_node *client, enum client_event
                break;
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI int client_set_data(struct client_node *client, const char *tag, void *data)
@@ -587,20 +588,20 @@ HAPI int client_set_data(struct client_node *client, const char *tag, void *data
        item = calloc(1, sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->tag = strdup(tag);
        if (!item->tag) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(item);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->data = data;
 
        client->data_list = eina_list_append(client->data_list, item);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void *client_data(struct client_node *client, const char *tag)
@@ -659,7 +660,7 @@ HAPI void client_resumed(struct client_node *client)
 
 HAPI int client_init(void)
 {
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void client_fini(void)
@@ -689,7 +690,7 @@ HAPI int client_global_event_handler_add(enum client_global_event event_type, in
        handler = malloc(sizeof(*handler));
        if (!handler) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        handler->cbdata = data;
@@ -705,10 +706,10 @@ HAPI int client_global_event_handler_add(enum client_global_event event_type, in
                break;
        default:
                DbgFree(handler);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int client_global_event_handler_del(enum client_global_event event_type, int (*cb)(struct client_node *, void *), void *data)
@@ -727,7 +728,7 @@ HAPI int client_global_event_handler_del(enum client_global_event event_type, in
                                        s_info.create_event_list = eina_list_remove(s_info.create_event_list, item);
                                        DbgFree(item);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -740,7 +741,7 @@ HAPI int client_global_event_handler_del(enum client_global_event event_type, in
                                        s_info.destroy_event_list = eina_list_remove(s_info.destroy_event_list, item);
                                        DbgFree(item);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -748,7 +749,7 @@ HAPI int client_global_event_handler_del(enum client_global_event event_type, in
                break;
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI int client_subscribe(struct client_node *client, const char *cluster, const char *category)
@@ -758,14 +759,14 @@ HAPI int client_subscribe(struct client_node *client, const char *cluster, const
        item = malloc(sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->cluster = strdup(cluster);
        if (!item->cluster) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(item);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->category = strdup(category);
@@ -773,11 +774,11 @@ HAPI int client_subscribe(struct client_node *client, const char *cluster, const
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(item->cluster);
                DbgFree(item);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        client->subscribe_list = eina_list_append(client->subscribe_list, item);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int client_unsubscribe(struct client_node *client, const char *cluster, const char *category)
@@ -792,11 +793,11 @@ HAPI int client_unsubscribe(struct client_node *client, const char *cluster, con
                        DbgFree(item->cluster);
                        DbgFree(item->category);
                        DbgFree(item);
-                       return LB_STATUS_SUCCESS;
+                       return DBOX_STATUS_ERROR_NONE;
                }
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI int client_is_subscribed(struct client_node *client, const char *cluster, const char *category)
@@ -832,7 +833,7 @@ HAPI int client_browse_list(const char *cluster, const char *category, int (*cb)
        int cnt;
 
        if (!cb || !cluster || !category) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        cnt = 0;
@@ -842,7 +843,7 @@ HAPI int client_browse_list(const char *cluster, const char *category, int (*cb)
                }
 
                if (cb(client, data) < 0) {
-                       return LB_STATUS_ERROR_CANCEL;
+                       return DBOX_STATUS_ERROR_CANCEL;
                }
 
                cnt++;
@@ -882,7 +883,7 @@ HAPI int client_broadcast(struct inst_info *inst, struct packet *packet)
        }
 
        packet_unref(packet);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI const char *client_direct_addr(const struct client_node *client)
index a9b00f4..fb9c99f 100644 (file)
@@ -23,7 +23,9 @@
 #include <dlog.h>
 #include <com-core_packet.h>
 #include <packet.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_conf.h>
+#include <dynamicbox_service.h>
 
 #include "client_life.h"
 #include "instance.h"
@@ -151,7 +153,7 @@ static inline void push_command(struct command *command)
                return;
        }
 
-       s_info.command_consumer = ecore_timer_add(PACKET_TIME, command_consumer_cb, NULL);
+       s_info.command_consumer = ecore_timer_add(DYNAMICBOX_CONF_PACKET_TIME, command_consumer_cb, NULL);
        if (!s_info.command_consumer) {
                ErrPrint("Failed to add command consumer\n");
                s_info.command_list = eina_list_remove(s_info.command_list, command);
@@ -165,13 +167,13 @@ HAPI int client_rpc_async_request(struct client_node *client, struct packet *pac
        struct client_rpc *rpc;
 
        if (!client || !packet) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (client_is_faulted(client)) {
                ErrPrint("Client[%p] is faulted\n", client);
                packet_unref(packet);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        rpc = client_data(client, RPC_TAG);
@@ -182,12 +184,12 @@ HAPI int client_rpc_async_request(struct client_node *client, struct packet *pac
        command = create_command(client, packet);
        if (!command) {
                packet_unref(packet);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        push_command(command);
        packet_unref(packet);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int deactivated_cb(struct client_node *client, void *data)
@@ -200,7 +202,7 @@ static int deactivated_cb(struct client_node *client, void *data)
        rpc = client_data(client, RPC_TAG);
        if (!rpc) {
                ErrPrint("client is not valid\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        DbgPrint("Reset handle for %d\n", client_pid(client));
@@ -215,7 +217,7 @@ static int deactivated_cb(struct client_node *client, void *data)
        }
        DbgPrint("End: Destroying command\n");
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int client_rpc_init(struct client_node *client, int handle)
@@ -226,7 +228,7 @@ HAPI int client_rpc_init(struct client_node *client, int handle)
        rpc = calloc(1, sizeof(*rpc));
        if (!rpc) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        ret = client_set_data(client, RPC_TAG, rpc);
@@ -259,12 +261,12 @@ HAPI int client_rpc_fini(struct client_node *client)
 
        rpc = client_del_data(client, RPC_TAG);
        if (!rpc) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        client_event_callback_del(client, CLIENT_EVENT_DEACTIVATE, deactivated_cb, NULL);
        DbgFree(rpc);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int client_rpc_handle(struct client_node *client)
@@ -274,7 +276,7 @@ HAPI int client_rpc_handle(struct client_node *client)
        rpc = client_data(client, RPC_TAG);
        if (!rpc) {
                DbgPrint("Client has no RPC\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        return rpc->handle;
index c9f42f1..8f52983 100644 (file)
-/*
- * 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.
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h> // access
-
-#include <dlog.h>
-#if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
-#else
-#include "lite-errno.h"
-#endif
-#include <Eina.h>
-
 #include "conf.h"
-#include "util.h"
-#include "debug.h"
-
-static const char *CONF_DEFAULT_SERVICES = "[livebox],[shortcut],[notification],[badge],[utility],[file]";
-static const char *CONF_DEFAULT_EMERGENCY_DISK = "source=tmpfs;type=tmpfs;option=size=6M";
-static const char *CONF_DEFAULT_PATH_CONF = "/opt/usr/live/%s/etc/%s.conf";
-static const char *CONF_DEFAULT_PATH_IMAGE = "/opt/usr/share/live_magazine/";
-static const char *CONF_DEFAULT_PATH_LOG = "/opt/usr/share/live_magazine/log";
-static const char *CONF_DEFAULT_PATH_READER = "/opt/usr/share/live_magazine/reader";
-static const char *CONF_DEFAULT_PATH_ALWAYS = "/opt/usr/share/live_magazine/always";
-static const char *CONF_DEFAULT_PATH_SCRIPT = "/opt/usr/live/%s/res/script/%s.edj";
-static const char *CONF_DEFAULT_PATH_ROOT = "/opt/usr/live/";
-static const char *CONF_DEFAULT_PATH_SCRIPT_PORT = "/usr/share/data-provider-master/plugin-script/";
-static const char *CONF_DEFAULT_PATH_DB = "/opt/dbspace/.livebox.db";
-static const char *CONF_DEFAULT_PATH_INPUT = "/dev/input/event2";
-static const char *CONF_DEFAULT_SCRIPT_TYPE = "edje";
-static const char *CONF_DEFAULT_ABI = "c";
-static const char *CONF_DEFAULT_PD_GROUP = "disclosure";
-static const char *CONF_DEFAULT_LAUNCH_BUNDLE_NAME = "name";
-static const char *CONF_DEFAULT_LAUNCH_BUNDLE_SECURED = "secured";
-static const char *CONF_DEFAULT_LAUNCH_BUNDLE_ABI = "abi";
-static const char *CONF_DEFAULT_CONTENT = "default";
-static const char *CONF_DEFAULT_TITLE = "";
-static const char *CONF_DEFAULT_EMPTY_CONTENT = "";
-static const char *CONF_DEFAULT_EMPTY_TITLE = "";
-static const char *CONF_DEFAULT_REPLACE_TAG = "/APPID/";
-static const char *CONF_DEFAULT_PROVIDER_METHOD = "pixmap";
-static const int CONF_DEFAULT_WIDTH = 0;
-static const int CONF_DEFAULT_HEIGHT = 0;
-static const int CONF_DEFAULT_BASE_WIDTH = 720;
-static const int CONF_DEFAULT_BASE_HEIGHT = 1280;
-static const double CONF_DEFAULT_MINIMUM_PERIOD = 1.0f;
-static const double CONF_DEFAULT_PERIOD = -1.0f;
-static const double CONF_DEFAULT_PACKET_TIME = 0.0001f;
-static const unsigned long CONF_DEFAULT_MINIMUM_SPACE = 5242880;
-static const double CONF_DEFAULT_SLAVE_TTL = 30.0f;
-static const double CONF_DEFAULT_SLAVE_ACTIVATE_TIME = 30.0f;
-static const double CONF_DEFAULT_SLAVE_RELAUNCH_TIME = 3.0f;
-static const int CONF_DEFAULT_SLAVE_RELAUNCH_COUNT = 3;
-static const int CONF_DEFAULT_MAX_LOG_LINE = 1000;
-static const int CONF_DEFAULT_MAX_LOG_FILE = 3;
-static const int CONF_DEFAULT_SQLITE_FLUSH_MAX = 1048576;
-static const double CONF_DEFAULT_PING_TIME = 240.0f;
-static const int CONF_DEFAULT_SLAVE_MAX_LOAD = 30;
-static const int CONF_DEFAULT_USE_SW_BACKEND = 0;
-static const int CONF_DEFAULT_DEBUG_MODE = 0;
-static const int CONF_DEFAULT_OVERWRITE_CONTENT = 0;
-static const int CONF_DEFAULT_COM_CORE_THREAD = 1;
-static const int CONF_DEFAULT_USE_XMONITOR = 0;
-static const int CONF_DEFAULT_PREMULTIPLIED = 1;
-static const double CONF_DEFAULT_SCALE_WIDTH_FACTOR = 1.0f;
-static const double CONF_DEFAULT_SCALE_HEIGHT_FACTOR = 1.0f;
-static const double CONF_DEFAULT_PD_REQUEST_TIMEOUT = 5.0f;
-static const int CONF_DEFAULT_PIXELS = sizeof(int);
-static const int CONF_DEFAULT_AUTO_ALIGN = 1;
-static const int CONF_DEFAULT_USE_EVENT_TIME = 1;
-static const int CONF_DEFAULT_CHECK_LCD = 1;
-
-#define CONF_PATH_FORMAT "/usr/share/data-provider-master/%dx%d/conf.ini"
-
-int errno;
-
-HAPI struct conf g_conf;
-
-HAPI void conf_update_size(void)
-{
-       util_screen_size_get(&g_conf.width, &g_conf.height);
-
-       g_conf.scale_width_factor = (double)g_conf.width / (double)BASE_W;
-       g_conf.scale_height_factor = (double)g_conf.height / (double)BASE_H;
-}
-
-static void use_xmonitor(char *buffer)
-{
-       g_conf.use_xmonitor = !strcasecmp(buffer, "true");
-}
-
-static void emergency_disk_handler(char *buffer)
-{
-       g_conf.emergency_disk = strdup(buffer);
-       if (!g_conf.emergency_disk) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void check_lcd_handler(char *buffer)
-{
-       g_conf.check_lcd = !strcasecmp(buffer, "true");
-}
-
-static void use_event_time_handler(char *buffer)
-{
-       g_conf.use_event_time = !strcasecmp(buffer, "true");
-}
-
-static void auto_align_handler(char *buffer)
-{
-       g_conf.auto_align = !strcasecmp(buffer, "true");
-}
-
-static void services_handler(char *buffer)
-{
-       g_conf.services = strdup(buffer);
-       if (!g_conf.services) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void use_sw_backend_handler(char *buffer)
-{
-       g_conf.use_sw_backend = !strcasecmp(buffer, "true");
-}
-
-static void provider_method_handler(char *buffer)
-{
-       g_conf.provider_method = strdup(buffer);
-       if (!g_conf.provider_method) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void debug_mode_handler(char *buffer)
-{
-       g_conf.debug_mode = !strcasecmp(buffer, "true");
-}
-
-static void overwrite_content_handler(char *buffer)
-{
-       g_conf.overwrite_content = !strcasecmp(buffer, "true");
-}
-
-static void com_core_thread_handler(char *buffer)
-{
-       g_conf.com_core_thread = !strcasecmp(buffer, "true");
-}
-
-static void base_width_handler(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.base_width) != 1) {
-               if (!strncasecmp(buffer, "screen", strlen("screen"))) {
-                       int h;
-
-                       util_screen_size_get(&g_conf.base_width, &h);
-                       DbgPrint("Base width: %d\n", g_conf.base_width);
-               } else {
-                       ErrPrint("Failed to parse the base_width\n");
-               }
-       }
-}
-
-static void base_height_handler(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.base_height) != 1) {
-               if (!strncasecmp(buffer, "screen", strlen("screen"))) {
-                       int w;
-                       util_screen_size_get(&w, &g_conf.base_height);
-               } else {
-                       ErrPrint("Failed to parse the base_height\n");
-               }
-       }
-}
-
-static void minimum_period_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.minimum_period) != 1) {
-               ErrPrint("Failed to parse the minimum_period\n");
-       }
-       DbgPrint("Minimum period: %lf\n", g_conf.minimum_period);
-}
-
-static void pixels_handler(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.default_conf.pixels) != 1) {
-               ErrPrint("Failed to parse the minimum_period\n");
-       }
-       DbgPrint("Default pixels: %lf\n", g_conf.default_conf.pixels);
-}
-
-static void script_handler(char *buffer)
-{
-       g_conf.default_conf.script = strdup(buffer);
-       if (!g_conf.default_conf.script) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void default_abi_handler(char *buffer)
-{
-       g_conf.default_conf.abi = strdup(buffer);
-       if (!g_conf.default_conf.abi) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void default_group_handler(char *buffer)
-{
-       g_conf.default_conf.pd_group = strdup(buffer);
-       if (!g_conf.default_conf.pd_group) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void default_period_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.default_conf.period) != 1) {
-               ErrPrint("Failed to parse the default_period\n");
-       }
-       DbgPrint("Default Period: %lf\n", g_conf.default_conf.period);
-}
-
-static void default_packet_time_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.default_packet_time) != 1) {
-               ErrPrint("Failed to parse the default_packet_time\n");
-       }
-       DbgPrint("Default packet time: %lf\n", g_conf.default_packet_time);
-}
-
-static void default_content_handler(char *buffer)
-{
-       g_conf.default_content = strdup(buffer);
-       if (!g_conf.default_content) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void default_title_handler(char *buffer)
-{
-       g_conf.default_title = strdup(buffer);
-       if (!g_conf.default_title) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void minimum_space_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lu", &g_conf.minimum_space) != 1) {
-               ErrPrint("Failed to parse the minimum_space\n");
-       }
-}
-
-static void replace_tag_handler(char *buffer)
-{
-       g_conf.replace_tag = strdup(buffer);
-       if (!g_conf.replace_tag) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void slave_ttl_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.slave_ttl) != 1) {
-               ErrPrint("Failed to parse the slave_ttl\n");
-       }
-       DbgPrint("Slave TTL: %lf\n", g_conf.slave_ttl);
-}
-
-static void slave_activate_time_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.slave_activate_time) != 1) {
-               ErrPrint("Failed to parse the slave_activate_time\n");
-       }
-       DbgPrint("Slave activate time: %lf\n", g_conf.slave_activate_time);
-}
-
-static void slave_relaunch_time_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.slave_relaunch_time) != 1) {
-               ErrPrint("Failed to parse the slave_activate_time\n");
-       }
-       DbgPrint("Slave relaunch time: %lf\n", g_conf.slave_relaunch_time);
-}
-
-static void slave_relaunch_count_handler(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.slave_relaunch_count) != 1) {
-               ErrPrint("Failed to parse the max_log_line\n");
-       }
-}
-
-static void max_log_line_handler(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.max_log_line) != 1) {
-               ErrPrint("Failed to parse the max_log_line\n");
-       }
-}
-
-static void max_log_file_handler(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.max_log_file) != 1) {
-               ErrPrint("Failed to parse the max_log_file\n");
-       }
-}
-
-static void sqlite_flush_max_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lu", &g_conf.sqlite_flush_max) != 1) {
-               ErrPrint("Failed to parse the sqlite_flush_max\n");
-       }
-}
-
-static void db_path_handler(char *buffer)
-{
-       g_conf.path.db = strdup(buffer);
-       if (!g_conf.path.db) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void reader_path_handler(char *buffer)
-{
-       g_conf.path.reader = strdup(buffer);
-       if (!g_conf.path.reader) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void always_path_handler(char *buffer)
-{
-       g_conf.path.always = strdup(buffer);
-       if (!g_conf.path.always) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void log_path_handler(char *buffer)
-{
-       g_conf.path.slave_log = strdup(buffer);
-       if (!g_conf.path.slave_log) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void script_port_path_handler(char *buffer)
-{
-       g_conf.path.script_port = strdup(buffer);
-       if (!g_conf.path.script_port) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void share_path_handler(char *buffer)
-{
-       g_conf.path.image = strdup(buffer);
-       if (!g_conf.path.image) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void input_path_handler(char *buffer)
-{
-       g_conf.path.input = strdup(buffer);
-       if (!g_conf.path.input) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-       }
-}
-
-static void ping_time_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.ping_time) != 1) {
-               ErrPrint("Failed to parse the ping_time\n");
-       }
-       DbgPrint("Default ping time: %lf\n", g_conf.ping_time);
-}
-
-static void slave_max_loader(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.slave_max_load) != 1) {
-               ErrPrint("Failed to parse the slave_max_load\n");
-       }
-}
-
-static void premultiplied_handler(char *buffer)
-{
-       if (sscanf(buffer, "%d", &g_conf.premultiplied) != 1) {
-               ErrPrint("Failed to parse the premultiplied color\n");
-       }
-
-       DbgPrint("Premultiplied: %d\n", g_conf.premultiplied);
-}
-
-static void pd_request_timeout_handler(char *buffer)
-{
-       if (sscanf(buffer, "%lf", &g_conf.pd_request_timeout) != 1) {
-               ErrPrint("Failed to parse the request_timeout\n");
-       }
-       DbgPrint("Default PD request timeout: %lf\n", g_conf.pd_request_timeout);
-}
-
-HAPI void conf_init(void)
-{
-       g_conf.width = CONF_DEFAULT_WIDTH;
-       g_conf.height = CONF_DEFAULT_HEIGHT;
-       g_conf.base_width = CONF_DEFAULT_BASE_WIDTH;
-       g_conf.base_height = CONF_DEFAULT_BASE_HEIGHT;
-       g_conf.minimum_period = CONF_DEFAULT_MINIMUM_PERIOD;
-       g_conf.default_conf.period = CONF_DEFAULT_PERIOD;
-       g_conf.default_conf.pixels = CONF_DEFAULT_PIXELS;
-       g_conf.minimum_space = CONF_DEFAULT_MINIMUM_SPACE;
-       g_conf.default_packet_time = CONF_DEFAULT_PACKET_TIME;
-       g_conf.slave_ttl = CONF_DEFAULT_SLAVE_TTL;
-       g_conf.slave_activate_time = CONF_DEFAULT_SLAVE_ACTIVATE_TIME;
-       g_conf.slave_relaunch_time = CONF_DEFAULT_SLAVE_RELAUNCH_TIME;
-       g_conf.slave_relaunch_count = CONF_DEFAULT_SLAVE_RELAUNCH_COUNT;
-       g_conf.max_log_line = CONF_DEFAULT_MAX_LOG_LINE;
-       g_conf.max_log_file = CONF_DEFAULT_MAX_LOG_FILE;
-       g_conf.sqlite_flush_max = CONF_DEFAULT_SQLITE_FLUSH_MAX;
-       g_conf.ping_time = CONF_DEFAULT_PING_TIME;
-       g_conf.slave_max_load = CONF_DEFAULT_SLAVE_MAX_LOAD;
-       g_conf.use_sw_backend = CONF_DEFAULT_USE_SW_BACKEND;
-       g_conf.debug_mode = CONF_DEFAULT_DEBUG_MODE;
-       g_conf.overwrite_content = CONF_DEFAULT_OVERWRITE_CONTENT;
-       g_conf.com_core_thread = CONF_DEFAULT_COM_CORE_THREAD;
-       g_conf.use_xmonitor = CONF_DEFAULT_USE_XMONITOR;
-       g_conf.scale_width_factor = CONF_DEFAULT_SCALE_WIDTH_FACTOR;
-       g_conf.scale_height_factor = CONF_DEFAULT_SCALE_HEIGHT_FACTOR;
-       g_conf.pd_request_timeout = CONF_DEFAULT_PD_REQUEST_TIMEOUT;
-       g_conf.premultiplied = CONF_DEFAULT_PREMULTIPLIED;
-       g_conf.default_conf.script = (char *)CONF_DEFAULT_SCRIPT_TYPE;
-       g_conf.default_conf.abi = (char *)CONF_DEFAULT_ABI;
-       g_conf.default_conf.pd_group = (char *)CONF_DEFAULT_PD_GROUP;
-       g_conf.launch_key.name = (char *)CONF_DEFAULT_LAUNCH_BUNDLE_NAME;
-       g_conf.launch_key.secured = (char *)CONF_DEFAULT_LAUNCH_BUNDLE_SECURED;
-       g_conf.launch_key.abi = (char *)CONF_DEFAULT_LAUNCH_BUNDLE_ABI;
-       g_conf.empty_content = (char *)CONF_DEFAULT_EMPTY_CONTENT;
-       g_conf.empty_title = (char *)CONF_DEFAULT_EMPTY_TITLE;
-       g_conf.default_content = (char *)CONF_DEFAULT_CONTENT;
-       g_conf.default_title = (char *)CONF_DEFAULT_TITLE;
-       g_conf.replace_tag = (char *)CONF_DEFAULT_REPLACE_TAG;
-       g_conf.path.conf = (char *)CONF_DEFAULT_PATH_CONF;
-       g_conf.path.image = (char *)CONF_DEFAULT_PATH_IMAGE;
-       g_conf.path.slave_log = (char *)CONF_DEFAULT_PATH_LOG;
-       g_conf.path.reader = (char *)CONF_DEFAULT_PATH_READER;
-       g_conf.path.always = (char *)CONF_DEFAULT_PATH_ALWAYS;
-       g_conf.path.script = (char *)CONF_DEFAULT_PATH_SCRIPT;
-       g_conf.path.root = (char *)CONF_DEFAULT_PATH_ROOT;
-       g_conf.path.script_port = (char *)CONF_DEFAULT_PATH_SCRIPT_PORT;
-       g_conf.path.db = (char *)CONF_DEFAULT_PATH_DB;
-       g_conf.path.input = (char *)CONF_DEFAULT_PATH_INPUT;
-       g_conf.provider_method = (char *)CONF_DEFAULT_PROVIDER_METHOD;
-       g_conf.emergency_disk = (char *)CONF_DEFAULT_EMERGENCY_DISK;
-       g_conf.services = (char *)CONF_DEFAULT_SERVICES;
-       g_conf.auto_align = CONF_DEFAULT_AUTO_ALIGN;
-       g_conf.use_event_time = CONF_DEFAULT_USE_EVENT_TIME;
-       g_conf.check_lcd = CONF_DEFAULT_CHECK_LCD;
-}
-
-/*
- * Find proper configuration and install(link) it to conf path.
- */
-static char *conf_path(void)
-{
-       int w;
-       int h;
-       char *path;
-       int length;
-
-       if (util_screen_size_get(&w, &h) != LB_STATUS_SUCCESS) {
-               return NULL;
-       }
-
-       length = strlen(CONF_PATH_FORMAT) + 12; // 12 == RESERVED SPACE
-       path = calloc(1, length);
-       if (!path) {
-               ErrPrint("calloc: %s\n", strerror(errno));
-               return NULL;
-       }
-
-       snprintf(path, length, CONF_PATH_FORMAT, w, h);
-       DbgPrint("Selected conf file: %s\n", path);
-       if (access(path, F_OK) != 0) {
-               ErrPrint("Fallback to default, access: %s\n", strerror(errno));
-               strncpy(path, DEFAULT_MASTER_CONF, length);
-               if (access(path, F_OK) != 0) {
-                       ErrPrint("Serious error - there is no conf file, use default setting: %s\n", strerror(errno));
-                       DbgFree(path);
-                       path = NULL;
-               }
-       }
-
-       return path;
-}
-
-
-HAPI int conf_loader(void)
-{
-       char *conf_file;
-       FILE *fp;
-       int c;
-       enum state {
-               START,
-               SPACE,
-               TOKEN,
-               VALUE,
-               ERROR,
-               COMMENT,
-               END
-       } state;
-       int ch_idx;
-       int token_idx;
-       int buffer_idx;
-       int quote;
-       int linelen;
-       char buffer[256];
-       static const struct token_parser {
-               const char *name;
-               void (*handler)(char *buffer);
-       } token_handler[] = {
-               {
-                       .name = "base_width",
-                       .handler = base_width_handler,
-               },
-               {
-                       .name = "base_height",
-                       .handler = base_height_handler,
-               },
-               {
-                       .name = "minimum_period",
-                       .handler = minimum_period_handler,
-               },
-               {
-                       .name = "script",
-                       .handler = script_handler,
-               },
-               {
-                       .name = "pixels",
-                       .handler = pixels_handler,
-               },
-               {
-                       .name = "default_abi",
-                       .handler = default_abi_handler,
-               },
-               {
-                       .name = "default_group",
-                       .handler = default_group_handler,
-               },
-               {
-                       .name = "default_period",
-                       .handler = default_period_handler,
-               },
-               {
-                       .name = "default_packet_time",
-                       .handler = default_packet_time_handler,
-               },
-               {
-                       .name = "default_content",
-                       .handler = default_content_handler,
-               },
-               {
-                       .name = "default_title",
-                       .handler = default_title_handler,
-               },
-               {
-                       .name = "minimum_space",
-                       .handler = minimum_space_handler,
-               },
-               {
-                       .name = "replace_tag",
-                       .handler = replace_tag_handler,
-               },
-               {
-                       .name = "slave_ttl",
-                       .handler = slave_ttl_handler,
-               },
-               {
-                       .name = "slave_activate_time",
-                       .handler = slave_activate_time_handler,
-               },
-               {
-                       .name = "slave_relaunch_time",
-                       .handler = slave_relaunch_time_handler,
-               },
-               {
-                       .name = "slave_relaunch_count",
-                       .handler = slave_relaunch_count_handler,
-               },
-               {
-                       .name = "max_log_line",
-                       .handler = max_log_line_handler,
-               },
-               {
-                       .name = "max_log_file",
-                       .handler = max_log_file_handler,
-               },
-               {
-                       .name = "sqilte_flush_max",
-                       .handler = sqlite_flush_max_handler,
-               },
-               {
-                       .name = "db_path",
-                       .handler = db_path_handler,
-               },
-               {
-                       .name = "log_path",
-                       .handler = log_path_handler,
-               },
-               {
-                       .name = "reader_path",
-                       .handler = reader_path_handler,
-               },
-               {
-                       .name = "always_path",
-                       .handler = always_path_handler,
-               },
-               {
-                       .name = "share_path",
-                       .handler = share_path_handler,
-               },
-               {
-                       .name = "script_port_path",
-                       .handler = script_port_path_handler,
-               },
-               {
-                       .name = "ping_interval",
-                       .handler = ping_time_handler,
-               },
-               {
-                       .name = "slave_max_load",
-                       .handler = slave_max_loader,
-               },
-               {
-                       .name = "use_sw_backend",
-                       .handler = use_sw_backend_handler,
-               },
-               {
-                       .name = "emergency_disk",
-                       .handler = emergency_disk_handler,
-               },
-               {
-                       .name = "services",
-                       .handler = services_handler,
-               },
-               {
-                       .name = "auto_align",
-                       .handler = auto_align_handler,
-               },
-               {
-                       .name = "use_event_time",
-                       .handler = use_event_time_handler,
-               },
-               {
-                       .name = "check_lcd",
-                       .handler = check_lcd_handler,
-               },
-               {
-                       .name = "use_xmonitor",
-                       .handler = use_xmonitor,
-               },
-               {
-                       .name = "provider_method",
-                       .handler = provider_method_handler,
-               },
-               {
-                       .name = "debug_mode",
-                       .handler = debug_mode_handler,
-               },
-               {
-                       .name = "overwrite_content",
-                       .handler = overwrite_content_handler,
-               },
-               {
-                       .name = "com_core_thread",
-                       .handler = com_core_thread_handler,
-               },
-               {
-                       .name = "input",
-                       .handler = input_path_handler,
-               },
-               {
-                       .name = "pd_request_timeout",
-                       .handler = pd_request_timeout_handler,
-               },
-               {
-                       .name = "premultiplied",
-                       .handler = premultiplied_handler,
-               },
-               {
-                       .name = NULL,
-                       .handler = NULL,
-               },
-       };
-
-       conf_file = conf_path();
-       if (!conf_file) {
-               return LB_STATUS_ERROR_IO;
-       }
-
-       fp = fopen(conf_file, "rt");
-       DbgFree(conf_file);
-       if (!fp) {
-               ErrPrint("Error: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_IO;
-       }
-
-       state = START;
-       ch_idx = 0;
-       token_idx = -1;
-       buffer_idx = 0;
-       quote = 0;
-       linelen = 0;
-       do {
-               c = getc(fp);
-               if ((c == EOF) && (state == VALUE)) {
-                       DbgPrint("[%s:%d] VALUE state EOF\n", __func__, __LINE__);
-                       state = END;
-               }
-
-               switch (state) {
-               case COMMENT:
-                       if (c == CR || c == LF || c == EOF) {
-                               buffer[buffer_idx] = '\0';
-
-                               state = START;
-                               token_idx = -1;
-                               ch_idx = 0;
-                               buffer_idx = 0;
-                               linelen = -1; /* Will be ZERO by follwing increment code */
-                               quote = 0;
-                       } else {
-                               buffer[buffer_idx++] = c;
-                               if (buffer_idx == (sizeof(buffer) - 1)) {
-                                       buffer[buffer_idx] = '\0';
-                                       buffer_idx = 0;
-                               }
-                       }
-                       break;
-               case START:
-                       if (linelen == 0 && c == '#') {
-                               state = COMMENT;
-                       } else if (isspace(c)) {
-                               /* Ignore empty space */
-                       } else {
-                               state = TOKEN;
-                               ungetc(c, fp);
-                       }
-                       break;
-               case SPACE:
-                       if (c == '=') {
-                               state = VALUE;
-                       } else if (!isspace(c)) {
-                               state = ERROR;
-                       }
-                       break;
-               case VALUE:
-                       if (c == '"') {
-                               if (quote == 1) {
-                                       buffer[buffer_idx] = '\0';
-                                       state = END;
-                               } else if (buffer_idx != 0) {
-                                       buffer[buffer_idx++] = c;
-                                       if (buffer_idx >= sizeof(buffer)) {
-                                               state = ERROR;
-                                       }
-                               } else {
-                                       quote = 1;
-                               }
-                       } else if (isspace(c)) {
-                               if (buffer_idx == 0) {
-                                       /* Ignore */
-                               } else if (quote == 1) {
-                                       buffer[buffer_idx++] = c;
-                                       if (buffer_idx >= sizeof(buffer)) {
-                                               state = ERROR;
-                                       }
-                               } else {
-                                       buffer[buffer_idx] = '\0';
-                                       ungetc(c, fp);
-                                       state = END;
-                               }
-                       } else {
-                               buffer[buffer_idx++] = c;
-                               if (buffer_idx >= sizeof(buffer)) {
-                                       state = ERROR;
-                               }
-                       }
-                       break;
-               case TOKEN:
-                       if (c == '=') {
-                               if (token_idx < 0) {
-                                       state = ERROR;
-                               } else {
-                                       state = VALUE;
-                               }
-                       } else if (isspace(c)) {
-                               if (token_idx < 0) {
-                                       break;
-                               }
-
-                               if (token_handler[token_idx].name[ch_idx] != '\0') {
-                                       state = ERROR;
-                               } else {
-                                       state = SPACE;
-                               }
-                       } else  {
-                               if (token_idx < 0) {
-                                       /* Now start to find a token! */
-                                       token_idx = 0;
-                               }
-
-                               if (token_handler[token_idx].name[ch_idx] == c) {
-                                       ch_idx++;
-                               } else {
-                                       ungetc(c, fp);
-                                       while (ch_idx-- > 0)
-                                               ungetc(token_handler[token_idx].name[ch_idx], fp);
-
-                                       token_idx++;
-
-                                       if (token_handler[token_idx].name == NULL) {
-                                               state = ERROR;
-                                       } else {
-                                               ch_idx = 0;
-                                       }
-                               }
-                       }
-                       break;
-               case ERROR:
-                       if (c == CR || c == LF || c == EOF) {
-                               state = START;
-                               token_idx = -1;
-                               buffer_idx = 0;
-                               ch_idx = 0;
-                               linelen = -1;
-                               quote = 0;
-                       }
-                       break;
-               case END:
-                       if (c == LF || c == CR || c == EOF) {
-                               state = START;
-
-                               if (token_idx >= 0 && token_handler[token_idx].handler) {
-                                       buffer[buffer_idx] = '\0';
-                                       token_handler[token_idx].handler(buffer);
-                               }
-
-                               token_idx = -1;
-                               ch_idx = 0;
-                               buffer_idx = 0;
-                               linelen = -1;
-                               quote = 0;
-                               /* Finish */
-                       } else if (isspace(c)) {
-                               /* ignore */
-                       } else {
-                               state = ERROR;
-                       }
-                       break;
-               default:
-                       /* ?? */
-                       break;
-               }
-
-               linelen++;
-        } while (c != EOF);
-
-       if (fclose(fp) != 0) {
-               ErrPrint("fclose: %s\n", strerror(errno));
-       }
-       return LB_STATUS_SUCCESS;
-}
-
-HAPI void conf_reset(void)
-{
-       g_conf.width = CONF_DEFAULT_WIDTH;
-       g_conf.height = CONF_DEFAULT_HEIGHT;
-       g_conf.base_width = CONF_DEFAULT_BASE_WIDTH;
-       g_conf.base_height = CONF_DEFAULT_BASE_HEIGHT;
-       g_conf.minimum_period = CONF_DEFAULT_MINIMUM_PERIOD;
-       g_conf.default_conf.period = CONF_DEFAULT_PERIOD;
-       g_conf.minimum_space = CONF_DEFAULT_MINIMUM_SPACE;
-       g_conf.default_packet_time = CONF_DEFAULT_PACKET_TIME;
-       g_conf.slave_ttl = CONF_DEFAULT_SLAVE_TTL;
-       g_conf.slave_activate_time = CONF_DEFAULT_SLAVE_ACTIVATE_TIME;
-       g_conf.slave_relaunch_time = CONF_DEFAULT_SLAVE_RELAUNCH_TIME;
-       g_conf.slave_relaunch_count = CONF_DEFAULT_SLAVE_RELAUNCH_COUNT;
-       g_conf.max_log_line = CONF_DEFAULT_MAX_LOG_LINE;
-       g_conf.max_log_file = CONF_DEFAULT_MAX_LOG_FILE;
-       g_conf.sqlite_flush_max = CONF_DEFAULT_SQLITE_FLUSH_MAX;
-       g_conf.ping_time = CONF_DEFAULT_PING_TIME;
-       g_conf.slave_max_load = CONF_DEFAULT_SLAVE_MAX_LOAD;
-       g_conf.use_sw_backend = CONF_DEFAULT_USE_SW_BACKEND;
-       g_conf.debug_mode = CONF_DEFAULT_DEBUG_MODE;
-       g_conf.overwrite_content = CONF_DEFAULT_OVERWRITE_CONTENT;
-       g_conf.com_core_thread = CONF_DEFAULT_COM_CORE_THREAD;
-       g_conf.use_xmonitor = CONF_DEFAULT_USE_XMONITOR;
-       g_conf.scale_width_factor = CONF_DEFAULT_SCALE_WIDTH_FACTOR;
-       g_conf.scale_height_factor = CONF_DEFAULT_SCALE_HEIGHT_FACTOR;
-       g_conf.pd_request_timeout = CONF_DEFAULT_PD_REQUEST_TIMEOUT;
-       g_conf.premultiplied = CONF_DEFAULT_PREMULTIPLIED;
-       g_conf.default_conf.pixels = CONF_DEFAULT_PIXELS;
-       g_conf.auto_align = CONF_DEFAULT_AUTO_ALIGN;
-       g_conf.use_event_time = CONF_DEFAULT_USE_EVENT_TIME;
-       g_conf.check_lcd = CONF_DEFAULT_CHECK_LCD;
-
-       if (g_conf.default_conf.script != CONF_DEFAULT_SCRIPT_TYPE) {
-               DbgFree(g_conf.default_conf.script);
-               g_conf.default_conf.script = (char *)CONF_DEFAULT_SCRIPT_TYPE;
-       }
-
-       if (g_conf.default_conf.abi != CONF_DEFAULT_ABI) {
-               DbgFree(g_conf.default_conf.abi);
-               g_conf.default_conf.abi = (char *)CONF_DEFAULT_ABI;
-       }
-
-       if (g_conf.default_conf.pd_group != CONF_DEFAULT_PD_GROUP) {
-               DbgFree(g_conf.default_conf.pd_group);
-               g_conf.default_conf.pd_group = (char *)CONF_DEFAULT_PD_GROUP;
-       }
-
-       if (g_conf.launch_key.name != CONF_DEFAULT_LAUNCH_BUNDLE_NAME) {
-               DbgFree(g_conf.launch_key.name);
-               g_conf.launch_key.name = (char *)CONF_DEFAULT_LAUNCH_BUNDLE_NAME;
-       }
-
-       if (g_conf.launch_key.secured != CONF_DEFAULT_LAUNCH_BUNDLE_SECURED) {
-               DbgFree(g_conf.launch_key.secured);
-               g_conf.launch_key.secured = (char *)CONF_DEFAULT_LAUNCH_BUNDLE_SECURED;
-       }
-
-       if (g_conf.launch_key.abi != CONF_DEFAULT_LAUNCH_BUNDLE_ABI) {
-               DbgFree(g_conf.launch_key.abi);
-               g_conf.launch_key.abi = (char *)CONF_DEFAULT_LAUNCH_BUNDLE_ABI;
-       }
-
-       if (g_conf.empty_content != CONF_DEFAULT_EMPTY_CONTENT) {
-               DbgFree(g_conf.empty_content);
-               g_conf.empty_content = (char *)CONF_DEFAULT_EMPTY_CONTENT;
-       }
-
-       if (g_conf.empty_title != CONF_DEFAULT_EMPTY_TITLE) {
-               DbgFree(g_conf.empty_title);
-               g_conf.empty_title = (char *)CONF_DEFAULT_EMPTY_TITLE;
-       }
-
-       if (g_conf.default_content != CONF_DEFAULT_CONTENT) {
-               DbgFree(g_conf.default_content);
-               g_conf.default_content = (char *)CONF_DEFAULT_CONTENT;
-       }
-
-       if (g_conf.default_title != CONF_DEFAULT_TITLE) {
-               DbgFree(g_conf.default_title);
-               g_conf.default_title = (char *)CONF_DEFAULT_TITLE;
-       }
-
-       if (g_conf.replace_tag != CONF_DEFAULT_REPLACE_TAG) {
-               DbgFree(g_conf.replace_tag);
-               g_conf.replace_tag = (char *)CONF_DEFAULT_REPLACE_TAG;
-       }
-
-       if (g_conf.path.conf != CONF_DEFAULT_PATH_CONF) {
-               DbgFree(g_conf.path.conf);
-               g_conf.path.conf = (char *)CONF_DEFAULT_PATH_CONF;
-       }
-
-       if (g_conf.path.image != CONF_DEFAULT_PATH_IMAGE) {
-               DbgFree(g_conf.path.image);
-               g_conf.path.image = (char *)CONF_DEFAULT_PATH_IMAGE;
-       }
-
-       if (g_conf.path.slave_log != CONF_DEFAULT_PATH_LOG) {
-               DbgFree(g_conf.path.slave_log);
-               g_conf.path.slave_log = (char *)CONF_DEFAULT_PATH_LOG;
-       }
-
-       if (g_conf.path.reader != CONF_DEFAULT_PATH_READER) {
-               DbgFree(g_conf.path.reader);
-               g_conf.path.reader = (char *)CONF_DEFAULT_PATH_READER;
-       }
-
-       if (g_conf.path.always != CONF_DEFAULT_PATH_ALWAYS) {
-               DbgFree(g_conf.path.always);
-               g_conf.path.always = (char *)CONF_DEFAULT_PATH_ALWAYS;
-       }
-
-       if (g_conf.path.script != CONF_DEFAULT_PATH_SCRIPT) {
-               DbgFree(g_conf.path.script);
-               g_conf.path.script = (char *)CONF_DEFAULT_PATH_SCRIPT;
-       }
-
-       if (g_conf.path.root != CONF_DEFAULT_PATH_ROOT) {
-               DbgFree(g_conf.path.root);
-               g_conf.path.root = (char *)CONF_DEFAULT_PATH_ROOT;
-       }
-
-       if (g_conf.path.script_port != CONF_DEFAULT_PATH_SCRIPT_PORT) {
-               DbgFree(g_conf.path.script_port);
-               g_conf.path.script_port = (char *)CONF_DEFAULT_PATH_SCRIPT_PORT;
-       }
-
-       if (g_conf.path.db != CONF_DEFAULT_PATH_DB) {
-               DbgFree(g_conf.path.db);
-               g_conf.path.db = (char *)CONF_DEFAULT_PATH_DB;
-       }
-
-       if (g_conf.path.input != CONF_DEFAULT_PATH_INPUT) {
-               DbgFree(g_conf.path.input);
-               g_conf.path.input = (char *)CONF_DEFAULT_PATH_INPUT;
-       }
-
-       if (g_conf.provider_method != CONF_DEFAULT_PROVIDER_METHOD) {
-               DbgFree(g_conf.provider_method);
-               g_conf.provider_method = (char *)CONF_DEFAULT_PROVIDER_METHOD;
-       }
-
-       if (g_conf.emergency_disk != CONF_DEFAULT_EMERGENCY_DISK) {
-               DbgFree(g_conf.emergency_disk);
-               g_conf.emergency_disk = (char *)CONF_DEFAULT_EMERGENCY_DISK;
-       }
 
-       if (g_conf.services != CONF_DEFAULT_SERVICES) {
-               DbgFree(g_conf.services);
-               g_conf.services = (char *)CONF_DEFAULT_SERVICES;
-       }
-}
+struct conf g_conf = {
+       .debug_mode = 0,
+       .slave_max_load = -1,
+};
 
 /* End of a file */
index 6bf10d6..2ff1e7d 100644 (file)
@@ -28,7 +28,8 @@
 #include <dlog.h>
 #include <Eina.h>
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_conf.h>
 #else
 #include "lite-errno.h"
 #endif
@@ -59,16 +60,16 @@ static inline void rotate_log(void)
        char *filename;
        int namelen;
 
-       if (s_info.nr_of_lines < MAX_LOG_LINE) {
+       if (s_info.nr_of_lines < DYNAMICBOX_CONF_MAX_LOG_LINE) {
                return;
        }
 
-       s_info.file_id = (s_info.file_id + 1) % MAX_LOG_FILE;
+       s_info.file_id = (s_info.file_id + 1) % DYNAMICBOX_CONF_MAX_LOG_FILE;
 
-       namelen = strlen(s_info.filename) + strlen(SLAVE_LOG_PATH) + 30;
+       namelen = strlen(s_info.filename) + strlen(DYNAMICBOX_CONF_LOG_PATH) + 30;
        filename = malloc(namelen);
        if (filename) {
-               snprintf(filename, namelen, "%s/%d_%s.%d", SLAVE_LOG_PATH, s_info.file_id, s_info.filename, getpid());
+               snprintf(filename, namelen, "%s/%d_%s.%d", DYNAMICBOX_CONF_LOG_PATH, s_info.file_id, s_info.filename, getpid());
 
                if (s_info.fp) {
                        if (fclose(s_info.fp) != 0) {
@@ -95,7 +96,7 @@ HAPI int critical_log(const char *func, int line, const char *fmt, ...)
        int ret;
 
        if (!s_info.fp) {
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        CRITICAL_SECTION_BEGIN(&s_info.cri_lock);
@@ -123,26 +124,26 @@ HAPI int critical_log_init(const char *name)
        char *filename;
 
        if (s_info.fp) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        s_info.filename = strdup(name);
        if (!s_info.filename) {
                ErrPrint("Failed to create a log file\n");
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       namelen = strlen(name) + strlen(SLAVE_LOG_PATH) + 30;
+       namelen = strlen(name) + strlen(DYNAMICBOX_CONF_LOG_PATH) + 30;
 
        filename = malloc(namelen);
        if (!filename) {
                ErrPrint("Failed to create a log file\n");
                DbgFree(s_info.filename);
                s_info.filename = NULL;
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       snprintf(filename, namelen, "%s/%d_%s.%d", SLAVE_LOG_PATH, s_info.file_id, name, getpid());
+       snprintf(filename, namelen, "%s/%d_%s.%d", DYNAMICBOX_CONF_LOG_PATH, s_info.file_id, name, getpid());
 
        s_info.fp = fopen(filename, "w+");
        if (!s_info.fp) {
@@ -150,11 +151,11 @@ HAPI int critical_log_init(const char *name)
                DbgFree(s_info.filename);
                s_info.filename = NULL;
                DbgFree(filename);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        DbgFree(filename);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 
index 313327f..bd2a0ee 100644 (file)
@@ -23,6 +23,7 @@
 #include <dlog.h>
 
 #include <Eina.h>
+#include <dynamicbox_service.h> /* destroy_type for instance.h */
 
 #include "slave_life.h"
 #include "client_life.h"
index 96363b5..937a515 100644 (file)
@@ -29,7 +29,8 @@
 #include <Eina.h>
 #include <Ecore.h>
 #include <dlog.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_conf.h>
 
 #if !defined(_USE_ECORE_TIME_GET)
 #define _USE_ECORE_TIME_GET
@@ -112,10 +113,10 @@ HAPI int event_init(void)
        ret = pthread_mutex_init(&s_info.event_list_lock, NULL);
        if (ret != 0) {
                ErrPrint("Mutex: %s\n", strerror(ret));
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int event_fini(void)
@@ -129,7 +130,7 @@ HAPI int event_fini(void)
                ErrPrint("Mutex destroy failed: %s\n", strerror(ret));
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /*
@@ -141,7 +142,7 @@ static int push_event_item(void)
 
        if (s_info.event_data.x < 0 || s_info.event_data.y < 0) {
                /* Waiting full event packet */
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        item = malloc(sizeof(*item));
@@ -156,7 +157,7 @@ static int push_event_item(void)
 
                if (write(s_info.evt_pipe[PIPE_WRITE], &event_ch, sizeof(event_ch)) != sizeof(event_ch)) {
                        ErrPrint("Unable to send an event: %s\n", strerror(errno));
-                       return LB_STATUS_ERROR_IO;
+                       return DBOX_STATUS_ERROR_IO_ERROR;
                }
 
                /* Take a breathe */
@@ -165,19 +166,26 @@ static int push_event_item(void)
                ErrPrint("Heap: %s\n", strerror(errno));
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-static double kiran_ecore_time_get(void)
+static double current_time_get(void)
 {
-       struct timeval tv;
+       double ret;
 
-       if (gettimeofday(&tv, NULL) < 0) {
-               ErrPrint("gettimeofday: %s\n", strerror(errno));
-               return 0.0f;
+       if (DYNAMICBOX_CONF_USE_GETTIMEOFDAY) {
+               struct timeval tv;
+               if (gettimeofday(&tv, NULL) < 0) {
+                       ErrPrint("gettimeofday: %s\n", strerror(errno));
+                       ret = ecore_time_get();
+               } else {
+                       ret = (double)tv.tv_sec + ((double)tv.tv_usec / 1000000.0f);
+               }
+       } else {
+               ret = ecore_time_get();
        }
 
-       return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f;
+       return ret;
 }
 
 static void update_timestamp(struct input_event *event)
@@ -188,7 +196,7 @@ static void update_timestamp(struct input_event *event)
         * Input event uses MONOTONIC CLOCK TIME
         * So this case will not be work correctly.
         */
-       if (USE_EVENT_TIME) {
+       if (DYNAMICBOX_CONF_USE_EVENT_TIME) {
                memcpy(&s_info.event_data.tv, &event->time, sizeof(event->time));
        } else {
                if (gettimeofday(&s_info.event_data.tv, NULL) < 0) {
@@ -201,10 +209,10 @@ static void update_timestamp(struct input_event *event)
         * but its value is same as MONOTIC CLOCK TIME
         * So we should handles it properly.
         */
-       if (USE_EVENT_TIME) {
+       if (DYNAMICBOX_CONF_USE_EVENT_TIME) {
                s_info.event_data.tv = (double)event->time.tv_sec + (double)event->time.tv_usec / 1000000.0f;
        } else {
-               s_info.event_data.tv = kiran_ecore_time_get();
+               s_info.event_data.tv = current_time_get();
        }
 #endif
        s_info.timestamp_updated = 1;
@@ -479,7 +487,7 @@ static inline int processing_input_event(struct input_event *event)
                break;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static void *event_thread_main(void *data)
@@ -510,7 +518,7 @@ static void *event_thread_main(void *data)
                        break;
                } else if (ret == 0) {
                        ErrPrint("Timeout expired\n");
-                       ret = LB_STATUS_ERROR_TIMEOUT;
+                       ret = DBOX_STATUS_ERROR_TIMEOUT;
                        break;
                }
 
@@ -518,7 +526,7 @@ static void *event_thread_main(void *data)
                        readsize = read(s_info.handle, ptr + offset, sizeof(input_event) - offset);
                        if (readsize < 0) {
                                ErrPrint("Unable to read device: %s / fd: %d / offset: %d / size: %d - %d\n", strerror(errno), s_info.handle, offset, sizeof(input_event), readsize);
-                               ret = LB_STATUS_ERROR_FAULT;
+                               ret = DBOX_STATUS_ERROR_FAULT;
                                break;
                        }
 
@@ -526,7 +534,7 @@ static void *event_thread_main(void *data)
                        if (offset == sizeof(input_event)) {
                                offset = 0;
                                if (processing_input_event(&input_event) < 0) {
-                                       ret = LB_STATUS_ERROR_FAULT;
+                                       ret = DBOX_STATUS_ERROR_FAULT;
                                        break;
                                }
                        }
@@ -540,7 +548,7 @@ static void *event_thread_main(void *data)
                                ErrPrint("Unable to read TCB_PIPE: %s\n", strerror(errno));
                        }
 
-                       ret = LB_STATUS_ERROR_CANCEL;
+                       ret = DBOX_STATUS_ERROR_CANCEL;
                        break;
                }
        }
@@ -783,13 +791,13 @@ static int event_control_init(void)
 
        DbgPrint("Initializing event controller\n");
        if (s_info.handle != -1) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       s_info.handle = open(INPUT_PATH, O_RDONLY);
+       s_info.handle = open(DYNAMICBOX_CONF_INPUT_PATH, O_RDONLY);
        if (s_info.handle < 0) {
                ErrPrint("Unable to access the device: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (fcntl(s_info.handle, F_SETFD, FD_CLOEXEC) < 0) {
@@ -807,7 +815,7 @@ static int event_control_init(void)
                        ErrPrint("Failed to close handle: %s\n", strerror(errno));
                }
                s_info.handle = -1;
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        status = pipe2(s_info.tcb_pipe, O_CLOEXEC);
@@ -818,10 +826,10 @@ static int event_control_init(void)
                }
                s_info.handle = -1;
                CLOSE_PIPE(s_info.evt_pipe);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /*!
@@ -849,7 +857,7 @@ static int event_control_fini(void)
        CLOSE_PIPE(s_info.tcb_pipe);
        CLOSE_PIPE(s_info.evt_pipe);
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int activate_thread(void)
@@ -857,24 +865,24 @@ static int activate_thread(void)
        int ret;
 
        ret = event_control_init();
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                return ret;
        }
 
        if (s_info.event_handler_activated) {
                ErrPrint("Event handler is already activated\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        if (s_info.event_handler) {
                ErrPrint("Event handler is already registered\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        s_info.event_handler = ecore_main_fd_handler_add(s_info.evt_pipe[PIPE_READ], ECORE_FD_READ, event_read_cb, NULL, NULL, NULL);
        if (!s_info.event_handler) {
                ErrPrint("Failed to add monitor for EVT READ\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        ret = pthread_create(&s_info.tid, NULL, event_thread_main, NULL);
@@ -882,12 +890,12 @@ static int activate_thread(void)
                ErrPrint("Failed to initiate the thread: %s\n", strerror(ret));
                ecore_main_fd_handler_del(s_info.event_handler);
                s_info.event_handler = NULL;
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        DbgPrint("Event handler activated\n");
        s_info.event_handler_activated = 1;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int deactivate_thread(void)
@@ -909,7 +917,7 @@ static int deactivate_thread(void)
        }
 
        s_info.event_handler_activated = 0;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /*!
@@ -918,24 +926,24 @@ static int deactivate_thread(void)
 HAPI int event_activate(int x, int y, int (*event_cb)(enum event_state state, struct event_data *event, void *data), void *data)
 {
        struct event_listener *listener;
-       int ret = LB_STATUS_SUCCESS;
+       int ret = DBOX_STATUS_ERROR_NONE;
 
        listener = malloc(sizeof(*listener));
        if (!listener) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
 #if defined(_USE_ECORE_TIME_GET)
-       listener->tv = kiran_ecore_time_get() - DELAY_COMPENSATOR; // Let's use the previous event.
-       DbgPrint("Activated at: %lf\n", listener->tv);
+       listener->tv = current_time_get() - DELAY_COMPENSATOR; // Let's use the previous event.
+       DbgPrint("Activated at: %lf (%dx%d)\n", listener->tv, x, y);
 #else
        if (gettimeofday(&listener->tv, NULL) < 0) {
                ErrPrint("gettimeofday: %s\n", strerror(errno));
                DbgFree(listener);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
-       DbgPrint("Activated at: %lu sec %lu msec\n", listener->tv.tv_sec, listener->tv.tv_usec);
+       DbgPrint("Activated at: %lu sec %lu msec (%dx%d)\n", listener->tv.tv_sec, listener->tv.tv_usec, x, y);
        /* NEED TO DO COMPENSATION (DELAY) */
 #endif
 
@@ -999,24 +1007,24 @@ HAPI int event_deactivate(int (*event_cb)(enum event_state state, struct event_d
 
        if (!listener) {
                ErrPrint("Listener is not registered or already deactivated\n");
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        if (s_info.event_handler_activated == 0) {
                ErrPrint("Event handler is not actiavated\n");
                s_info.event_listener_list = eina_list_remove(s_info.event_listener_list, listener);
                DbgFree(listener);
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (keep_thread) {
                DbgPrint("Keep thread\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        deactivate_thread();
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int event_reset_cbdata(int (*event_cb)(enum event_state state, struct event_data *event, void *data), void *data, void *new_data)
index 8f22ebb..ebb0824 100644 (file)
 #include <Eina.h>
 #include <packet.h>
 #include <dlog.h>
-#include <livebox-errno.h>
-#include <livebox-service.h>
-#include <livebox-service_product.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_conf.h>
+#include <dynamicbox_cmd_list.h>
 
 #include "util.h"
 #include "debug.h"
@@ -37,7 +38,6 @@
 #include "package.h"
 #include "conf.h"
 #include "critical_log.h"
-#include "provider_cmd_list.h"
 
 static struct info {
        Eina_List *call_list;
@@ -65,7 +65,7 @@ static void clear_log_file(struct slave_node *slave)
        char filename[BUFSIZ];
        int ret;
 
-       ret = snprintf(filename, sizeof(filename) - 1, "%s/slave.%d", SLAVE_LOG_PATH, slave_pid(slave));
+       ret = snprintf(filename, sizeof(filename) - 1, "%s/slave.%d", DYNAMICBOX_CONF_LOG_PATH, slave_pid(slave));
        if (ret == sizeof(filename) - 1) {
                filename[sizeof(filename) - 1] = '\0';
                ErrPrint("filename buffer is overflowed\n");
@@ -83,7 +83,7 @@ static char *check_log_file(struct slave_node *slave)
        FILE *fp;
        char filename[BUFSIZ];
 
-       snprintf(filename, sizeof(filename), "%s/slave.%d", SLAVE_LOG_PATH, slave_pid(slave));
+       snprintf(filename, sizeof(filename), "%s/slave.%d", DYNAMICBOX_CONF_LOG_PATH, slave_pid(slave));
        fp = fopen(filename, "rt");
        if (!fp) {
                ErrPrint("No log file found [%s]\n", strerror(errno));
@@ -104,7 +104,7 @@ static char *check_log_file(struct slave_node *slave)
                ErrPrint("Failed to unlink %s\n", filename);
        }
 
-       ptr = livebox_service_pkgname_by_libexec(libexec);
+       ptr = dynamicbox_service_dbox_id_by_libexec(libexec);
        if (!ptr) {
                ErrPrint("Failed to find the faulted package\n");
        }
@@ -159,12 +159,12 @@ HAPI int fault_info_set(struct slave_node *slave, const char *pkgname, const cha
 
        pkg = package_find(pkgname);
        if (!pkg) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        ret = package_set_fault_info(pkg, util_timestamp(), id, func);
        if (ret < 0) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        dump_fault_info(slave_name(slave), slave_pid(slave), pkgname, id, func);
@@ -176,7 +176,7 @@ HAPI int fault_info_set(struct slave_node *slave, const char *pkgname, const cha
         * Update statistics
         */
        s_info.fault_mark_count++;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int fault_check_pkgs(struct slave_node *slave)
@@ -301,7 +301,7 @@ HAPI int fault_func_call(struct slave_node *slave, const char *pkgname, const ch
 
        info = malloc(sizeof(*info));
        if (!info) {
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        info->slave = slave;
@@ -309,14 +309,14 @@ HAPI int fault_func_call(struct slave_node *slave, const char *pkgname, const ch
        info->pkgname = strdup(pkgname);
        if (!info->pkgname) {
                DbgFree(info);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        info->filename = strdup(filename);
        if (!info->filename) {
                DbgFree(info->pkgname);
                DbgFree(info);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        info->func = strdup(func);
@@ -324,7 +324,7 @@ HAPI int fault_func_call(struct slave_node *slave, const char *pkgname, const ch
                DbgFree(info->filename);
                DbgFree(info->pkgname);
                DbgFree(info);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        info->timestamp = util_timestamp();
@@ -332,7 +332,7 @@ HAPI int fault_func_call(struct slave_node *slave, const char *pkgname, const ch
        s_info.call_list = eina_list_append(s_info.call_list, info);
 
        s_info.fault_mark_count++;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int fault_func_ret(struct slave_node *slave, const char *pkgname, const char *filename, const char *func)
@@ -367,7 +367,7 @@ HAPI int fault_func_ret(struct slave_node *slave, const char *pkgname, const cha
                return 0;
        } 
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 /* End of a file */
index f473ade..1502d04 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <dlog.h>
 
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #include <packet.h>
 #include <com-core.h>
 
@@ -139,11 +139,11 @@ static inline int destroy_request_item(struct request_item *item)
        case REQUEST_TYPE_PIXMAP:
                break;
        default:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        DbgFree(item);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int request_file_handler(struct tcb *tcb, struct packet *packet, struct request_item **item)
@@ -152,11 +152,11 @@ static int request_file_handler(struct tcb *tcb, struct packet *packet, struct r
 
        if (packet_get(packet, "s", &filename) != 1) {
                ErrPrint("Invalid packet\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        *item = create_request_item(tcb, REQUEST_TYPE_FILE, (void *)filename);
-       return *item ? LB_STATUS_SUCCESS : LB_STATUS_ERROR_MEMORY;
+       return *item ? DBOX_STATUS_ERROR_NONE : DBOX_STATUS_ERROR_OUT_OF_MEMORY;
 }
 
 static int request_pixmap_handler(struct tcb *tcb, struct packet *packet, struct request_item **item)
@@ -165,12 +165,12 @@ static int request_pixmap_handler(struct tcb *tcb, struct packet *packet, struct
 
        if (packet_get(packet, "i", &pixmap) != 1) {
                ErrPrint("Invalid packet\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (pixmap == 0) {
                ErrPrint("pixmap is not valid\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        /*!
@@ -178,7 +178,7 @@ static int request_pixmap_handler(struct tcb *tcb, struct packet *packet, struct
         * Attach to pixmap and copy its data to the client
         */
        *item = create_request_item(tcb, REQUEST_TYPE_PIXMAP, (void *)pixmap);
-       return *item ? LB_STATUS_SUCCESS : LB_STATUS_ERROR_MEMORY;
+       return *item ? DBOX_STATUS_ERROR_NONE : DBOX_STATUS_ERROR_OUT_OF_MEMORY;
 }
 
 static int request_shm_handler(struct tcb *tcb, struct packet *packet, struct request_item **item)
@@ -187,12 +187,12 @@ static int request_shm_handler(struct tcb *tcb, struct packet *packet, struct re
 
        if (packet_get(packet, "i", &shm) != 1) {
                ErrPrint("Invalid packet\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (shm < 0) {
                ErrPrint("shm is not valid: %d\n", shm);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        /*!
@@ -200,7 +200,7 @@ static int request_shm_handler(struct tcb *tcb, struct packet *packet, struct re
         * Attach to SHM and copy its buffer to the client
         */
        *item = create_request_item(tcb, REQUEST_TYPE_SHM, (void *)shm);
-       return *item ? LB_STATUS_SUCCESS : LB_STATUS_ERROR_MEMORY;
+       return *item ? DBOX_STATUS_ERROR_NONE : DBOX_STATUS_ERROR_OUT_OF_MEMORY;
 }
 
 /* SERVER THREAD */
@@ -236,13 +236,13 @@ static int service_thread_main(struct tcb *tcb, struct packet *packet, void *dat
 
        if (!packet) {
                DbgPrint("TCB %p is disconnected\n", tcb);
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        cmd = packet_command(packet);
        if (!cmd) {
                ErrPrint("Invalid packet. cmd is not valid\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (packet_type(packet)) {
@@ -279,7 +279,7 @@ static int service_thread_main(struct tcb *tcb, struct packet *packet, void *dat
                         * \note
                         * After send the reply packet, file push thread can sending a file
                         */
-                       if (ret != LB_STATUS_SUCCESS || !item) {
+                       if (ret != DBOX_STATUS_ERROR_NONE || !item) {
                                break;
                        }
 
@@ -316,7 +316,7 @@ static int service_thread_main(struct tcb *tcb, struct packet *packet, void *dat
                break;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int send_file(int handle, const struct request_item *item)
@@ -445,7 +445,7 @@ errout:
 
 static int send_buffer(int handle, const struct request_item *item)
 {
-       struct buffer *buffer;
+       dynamicbox_fb_t buffer;
        struct burst_head *head;
        struct burst_data *body;
        char *data;
@@ -456,9 +456,9 @@ static int send_buffer(int handle, const struct request_item *item)
        int type;
 
        if (item->type == REQUEST_TYPE_SHM) {
-               type = BUFFER_TYPE_SHM;
+               type = DBOX_FB_TYPE_SHM;
        } else {
-               type = BUFFER_TYPE_PIXMAP;
+               type = DBOX_FB_TYPE_PIXMAP;
        }
 
        buffer = buffer_handler_raw_open(type, (void *)item->data.shm);
@@ -615,19 +615,19 @@ int file_service_init(void)
 
        if (s_info.svc_ctx) {
                ErrPrint("Already initialized\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        if (pipe2(s_info.request_pipe, O_CLOEXEC) < 0) {
                ErrPrint("pipe: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        status = pthread_mutex_init(&s_info.request_list_lock, NULL);
        if (status != 0) {
                ErrPrint("Failed to create lock: %s\n", strerror(status));
                CLOSE_PIPE(s_info.request_pipe);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        s_info.svc_ctx = service_common_create(FILE_SERVICE_ADDR, service_thread_main, NULL);
@@ -640,7 +640,7 @@ int file_service_init(void)
                }
 
                CLOSE_PIPE(s_info.request_pipe);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        status = pthread_create(&s_info.push_thid, NULL, push_main, NULL);
@@ -656,7 +656,7 @@ int file_service_init(void)
                }
 
                CLOSE_PIPE(s_info.request_pipe);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        /*!
@@ -665,7 +665,7 @@ int file_service_init(void)
         */
 
        DbgPrint("Successfully initiated\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* MAIN THREAD */
@@ -677,7 +677,7 @@ int file_service_fini(void)
        void *retval;
 
        if (!s_info.svc_ctx) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ch = PUSH_EXIT;
@@ -713,7 +713,7 @@ int file_service_fini(void)
        CLOSE_PIPE(s_info.request_pipe);
 
        DbgPrint("Successfully Finalized\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index ff03488..21627cf 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <dlog.h>
 #include <Eina.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 
 #include "util.h"
 #include "debug.h"
@@ -145,14 +145,14 @@ HAPI int group_add_option(struct context_item *item, const char *key, const char
        option = calloc(1, sizeof(*option));
        if (!option) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        option->key = strdup(key);
        if (!option->key) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(option);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        option->value = strdup(value);
@@ -160,12 +160,12 @@ HAPI int group_add_option(struct context_item *item, const char *key, const char
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(option->key);
                DbgFree(option);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        option->item = item;
        item->option_list = eina_list_append(item->option_list, option);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int group_destroy_context_info(struct context_info *info)
@@ -175,7 +175,7 @@ HAPI int group_destroy_context_info(struct context_info *info)
        category = info->category;
        if (!category) {
                ErrPrint("No category found\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        category->info_list = eina_list_remove(category->info_list, info);
@@ -183,7 +183,7 @@ HAPI int group_destroy_context_info(struct context_info *info)
        del_context_item(info);
        DbgFree(info->pkgname);
        DbgFree(info);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI struct cluster *group_create_cluster(const char *name)
@@ -271,11 +271,11 @@ HAPI int group_destroy_cluster(struct cluster *cluster)
                if (item == cluster) {
                        s_info.cluster_list = eina_list_remove_list(s_info.cluster_list, l);
                        destroy_cluster(cluster);
-                       return LB_STATUS_SUCCESS;
+                       return DBOX_STATUS_ERROR_NONE;
                }
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 static inline void destroy_category(struct category *category)
@@ -302,7 +302,7 @@ HAPI int group_destroy_category(struct category *category)
        }
 
        destroy_category(category);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI struct category *group_find_category(struct cluster *cluster, const char *name)
@@ -380,18 +380,18 @@ HAPI int group_context_item_add_data(struct context_item *item, const char *tag,
 
        tmp = malloc(sizeof(*tmp));
        if (!tmp) {
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        tmp->tag = strdup(tag);
        if (!tmp->tag) {
                DbgFree(tmp);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        tmp->data = data;
        item->data_list = eina_list_append(item->data_list, tmp);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void *group_context_item_data(struct context_item *item, const char *tag)
@@ -481,7 +481,7 @@ static inline char *get_token(char *ptr, int *len)
        return name;
 }
 
-HAPI int group_add_livebox(const char *group, const char *pkgname)
+HAPI int group_add_dynamicbox(const char *group, const char *pkgname)
 {
        struct cluster *cluster;
        struct category *category;
@@ -516,7 +516,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                        name = get_token(ptr, &len);
                        if (!name) {
                                ErrPrint("Failed to get token\n");
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
                        /* cluster{category{context{key=value,key=value},context{key=value}}} */
                        /* cluster{category} */
@@ -531,7 +531,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (!cluster) {
                                        ErrPrint("Failed to get cluster\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                state = CATEGORY;
@@ -546,14 +546,14 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (!category) {
                                        ErrPrint("Failed to get category\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                info = group_create_context_info(category, pkgname);
                                if (!info) {
                                        ErrPrint("Failed to create ctx info\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                state = CONTEXT_ITEM;
@@ -564,7 +564,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (!item) {
                                        ErrPrint("Failed to create a context item\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                state = CONTEXT_OPTION_KEY;
@@ -575,7 +575,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                        default:
                                ErrPrint("Invalid state\n");
                                DbgFree(name);
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
 
                        DbgFree(name);
@@ -599,7 +599,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (is_open != 0) {
                                        ErrPrint("Invalid state\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
                                cluster = group_find_cluster(name);
                                if (!cluster) {
@@ -609,7 +609,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (!cluster) {
                                        ErrPrint("Failed to get cluster\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                state = CATEGORY;
@@ -619,7 +619,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (is_open != 1) {
                                        ErrPrint("Invalid state\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
                                category = group_find_category(cluster, name);
                                if (!category) {
@@ -629,14 +629,14 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (!category) {
                                        ErrPrint("Failed to get category\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                info = group_create_context_info(category, pkgname);
                                if (!info) {
                                        ErrPrint("Failed to create ctx info\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                state = CONTEXT_ITEM;
@@ -651,27 +651,27 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                        if (!category) {
                                                ErrPrint("Failed to get category\n");
                                                DbgFree(name);
-                                               return LB_STATUS_ERROR_FAULT;
+                                               return DBOX_STATUS_ERROR_FAULT;
                                        }
 
                                        info = group_create_context_info(category, pkgname);
                                        if (!info) {
                                                ErrPrint("Failed to create ctx info\n");
                                                DbgFree(name);
-                                               return LB_STATUS_ERROR_FAULT;
+                                               return DBOX_STATUS_ERROR_FAULT;
                                        }
                                } else if (is_open == 2) {
                                        item = group_add_context_item(info, name);
                                        if (!item) {
                                                ErrPrint("Failed to create a context item\n");
                                                DbgFree(name);
-                                               return LB_STATUS_ERROR_FAULT;
+                                               return DBOX_STATUS_ERROR_FAULT;
                                        }
                                        state = CONTEXT_OPTION_KEY;
                                } else {
                                        ErrPrint("Invalid state\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                break;
@@ -679,7 +679,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (is_open != 3) {
                                        ErrPrint("Invalid state\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                if (group_add_option(item, key, name) < 0) {
@@ -695,7 +695,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                        default:
                                ErrPrint("Invalid state (%s)\n", name);
                                DbgFree(name);
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
 
                        DbgFree(name);
@@ -706,13 +706,13 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                } else if (*ptr == '=') {
                        if (is_open != 3 || state != CONTEXT_OPTION_KEY) {
                                ErrPrint("Invalid state\n");
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
 
                        key = get_token(ptr, &len);
                        if (!key) {
                                ErrPrint("Failed to get token\n");
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
 
                        state = CONTEXT_OPTION_VALUE;
@@ -723,7 +723,7 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                } else if (*ptr == '}') {
                        if (is_open <= 0) {
                                ErrPrint("Invalid state\n");
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
 
                        name = get_token(ptr, &len);
@@ -746,14 +746,14 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                if (!category) {
                                        ErrPrint("Failed to get category\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                info = group_create_context_info(category, pkgname);
                                if (!info) {
                                        ErrPrint("Failed to create ctx info\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                state = CLUSTER;
@@ -768,14 +768,14 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                        if (!category) {
                                                ErrPrint("Failed to get category\n");
                                                DbgFree(name);
-                                               return LB_STATUS_ERROR_FAULT;
+                                               return DBOX_STATUS_ERROR_FAULT;
                                        }
 
                                        info = group_create_context_info(category, pkgname);
                                        if (!info) {
                                                ErrPrint("Failed to create ctx info\n");
                                                DbgFree(name);
-                                               return LB_STATUS_ERROR_FAULT;
+                                               return DBOX_STATUS_ERROR_FAULT;
                                        }
 
                                        state = CLUSTER;
@@ -784,14 +784,14 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
                                } else {
                                        ErrPrint("Invalid state\n");
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
                                break;
                        case CONTEXT_OPTION_VALUE:
                                if (is_open != 2) {
                                        ErrPrint("Invalid state (%s)\n", name);
                                        DbgFree(name);
-                                       return LB_STATUS_ERROR_FAULT;
+                                       return DBOX_STATUS_ERROR_FAULT;
                                }
 
                                if (group_add_option(item, key, name) < 0) {
@@ -826,13 +826,13 @@ HAPI int group_add_livebox(const char *group, const char *pkgname)
        DbgFree(key);
 
        if (state != CLUSTER) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI int group_del_livebox(const char *pkgname)
+HAPI int group_del_dynamicbox(const char *pkgname)
 {
        Eina_List *l;
        Eina_List *n;
@@ -862,12 +862,12 @@ HAPI int group_del_livebox(const char *pkgname)
                }
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int group_init(void)
 {
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int group_fini(void)
@@ -883,7 +883,7 @@ HAPI int group_fini(void)
 
                destroy_cluster(cluster);
        }
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index 1689bf2..5944ce6 100644 (file)
 
 #include <packet.h>
 #include <com-core_packet.h>
-#include <livebox-service.h>
-#include <livebox-errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_cmd_list.h>
+#include <dynamicbox_buffer.h>
+#include <dynamicbox_conf.h>
 
 #include "conf.h"
 #include "util.h"
 #include "script_handler.h"
 #include "buffer_handler.h"
 #include "setting.h"
-#include "provider_cmd_list.h"
 
 int errno;
 
 static struct info {
-       enum buffer_type env_buf_type;
+    enum dynamicbox_fb_type env_buf_type;
 } s_info = {
-       .env_buf_type = BUFFER_TYPE_FILE,
+    .env_buf_type = DBOX_FB_TYPE_FILE,
 };
 
 struct set_pinup_cbdata {
-       struct inst_info *inst;
-       int pinup;
+    struct inst_info *inst;
+    int pinup;
 };
 
 struct resize_cbdata {
-       struct inst_info *inst;
-       int w;
-       int h;
+    struct inst_info *inst;
+    int w;
+    int h;
 };
 
 struct update_mode_cbdata {
-       struct inst_info *inst;
-       int active_update;
+    struct inst_info *inst;
+    int active_update;
 };
 
 struct change_group_cbdata {
-       struct inst_info *inst;
-       char *cluster;
-       char *category;
+    struct inst_info *inst;
+    char *cluster;
+    char *category;
 };
 
 struct period_cbdata {
-       struct inst_info *inst;
-       double period;
+    struct inst_info *inst;
+    double period;
 };
 
 struct event_item {
-       int (*event_cb)(struct inst_info *inst, void *data);
-       void *data;
-       int deleted;
+    int (*event_cb)(struct inst_info *inst, void *data);
+    void *data;
+    int deleted;
 };
 
 struct tag_item {
-       char *tag;
-       void *data;
+    char *tag;
+    void *data;
 };
 
 struct inst_info {
-       struct pkg_info *info;
-
-       enum instance_state state; /*!< Represents current state */
-       enum instance_state requested_state; /*!< Only ACTIVATED | DESTROYED is acceptable */
-       enum instance_destroy_type destroy_type;
-       int changing_state;
-       int unicast_delete_event;
-
-       char *id;
-       double timestamp;
-
-       char *content;
-       char *cluster;
-       char *category;
-       char *title;
-       int is_pinned_up;
-       double sleep_at;
-       int scroll_locked; /*!< Scroller which is in viewer is locked. */
-       int active_update; /*!< Viewer will reload the buffer by itself, so the provider doesn't need to send the updated event */
-
-       char *icon;
-       char *name;
-
-       enum livebox_visible_state visible;
-
-       struct {
-               int width;
-               int height;
-               double priority;
-
-               union {
-                       struct script_info *script;
-                       struct buffer_info *buffer;
-               } canvas;
-
-               double period;
-       } lb;
-
-       struct {
-               int width;
-               int height;
-               double x;
-               double y;
-
-               union {
-                       struct script_info *script;
-                       struct buffer_info *buffer;
-               } canvas;
-
-               struct client_node *owner;
-               int is_opened_for_reactivate;
-               int need_to_send_close_event;
-               char *pended_update_desc;
-               int pended_update_cnt;
-       } pd;
-
-       struct client_node *client; /*!< Owner - creator */
-       Eina_List *client_list; /*!< Viewer list */
-       int refcnt;
-
-       Ecore_Timer *update_timer; /*!< Only used for secured livebox */
-
-       enum event_process {
-               INST_EVENT_PROCESS_IDLE = 0x00,
-               INST_EVENT_PROCESS_DELETE = 0x01
-       } in_event_process;
-       Eina_List *delete_event_list;
-
-       Eina_List *data_list;
+    struct pkg_info *info;
+
+    enum instance_state state; /*!< Represents current state */
+    enum instance_state requested_state; /*!< Only ACTIVATED | DESTROYED is acceptable */
+    dynamicbox_destroy_type_e destroy_type;
+    int changing_state;
+    int unicast_delete_event;
+
+    char *id;
+    double timestamp;
+
+    char *content;
+    char *cluster;
+    char *category;
+    char *title;
+    int is_pinned_up;
+    double sleep_at;
+    int scroll_locked; /*!< Scroller which is in viewer is locked. */
+    int active_update; /*!< Viewer will reload the buffer by itself, so the provider doesn't need to send the updated event */
+
+    char *icon;
+    char *name;
+
+    enum dynamicbox_visible_state visible;
+
+    struct {
+       int width;
+       int height;
+       double priority;
+
+       union {
+           struct script_info *script;
+           struct buffer_info *buffer;
+       } canvas;
+
+       struct buffer_info **extra_buffer;
+
+       double period;
+    } dbox;
+
+    struct {
+       int width;
+       int height;
+       double x;
+       double y;
+
+       union {
+           struct script_info *script;
+           struct buffer_info *buffer;
+       } canvas;
+
+       struct buffer_info **extra_buffer;
+
+       struct client_node *owner;
+       int is_opened_for_reactivate;
+       int need_to_send_close_event;
+       char *pended_update_desc;
+       int pended_update_cnt;
+    } gbar;
+
+    struct client_node *client; /*!< Owner - creator */
+    Eina_List *client_list; /*!< Viewer list */
+    int refcnt;
+
+    Ecore_Timer *update_timer; /*!< Only used for secured dynamicbox */
+
+    enum event_process {
+       INST_EVENT_PROCESS_IDLE = 0x00,
+       INST_EVENT_PROCESS_DELETE = 0x01
+    } in_event_process;
+    Eina_List *delete_event_list;
+
+    Eina_List *data_list;
 };
 
 #define CLIENT_SEND_EVENT(instance, packet)    ((instance)->client ? client_rpc_async_request((instance)->client, (packet)) : client_broadcast((instance), (packet)))
@@ -166,2671 +172,2824 @@ static Eina_Bool update_timer_cb(void *data);
 
 static inline void timer_thaw(struct inst_info *inst)
 {
-       double pending;
-       double period;
-       double delay;
-       double sleep_time;
+    double pending;
+    double period;
+    double delay;
+    double sleep_time;
 
-       ecore_timer_thaw(inst->update_timer);
-       period = ecore_timer_interval_get(inst->update_timer);
-       pending = ecore_timer_pending_get(inst->update_timer);
-       delay = util_time_delay_for_compensation(period) - pending;
-       ecore_timer_delay(inst->update_timer, delay);
+    ecore_timer_thaw(inst->update_timer);
+    period = ecore_timer_interval_get(inst->update_timer);
+    pending = ecore_timer_pending_get(inst->update_timer);
+    delay = util_time_delay_for_compensation(period) - pending;
+    ecore_timer_delay(inst->update_timer, delay);
 
-       if (inst->sleep_at == 0.0f) {
-               return;
-       }
+    if (inst->sleep_at == 0.0f) {
+       return;
+    }
 
-       sleep_time = util_timestamp() - inst->sleep_at;
-       if (sleep_time > pending) {
-               (void)update_timer_cb(inst);
-       }
+    sleep_time = util_timestamp() - inst->sleep_at;
+    if (sleep_time > pending) {
+       (void)update_timer_cb(inst);
+    }
 
-       inst->sleep_at = 0.0f;
+    inst->sleep_at = 0.0f;
 }
 
 static inline void timer_freeze(struct inst_info *inst)
 {
-       ecore_timer_freeze(inst->update_timer);
+    ecore_timer_freeze(inst->update_timer);
 
-       if (ecore_timer_interval_get(inst->update_timer) <= 1.0f) {
-               return;
-       }
+    if (ecore_timer_interval_get(inst->update_timer) <= 1.0f) {
+       return;
+    }
 
 #if defined(_USE_ECORE_TIME_GET)
-       inst->sleep_at = ecore_time_get();
+    inst->sleep_at = ecore_time_get();
 #else
-       struct timeval tv;
-       if (gettimeofday(&tv, NULL) < 0) {
-               ErrPrint("gettimeofday: %s\n", strerror(errno));
-               tv.tv_sec = 0;
-               tv.tv_usec = 0;
-       }
-       inst->sleep_at = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f;
+    struct timeval tv;
+    if (gettimeofday(&tv, NULL) < 0) {
+       ErrPrint("gettimeofday: %s\n", strerror(errno));
+       tv.tv_sec = 0;
+       tv.tv_usec = 0;
+    }
+    inst->sleep_at = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f;
 #endif
 }
 
-
 static int viewer_deactivated_cb(struct client_node *client, void *data)
 {
-       struct inst_info *inst = data;
+    struct inst_info *inst = data;
 
-       DbgPrint("%d is deleted from the list of viewer of %s(%s)\n", client_pid(client), package_name(instance_package(inst)), instance_id(inst));
-       if (!eina_list_data_find(inst->client_list, client)) {
-               ErrPrint("Not found\n");
-               return LB_STATUS_ERROR_NOT_EXIST;
-       }
+    DbgPrint("%d is deleted from the list of viewer of %s(%s)\n", client_pid(client), package_name(instance_package(inst)), instance_id(inst));
+    if (!eina_list_data_find(inst->client_list, client)) {
+       ErrPrint("Not found\n");
+       return DBOX_STATUS_ERROR_NOT_EXIST;
+    }
 
-       inst->client_list = eina_list_remove(inst->client_list, client);
-       if (!inst->client_list && !inst->client) {
-               DbgPrint("Has no clients\n");
-               instance_destroy(inst, INSTANCE_DESTROY_FAULT);
-       }
+    inst->client_list = eina_list_remove(inst->client_list, client);
+    if (!inst->client_list && !inst->client) {
+       DbgPrint("Has no clients\n");
+       instance_destroy(inst, DBOX_DESTROY_TYPE_FAULT);
+    }
 
-       instance_unref(inst);
-       return -1; /*!< Remove this callback from the cb list */
+    instance_unref(inst);
+    return -1; /*!< Remove this callback from the cb list */
 }
 
-static int pause_livebox(struct inst_info *inst)
+static int pause_dynamicbox(struct inst_info *inst)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_LB_PAUSE;
+    struct packet *packet;
+    unsigned int cmd = CMD_DBOX_PAUSE;
 
-       packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
-       if (!packet) {
-               ErrPrint("Failed to create a new packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
+    if (!packet) {
+       ErrPrint("Failed to create a new packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
+    return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
 }
 
 /*! \TODO Wake up the freeze'd timer */
-static int resume_livebox(struct inst_info *inst)
+static int resume_dynamicbox(struct inst_info *inst)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_LB_RESUME;
+    struct packet *packet;
+    unsigned int cmd = CMD_DBOX_RESUME;
 
-       packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
-       if (!packet) {
-               ErrPrint("Failed to create a new packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
+    if (!packet) {
+       ErrPrint("Failed to create a new packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
+    return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
 }
 
 static inline int instance_recover_visible_state(struct inst_info *inst)
 {
-       int ret;
+    int ret;
 
-       switch (inst->visible) {
-       case LB_SHOW:
-       case LB_HIDE:
-               instance_thaw_updator(inst);
+    switch (inst->visible) {
+       case DBOX_SHOW:
+       case DBOX_HIDE:
+           instance_thaw_updator(inst);
 
-               ret = 0;
-               break;
-       case LB_HIDE_WITH_PAUSE:
-               ret = pause_livebox(inst);
+           ret = 0;
+           break;
+       case DBOX_HIDE_WITH_PAUSE:
+           ret = pause_dynamicbox(inst);
 
-               instance_freeze_updator(inst);
-               break;
+           instance_freeze_updator(inst);
+           break;
        default:
-               ret = LB_STATUS_ERROR_INVALID;
-               break;
-       }
+           ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           break;
+    }
 
-       DbgPrint("Visible state is recovered to %d\n", ret);
-       return ret;
+    DbgPrint("Visible state is recovered to %d\n", ret);
+    return ret;
 }
 
 static inline void instance_send_update_mode_event(struct inst_info *inst, int active_mode, int status)
 {
-       struct packet *packet;
-       const char *pkgname;
-       unsigned int cmd = CMD_RESULT_UPDATE_MODE;
+    struct packet *packet;
+    const char *pkgname;
+    unsigned int cmd = CMD_RESULT_UPDATE_MODE;
 
-       if (!inst->info) {
-               ErrPrint("Instance info is not ready to use\n");
-               return;
-       }
+    if (!inst->info) {
+       ErrPrint("Instance info is not ready to use\n");
+       return;
+    }
 
-       pkgname = package_name(inst->info);
+    pkgname = package_name(inst->info);
 
-       packet = packet_create_noack((const char *)&cmd, "ssii", pkgname, inst->id, status, active_mode);
-       if (packet) {
-               CLIENT_SEND_EVENT(inst, packet);
-       } else {
-               ErrPrint("Failed to send update mode event\n");
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssii", pkgname, inst->id, status, active_mode);
+    if (packet) {
+       CLIENT_SEND_EVENT(inst, packet);
+    } else {
+       ErrPrint("Failed to send update mode event\n");
+    }
 }
 
-static inline void instance_send_resized_event(struct inst_info *inst, int is_pd, int w, int h, int status)
+static inline void instance_send_update_id(struct inst_info *inst)
 {
-       struct packet *packet;
-       enum lb_type lb_type;
-       const char *pkgname;
-       const char *id;
-       unsigned int cmd = CMD_SIZE_CHANGED;
+    struct packet *packet;
+    unsigned int cmd = CMD_UPDATE_ID;
 
-       if (!inst->info) {
-               ErrPrint("Instance info is not ready to use\n");
-               return;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ds", inst->timestamp, inst->id);
+    if (packet) {
+       CLIENT_SEND_EVENT(inst, packet);
+    } else {
+       ErrPrint("Failed to create update_id packet\n");
+    }
+}
 
-       pkgname = package_name(inst->info);
+static inline void instance_send_resized_event(struct inst_info *inst, int is_gbar, int w, int h, int status)
+{
+    struct packet *packet;
+    enum dynamicbox_dbox_type dbox_type;
+    const char *pkgname;
+    const char *id;
+    unsigned int cmd = CMD_SIZE_CHANGED;
 
-       lb_type = package_lb_type(inst->info);
-       if (lb_type == LB_TYPE_SCRIPT) {
-               id = script_handler_buffer_id(inst->lb.canvas.script);
-       } else if (lb_type == LB_TYPE_BUFFER) {
-               id = buffer_handler_id(inst->lb.canvas.buffer);
-       } else {
-               id = "";
-       }
+    if (!inst->info) {
+       ErrPrint("Instance info is not ready to use\n");
+       return;
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "sssiiii", pkgname, inst->id, id, is_pd, w, h, status);
-       if (packet) {
-               CLIENT_SEND_EVENT(inst, packet);
-       } else {
-               ErrPrint("Failed to send size changed event\n");
-       }
+    pkgname = package_name(inst->info);
+
+    dbox_type = package_dbox_type(inst->info);
+    if (dbox_type == DBOX_TYPE_SCRIPT) {
+       id = script_handler_buffer_id(inst->dbox.canvas.script);
+    } else if (dbox_type == DBOX_TYPE_BUFFER) {
+       id = buffer_handler_id(inst->dbox.canvas.buffer);
+    } else {
+       id = "";
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "sssiiii", pkgname, inst->id, id, is_gbar, w, h, status);
+    if (packet) {
+       CLIENT_SEND_EVENT(inst, packet);
+    } else {
+       ErrPrint("Failed to send size changed event\n");
+    }
 }
 
 static void update_mode_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct update_mode_cbdata *cbdata = data;
-       int ret;
+    struct update_mode_cbdata *cbdata = data;
+    int ret;
 
-       if (!packet) {
-               ErrPrint("Invalid packet\n");
-               ret = LB_STATUS_ERROR_FAULT;
-               goto out;
-       }
+    if (!packet) {
+       ErrPrint("Invalid packet\n");
+       ret = DBOX_STATUS_ERROR_FAULT;
+       goto out;
+    }
 
-       if (packet_get(packet, "i", &ret) != 1) {
-               ErrPrint("Invalid parameters\n");
-               ret = LB_STATUS_ERROR_INVALID;
-               goto out;
-       }
+    if (packet_get(packet, "i", &ret) != 1) {
+       ErrPrint("Invalid parameters\n");
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+       goto out;
+    }
 
-       if (ret == (int)LB_STATUS_SUCCESS) {
-               cbdata->inst->active_update = cbdata->active_update;
-       }
+    if (ret == (int)DBOX_STATUS_ERROR_NONE) {
+       cbdata->inst->active_update = cbdata->active_update;
+    }
 
 out:
-       instance_send_update_mode_event(cbdata->inst, cbdata->active_update, ret);
-       instance_unref(cbdata->inst);
-       DbgFree(cbdata);
+    instance_send_update_mode_event(cbdata->inst, cbdata->active_update, ret);
+    instance_unref(cbdata->inst);
+    DbgFree(cbdata);
 }
 
 HAPI int instance_unicast_created_event(struct inst_info *inst, struct client_node *client)
 {
-       struct packet *packet;
-       enum lb_type lb_type;
-       enum pd_type pd_type;
-       const char *lb_file;
-       const char *pd_file;
-       unsigned int cmd = CMD_CREATED;
+    struct packet *packet;
+    enum dynamicbox_dbox_type dbox_type;
+    enum dynamicbox_gbar_type gbar_type;
+    const char *dbox_file;
+    const char *gbar_file;
+    unsigned int cmd = CMD_CREATED;
 
+    if (!client) {
+       client = inst->client;
        if (!client) {
-               client = inst->client;
-               if (!client) {
-                       return LB_STATUS_SUCCESS;
-               }
-       }
-
-       lb_type = package_lb_type(inst->info);
-       pd_type = package_pd_type(inst->info);
-
-       if (lb_type == LB_TYPE_SCRIPT) {
-               lb_file = script_handler_buffer_id(inst->lb.canvas.script);
-       } else if (lb_type == LB_TYPE_BUFFER) {
-               lb_file = buffer_handler_id(inst->lb.canvas.buffer);
-       } else {
-               lb_file = "";
-       }
-
-       if (pd_type == PD_TYPE_SCRIPT) {
-               pd_file = script_handler_buffer_id(inst->pd.canvas.script);
-       } else if (pd_type == PD_TYPE_BUFFER) {
-               pd_file = buffer_handler_id(inst->pd.canvas.buffer);
-       } else {
-               pd_file = "";
-       }
-
-       packet = packet_create_noack((const char *)&cmd, "dsssiiiisssssdiiiiidsi",
-                       inst->timestamp,
-                       package_name(inst->info), inst->id, inst->content,
-                       inst->lb.width, inst->lb.height,
-                       inst->pd.width, inst->pd.height,
-                       inst->cluster, inst->category,
-                       lb_file, pd_file,
-                       package_auto_launch(inst->info),
-                       inst->lb.priority,
-                       package_size_list(inst->info),
-                       !!inst->client,
-                       package_pinup(inst->info),
-                       lb_type, pd_type,
-                       inst->lb.period, inst->title,
-                       inst->is_pinned_up);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       return client_rpc_async_request(client, packet);
+           return DBOX_STATUS_ERROR_NONE;
+       }
+    }
+
+    dbox_type = package_dbox_type(inst->info);
+    gbar_type = package_gbar_type(inst->info);
+
+    if (dbox_type == DBOX_TYPE_SCRIPT) {
+       dbox_file = script_handler_buffer_id(inst->dbox.canvas.script);
+    } else if (dbox_type == DBOX_TYPE_BUFFER) {
+       dbox_file = buffer_handler_id(inst->dbox.canvas.buffer);
+    } else {
+       dbox_file = "";
+    }
+
+    if (gbar_type == GBAR_TYPE_SCRIPT) {
+       gbar_file = script_handler_buffer_id(inst->gbar.canvas.script);
+    } else if (gbar_type == GBAR_TYPE_BUFFER) {
+       gbar_file = buffer_handler_id(inst->gbar.canvas.buffer);
+    } else {
+       gbar_file = "";
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "dsssiiiisssssdiiiiidsi",
+           inst->timestamp,
+           package_name(inst->info), inst->id, inst->content,
+           inst->dbox.width, inst->dbox.height,
+           inst->gbar.width, inst->gbar.height,
+           inst->cluster, inst->category,
+           dbox_file, gbar_file,
+           package_auto_launch(inst->info),
+           inst->dbox.priority,
+           package_size_list(inst->info),
+           !!inst->client,
+           package_pinup(inst->info),
+           dbox_type, gbar_type,
+           inst->dbox.period, inst->title,
+           inst->is_pinned_up);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    return client_rpc_async_request(client, packet);
 }
 
 static int update_client_list(struct client_node *client, void *data)
 {
-       struct inst_info *inst = data;
+    struct inst_info *inst = data;
 
-       if (!instance_has_client(inst, client)) {
-               instance_add_client(inst, client);
-       }
+    if (!instance_has_client(inst, client)) {
+       instance_add_client(inst, client);
+    }
 
-       return LB_STATUS_SUCCESS;
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 static int instance_broadcast_created_event(struct inst_info *inst)
 {
-       struct packet *packet;
-       enum lb_type lb_type;
-       enum pd_type pd_type;
-       const char *lb_file;
-       const char *pd_file;
-       unsigned int cmd = CMD_CREATED;
-
-       lb_type = package_lb_type(inst->info);
-       pd_type = package_pd_type(inst->info);
-
-       if (lb_type == LB_TYPE_SCRIPT) {
-               lb_file = script_handler_buffer_id(inst->lb.canvas.script);
-       } else if (lb_type == LB_TYPE_BUFFER) {
-               lb_file = buffer_handler_id(inst->lb.canvas.buffer);
-       } else {
-               lb_file = "";
-       }
-
-       if (pd_type == PD_TYPE_SCRIPT) {
-               pd_file = script_handler_buffer_id(inst->pd.canvas.script);
-       } else if (pd_type == PD_TYPE_BUFFER) {
-               pd_file = buffer_handler_id(inst->pd.canvas.buffer);
-       } else {
-               pd_file = "";
-       }
-
-       if (!inst->client) {
-               client_browse_list(inst->cluster, inst->category, update_client_list, inst);
-       }
-
-       packet = packet_create_noack((const char *)&cmd, "dsssiiiisssssdiiiiidsi", 
-                       inst->timestamp,
-                       package_name(inst->info), inst->id, inst->content,
-                       inst->lb.width, inst->lb.height,
-                       inst->pd.width, inst->pd.height,
-                       inst->cluster, inst->category,
-                       lb_file, pd_file,
-                       package_auto_launch(inst->info),
-                       inst->lb.priority,
-                       package_size_list(inst->info),
-                       !!inst->client,
-                       package_pinup(inst->info),
-                       lb_type, pd_type,
-                       inst->lb.period, inst->title,
-                       inst->is_pinned_up);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       inst->unicast_delete_event = 0;
-       return CLIENT_SEND_EVENT(inst, packet);
+    struct packet *packet;
+    enum dynamicbox_dbox_type dbox_type;
+    enum dynamicbox_gbar_type gbar_type;
+    const char *dbox_file;
+    const char *gbar_file;
+    unsigned int cmd = CMD_CREATED;
+
+    dbox_type = package_dbox_type(inst->info);
+    gbar_type = package_gbar_type(inst->info);
+
+    if (dbox_type == DBOX_TYPE_SCRIPT) {
+       dbox_file = script_handler_buffer_id(inst->dbox.canvas.script);
+    } else if (dbox_type == DBOX_TYPE_BUFFER) {
+       dbox_file = buffer_handler_id(inst->dbox.canvas.buffer);
+    } else {
+       dbox_file = "";
+    }
+
+    if (gbar_type == GBAR_TYPE_SCRIPT) {
+       gbar_file = script_handler_buffer_id(inst->gbar.canvas.script);
+    } else if (gbar_type == GBAR_TYPE_BUFFER) {
+       gbar_file = buffer_handler_id(inst->gbar.canvas.buffer);
+    } else {
+       gbar_file = "";
+    }
+
+    if (!inst->client) {
+       client_browse_list(inst->cluster, inst->category, update_client_list, inst);
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "dsssiiiisssssdiiiiidsi", 
+           inst->timestamp,
+           package_name(inst->info), inst->id, inst->content,
+           inst->dbox.width, inst->dbox.height,
+           inst->gbar.width, inst->gbar.height,
+           inst->cluster, inst->category,
+           dbox_file, gbar_file,
+           package_auto_launch(inst->info),
+           inst->dbox.priority,
+           package_size_list(inst->info),
+           !!inst->client,
+           package_pinup(inst->info),
+           dbox_type, gbar_type,
+           inst->dbox.period, inst->title,
+           inst->is_pinned_up);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    inst->unicast_delete_event = 0;
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
 HAPI int instance_unicast_deleted_event(struct inst_info *inst, struct client_node *client, int reason)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_DELETED;
+    struct packet *packet;
+    unsigned int cmd = CMD_DELETED;
 
+    if (!client) {
+       client = inst->client;
        if (!client) {
-               client = inst->client;
-               if (!client) {
-                       return LB_STATUS_ERROR_INVALID;
-               }
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ssdi", package_name(inst->info), inst->id, inst->timestamp, reason);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-               
-       return client_rpc_async_request(client, packet);
+    packet = packet_create_noack((const char *)&cmd, "ssdi", package_name(inst->info), inst->id, inst->timestamp, reason);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    return client_rpc_async_request(client, packet);
 }
 
 static int instance_broadcast_deleted_event(struct inst_info *inst, int reason)
 {
-       struct packet *packet;
-       struct client_node *client;
-       Eina_List *l;
-       Eina_List *n;
-       int ret;
-       unsigned int cmd = CMD_DELETED;
-
-       packet = packet_create_noack((const char *)&cmd, "ssdi", package_name(inst->info), inst->id, inst->timestamp, reason);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-               
-       ret = CLIENT_SEND_EVENT(inst, packet);
+    struct packet *packet;
+    struct client_node *client;
+    Eina_List *l;
+    Eina_List *n;
+    int ret;
+    unsigned int cmd = CMD_DELETED;
 
-       EINA_LIST_FOREACH_SAFE(inst->client_list, l, n, client) {
-               instance_del_client(inst, client);
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssdi", package_name(inst->info), inst->id, inst->timestamp, reason);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return ret;
+    ret = CLIENT_SEND_EVENT(inst, packet);
+
+    EINA_LIST_FOREACH_SAFE(inst->client_list, l, n, client) {
+       instance_del_client(inst, client);
+    }
+
+    return ret;
 }
 
 static int client_deactivated_cb(struct client_node *client, void *data)
 {
-       struct inst_info *inst = data;
-       instance_destroy(inst, INSTANCE_DESTROY_FAULT);
-       return LB_STATUS_SUCCESS;
+    struct inst_info *inst = data;
+    instance_destroy(inst, DBOX_DESTROY_TYPE_FAULT);
+    return DBOX_STATUS_ERROR_NONE;
 }
 
-static int send_pd_destroyed_to_client(struct inst_info *inst, int status)
+static int send_gbar_destroyed_to_client(struct inst_info *inst, int status)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_PD_DESTROYED;
+    struct packet *packet;
+    unsigned int cmd = CMD_GBAR_DESTROYED;
 
-       if (!inst->pd.need_to_send_close_event && status != LB_STATUS_ERROR_FAULT) {
-               ErrPrint("PD is not created\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst->gbar.need_to_send_close_event && status != DBOX_STATUS_ERROR_FAULT) {
+       ErrPrint("GBAR is not created\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, status);
-       if (!packet) {
-               ErrPrint("Failed to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, status);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       inst->pd.need_to_send_close_event = 0;
+    inst->gbar.need_to_send_close_event = 0;
 
-       return CLIENT_SEND_EVENT(inst, packet);
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
 static inline void invoke_delete_callbacks(struct inst_info *inst)
 {
-       Eina_List *l;
-       Eina_List *n;
-       struct event_item *item;
+    Eina_List *l;
+    Eina_List *n;
+    struct event_item *item;
 
-       inst->in_event_process |= INST_EVENT_PROCESS_DELETE;
-       EINA_LIST_FOREACH_SAFE(inst->delete_event_list, l, n, item) {
-               if (item->deleted || item->event_cb(inst, item->data) < 0 || item->deleted) {
-                       inst->delete_event_list = eina_list_remove(inst->delete_event_list, item);
-                       DbgFree(item);
-               }
+    inst->in_event_process |= INST_EVENT_PROCESS_DELETE;
+    EINA_LIST_FOREACH_SAFE(inst->delete_event_list, l, n, item) {
+       if (item->deleted || item->event_cb(inst, item->data) < 0 || item->deleted) {
+           inst->delete_event_list = eina_list_remove(inst->delete_event_list, item);
+           DbgFree(item);
        }
-       inst->in_event_process &= ~INST_EVENT_PROCESS_DELETE;
+    }
+    inst->in_event_process &= ~INST_EVENT_PROCESS_DELETE;
 }
 
 HAPI int instance_event_callback_is_added(struct inst_info *inst, enum instance_event type, int (*event_cb)(struct inst_info *inst, void *data), void *data)
 {
-       struct event_item *item;
-       Eina_List *l;
+    struct event_item *item;
+    Eina_List *l;
 
-       if (!event_cb) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!event_cb) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       switch (type) {
+    switch (type) {
        case INSTANCE_EVENT_DESTROY:
-               EINA_LIST_FOREACH(inst->delete_event_list, l, item) {
-                       if (item->event_cb == event_cb && item->data == data) {
-                               return 1;
-                       }
+           EINA_LIST_FOREACH(inst->delete_event_list, l, item) {
+               if (item->event_cb == event_cb && item->data == data) {
+                   return 1;
                }
+           }
 
-               break;
+           break;
        default:
-               return LB_STATUS_ERROR_INVALID;
-       }
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       return 0;
+    return 0;
 }
 
 HAPI int instance_event_callback_add(struct inst_info *inst, enum instance_event type, int (*event_cb)(struct inst_info *inst, void *data), void *data)
 {
-       struct event_item *item;
+    struct event_item *item;
 
-       if (!event_cb) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!event_cb) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       switch (type) {
+    switch (type) {
        case INSTANCE_EVENT_DESTROY:
-               item = malloc(sizeof(*item));
-               if (!item) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       return LB_STATUS_ERROR_MEMORY;
-               }
+           item = malloc(sizeof(*item));
+           if (!item) {
+               ErrPrint("Heap: %s\n", strerror(errno));
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+           }
 
-               item->event_cb = event_cb;
-               item->data = data;
-               item->deleted = 0;
+           item->event_cb = event_cb;
+           item->data = data;
+           item->deleted = 0;
 
-               inst->delete_event_list = eina_list_append(inst->delete_event_list, item);
-               break;
+           inst->delete_event_list = eina_list_append(inst->delete_event_list, item);
+           break;
        default:
-               return LB_STATUS_ERROR_INVALID;
-       }
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       return LB_STATUS_SUCCESS;
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int instance_event_callback_del(struct inst_info *inst, enum instance_event type, int (*event_cb)(struct inst_info *inst, void *data), void *data)
 {
-       Eina_List *l;
-       Eina_List *n;
-       struct event_item *item;
+    Eina_List *l;
+    Eina_List *n;
+    struct event_item *item;
 
-       switch (type) {
+    switch (type) {
        case INSTANCE_EVENT_DESTROY:
-               EINA_LIST_FOREACH_SAFE(inst->delete_event_list, l, n, item) {
-                       if (item->event_cb == event_cb && item->data == data) {
-                               if (inst->in_event_process & INST_EVENT_PROCESS_DELETE) {
-                                       item->deleted = 1;
-                               } else {
-                                       inst->delete_event_list = eina_list_remove(inst->delete_event_list, item);
-                                       DbgFree(item);
-                               }
-                               return LB_STATUS_SUCCESS;
-                       }
+           EINA_LIST_FOREACH_SAFE(inst->delete_event_list, l, n, item) {
+               if (item->event_cb == event_cb && item->data == data) {
+                   if (inst->in_event_process & INST_EVENT_PROCESS_DELETE) {
+                       item->deleted = 1;
+                   } else {
+                       inst->delete_event_list = eina_list_remove(inst->delete_event_list, item);
+                       DbgFree(item);
+                   }
+                   return DBOX_STATUS_ERROR_NONE;
                }
-               break;
+           }
+           break;
        default:
-               break;
-       }
+           break;
+    }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+    return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 static inline void destroy_instance(struct inst_info *inst)
 {
-       struct pkg_info *pkg;
-       enum lb_type lb_type;
-       enum pd_type pd_type;
-       struct slave_node *slave;
-       struct event_item *item;
-       struct tag_item *tag_item;
+    struct pkg_info *pkg;
+    enum dynamicbox_dbox_type dbox_type;
+    enum dynamicbox_gbar_type gbar_type;
+    struct slave_node *slave;
+    struct event_item *item;
+    struct tag_item *tag_item;
 
-       (void)send_pd_destroyed_to_client(inst, LB_STATUS_SUCCESS);
+    (void)send_gbar_destroyed_to_client(inst, DBOX_STATUS_ERROR_NONE);
 
-       invoke_delete_callbacks(inst);
+    invoke_delete_callbacks(inst);
 
-       pkg = inst->info;
+    pkg = inst->info;
 
-       lb_type = package_lb_type(pkg);
-       pd_type = package_pd_type(pkg);
-       slave = package_slave(inst->info);
+    dbox_type = package_dbox_type(pkg);
+    gbar_type = package_gbar_type(pkg);
+    slave = package_slave(inst->info);
 
-       DbgPrint("Instance is destroyed (%p), slave(%p)\n", inst, slave);
+    DbgPrint("Instance is destroyed (%p), slave(%p)\n", inst, slave);
 
-       if (lb_type == LB_TYPE_SCRIPT) {
-               (void)script_handler_unload(inst->lb.canvas.script, 0);
-               if (script_handler_destroy(inst->lb.canvas.script) == (int)LB_STATUS_SUCCESS) {
-                       inst->lb.canvas.script = NULL;
-               }
-       } else if (lb_type == LB_TYPE_BUFFER) {
-               (void)buffer_handler_unload(inst->lb.canvas.buffer);
-               if (buffer_handler_destroy(inst->lb.canvas.buffer) == (int)LB_STATUS_SUCCESS) {
-                       inst->lb.canvas.buffer = NULL;
-               }
+    if (dbox_type == DBOX_TYPE_SCRIPT) {
+       (void)script_handler_unload(inst->dbox.canvas.script, 0);
+       if (script_handler_destroy(inst->dbox.canvas.script) == (int)DBOX_STATUS_ERROR_NONE) {
+           inst->dbox.canvas.script = NULL;
+       }
+    } else if (dbox_type == DBOX_TYPE_BUFFER) {
+       (void)buffer_handler_unload(inst->dbox.canvas.buffer);
+       if (buffer_handler_destroy(inst->dbox.canvas.buffer) == (int)DBOX_STATUS_ERROR_NONE) {
+           inst->dbox.canvas.buffer = NULL;
        }
 
-       if (pd_type == PD_TYPE_SCRIPT) {
-               (void)script_handler_unload(inst->pd.canvas.script, 1);
-               if (script_handler_destroy(inst->pd.canvas.script) == (int)LB_STATUS_SUCCESS) {
-                       inst->pd.canvas.script = NULL;
+       if (inst->dbox.extra_buffer) {
+           int i;
+
+           for (i = 0; i < DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT; i++) {
+               if (!inst->dbox.extra_buffer[i]) {
+                   continue;
                }
-       } else if (pd_type == PD_TYPE_BUFFER) {
-               (void)buffer_handler_unload(inst->pd.canvas.buffer);
-               if (buffer_handler_destroy(inst->pd.canvas.buffer) == (int)LB_STATUS_SUCCESS) {
-                       inst->pd.canvas.buffer = NULL;
+
+               (void)buffer_handler_unload(inst->dbox.extra_buffer[i]);
+               if (buffer_handler_destroy(inst->dbox.extra_buffer[i]) == (int)DBOX_STATUS_ERROR_NONE) {
+                   inst->dbox.extra_buffer[i] = NULL;
                }
-       }
+           }
 
-       if (inst->client) {
-               client_event_callback_del(inst->client, CLIENT_EVENT_DEACTIVATE, client_deactivated_cb, inst);
-               client_unref(inst->client);
+           DbgFree(inst->dbox.extra_buffer);
+           inst->dbox.extra_buffer = NULL;
        }
+    }
 
-       if (inst->update_timer) {
-               ecore_timer_del(inst->update_timer);
+    if (gbar_type == GBAR_TYPE_SCRIPT) {
+       (void)script_handler_unload(inst->gbar.canvas.script, 1);
+       if (script_handler_destroy(inst->gbar.canvas.script) == (int)DBOX_STATUS_ERROR_NONE) {
+           inst->gbar.canvas.script = NULL;
        }
-
-       EINA_LIST_FREE(inst->data_list, tag_item) {
-               DbgPrint("Tagged item[%s] %p\n", tag_item->tag, tag_item->data);
-               DbgFree(tag_item->tag);
-               DbgFree(tag_item);
+    } else if (gbar_type == GBAR_TYPE_BUFFER) {
+       (void)buffer_handler_unload(inst->gbar.canvas.buffer);
+       if (buffer_handler_destroy(inst->gbar.canvas.buffer) == (int)DBOX_STATUS_ERROR_NONE) {
+           inst->gbar.canvas.buffer = NULL;
        }
+       if (inst->gbar.extra_buffer) {
+           int i;
 
-       EINA_LIST_FREE(inst->delete_event_list, item) {
-               DbgFree(item);
+           for (i = 0; i < DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT; i++) {
+               if (!inst->gbar.extra_buffer[i]) {
+                   continue;
+               }
+
+               (void)buffer_handler_unload(inst->gbar.extra_buffer[i]);
+               if (buffer_handler_destroy(inst->gbar.extra_buffer[i]) == (int)DBOX_STATUS_ERROR_NONE) {
+                   inst->gbar.extra_buffer[i] = NULL;
+               }
+           }
+
+           DbgFree(inst->gbar.extra_buffer);
+           inst->gbar.extra_buffer = NULL;
        }
-       DbgFree(inst->icon);
-       DbgFree(inst->name);
-       DbgFree(inst->category);
-       DbgFree(inst->cluster);
-       DbgFree(inst->content);
-       DbgFree(inst->title);
-       util_unlink(util_uri_to_path(inst->id));
-       DbgFree(inst->id);
-       package_del_instance(inst->info, inst);
-       DbgFree(inst);
+    }
+
+    if (inst->client) {
+       client_event_callback_del(inst->client, CLIENT_EVENT_DEACTIVATE, client_deactivated_cb, inst);
+       client_unref(inst->client);
+    }
+
+    if (inst->update_timer) {
+       ecore_timer_del(inst->update_timer);
+    }
+
+    EINA_LIST_FREE(inst->data_list, tag_item) {
+       DbgPrint("Tagged item[%s] %p\n", tag_item->tag, tag_item->data);
+       DbgFree(tag_item->tag);
+       DbgFree(tag_item);
+    }
+
+    EINA_LIST_FREE(inst->delete_event_list, item) {
+       DbgFree(item);
+    }
 
-       slave = slave_unload_instance(slave);
+    DbgFree(inst->icon);
+    DbgFree(inst->name);
+    DbgFree(inst->category);
+    DbgFree(inst->cluster);
+    DbgFree(inst->content);
+    DbgFree(inst->title);
+    util_unlink(util_uri_to_path(inst->id));
+    DbgFree(inst->id);
+    package_del_instance(inst->info, inst);
+    DbgFree(inst);
+
+    slave = slave_unload_instance(slave);
 }
 
 static Eina_Bool update_timer_cb(void *data)
 {
-       struct inst_info *inst = (struct inst_info *)data;
+    struct inst_info *inst = (struct inst_info *)data;
 
-       slave_rpc_request_update(package_name(inst->info), inst->id, inst->cluster, inst->category, NULL, 0);
-       return ECORE_CALLBACK_RENEW;
+    slave_rpc_request_update(package_name(inst->info), inst->id, inst->cluster, inst->category, NULL, 0);
+    return ECORE_CALLBACK_RENEW;
 }
 
 static inline int fork_package(struct inst_info *inst, const char *pkgname)
 {
-       struct pkg_info *info;
-       int len;
+    struct pkg_info *info;
+    int len;
 
-       info = package_find(pkgname);
-       if (!info) {
-               ErrPrint("%s is not found\n", pkgname);
-               return LB_STATUS_ERROR_NOT_EXIST;
-       }
+    info = package_find(pkgname);
+    if (!info) {
+       ErrPrint("%s is not found\n", pkgname);
+       return DBOX_STATUS_ERROR_NOT_EXIST;
+    }
 
-       len = strlen(SCHEMA_FILE "%s%s_%d_%lf.png") + strlen(IMAGE_PATH) + strlen(package_name(info)) + 50;
-       inst->id = malloc(len);
-       if (!inst->id) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
-       }
+    len = strlen(SCHEMA_FILE "%s%s_%d_%lf.png") + strlen(DYNAMICBOX_CONF_IMAGE_PATH) + strlen(package_name(info)) + 50;
+    inst->id = malloc(len);
+    if (!inst->id) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
 
-       snprintf(inst->id, len, SCHEMA_FILE "%s%s_%d_%lf.png", IMAGE_PATH, package_name(info), client_pid(inst->client), inst->timestamp);
+    snprintf(inst->id, len, SCHEMA_FILE "%s%s_%d_%lf.png", DYNAMICBOX_CONF_IMAGE_PATH, package_name(info), client_pid(inst->client), inst->timestamp);
 
-       instance_set_pd_size(inst, package_pd_width(info), package_pd_height(info));
+    instance_set_gbar_size(inst, package_gbar_width(info), package_gbar_height(info));
 
-       inst->lb.period = package_period(info);
+    inst->dbox.period = package_period(info);
 
-       inst->info = info;
+    inst->info = info;
 
-       if (package_secured(info)) {
-               if (inst->lb.period > 0.0f) {
-                       inst->update_timer = util_timer_add(inst->lb.period, update_timer_cb, inst);
-                       if (!inst->update_timer) {
-                               ErrPrint("Failed to add an update timer for instance %s\n", inst->id);
-                       } else {
-                               timer_freeze(inst); /* Freeze the update timer as default */
-                       }
-               } else {
-                       inst->update_timer = NULL;
-               }
+    if (package_secured(info)) {
+       if (inst->dbox.period > 0.0f) {
+           inst->update_timer = util_timer_add(inst->dbox.period, update_timer_cb, inst);
+           if (!inst->update_timer) {
+               ErrPrint("Failed to add an update timer for instance %s\n", inst->id);
+           } else {
+               timer_freeze(inst); /* Freeze the update timer as default */
+           }
+       } else {
+           inst->update_timer = NULL;
        }
+    }
 
-       return LB_STATUS_SUCCESS;
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI struct inst_info *instance_create(struct client_node *client, double timestamp, const char *pkgname, const char *content, const char *cluster, const char *category, double period, int width, int height)
 {
-       struct inst_info *inst;
+    struct inst_info *inst;
 
-       inst = calloc(1, sizeof(*inst));
-       if (!inst) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return NULL;
-       }
+    inst = calloc(1, sizeof(*inst));
+    if (!inst) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       return NULL;
+    }
 
-       inst->timestamp = timestamp;
-       inst->lb.width = width;
-       inst->lb.height = height;
+    inst->timestamp = timestamp;
+    inst->dbox.width = width;
+    inst->dbox.height = height;
 
-       inst->content = strdup(content);
-       if (!inst->content) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               DbgFree(inst);
-               return NULL;
-       }
+    inst->content = strdup(content);
+    if (!inst->content) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       DbgFree(inst);
+       return NULL;
+    }
 
-       inst->cluster = strdup(cluster);
-       if (!inst->cluster) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               DbgFree(inst->content);
-               DbgFree(inst);
-               return NULL;
-       }
+    inst->cluster = strdup(cluster);
+    if (!inst->cluster) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       DbgFree(inst->content);
+       DbgFree(inst);
+       return NULL;
+    }
 
-       inst->category = strdup(category);
-       if (!inst->category) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               DbgFree(inst->cluster);
-               DbgFree(inst->content);
-               DbgFree(inst);
-               return NULL;
-       }
+    inst->category = strdup(category);
+    if (!inst->category) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       DbgFree(inst->cluster);
+       DbgFree(inst->content);
+       DbgFree(inst);
+       return NULL;
+    }
 
-       inst->title = strdup(DEFAULT_TITLE); /*!< Use the DEFAULT Title "" */
-       if (!inst->title) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               DbgFree(inst->category);
-               DbgFree(inst->cluster);
-               DbgFree(inst->content);
-               DbgFree(inst);
-               return NULL;
+    inst->title = strdup(DYNAMICBOX_CONF_DEFAULT_TITLE); /*!< Use the DEFAULT Title "" */
+    if (!inst->title) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       DbgFree(inst->category);
+       DbgFree(inst->cluster);
+       DbgFree(inst->content);
+       DbgFree(inst);
+       return NULL;
+    }
+
+    if (client) {
+       inst->client = client_ref(client);
+       if (client_event_callback_add(inst->client, CLIENT_EVENT_DEACTIVATE, client_deactivated_cb, inst) < 0) {
+           ErrPrint("Failed to add client event callback: %s\n", inst->id);
        }
+    }
 
-       if (client) {
-               inst->client = client_ref(client);
-               if (client_event_callback_add(inst->client, CLIENT_EVENT_DEACTIVATE, client_deactivated_cb, inst) < 0) {
-                       ErrPrint("Failed to add client event callback: %s\n", inst->id);
-               }
+    if (fork_package(inst, pkgname) < 0) {
+       (void)client_unref(inst->client);
+       DbgFree(inst->title);
+       DbgFree(inst->category);
+       DbgFree(inst->cluster);
+       DbgFree(inst->content);
+       DbgFree(inst);
+       return NULL;
+    }
+
+    inst->unicast_delete_event = 1;
+    inst->state = INST_INIT;
+    inst->requested_state = INST_INIT;
+    if (DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT) {
+       inst->dbox.extra_buffer = calloc(DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT, sizeof(*inst->dbox.extra_buffer));
+       if (!inst->dbox.extra_buffer) {
+           ErrPrint("Failed to allocate buffer for dbox extra buffer\n");
        }
 
-       if (fork_package(inst, pkgname) < 0) {
-               (void)client_unref(inst->client);
-               DbgFree(inst->title);
-               DbgFree(inst->category);
-               DbgFree(inst->cluster);
-               DbgFree(inst->content);
-               DbgFree(inst);
-               return NULL;
+       inst->gbar.extra_buffer = calloc(DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT, sizeof(*inst->gbar.extra_buffer));
+       if (!inst->gbar.extra_buffer) {
+           ErrPrint("Failed to allocate buffer for gbar extra buffer\n");
        }
+    }
+    instance_ref(inst);
 
-       inst->unicast_delete_event = 1;
-       inst->state = INST_INIT;
-       inst->requested_state = INST_INIT;
-       instance_ref(inst);
+    if (package_add_instance(inst->info, inst) < 0) {
+       instance_destroy(inst, DBOX_DESTROY_TYPE_FAULT);
+       return NULL;
+    }
 
-       if (package_add_instance(inst->info, inst) < 0) {
-               instance_destroy(inst, INSTANCE_DESTROY_FAULT);
-               return NULL;
-       }
+    slave_load_instance(package_slave(inst->info));
 
-       slave_load_instance(package_slave(inst->info));
+    // Before activate an instance, update its id first for client
+    instance_send_update_id(inst);
 
-       if (instance_activate(inst) < 0) {
-               instance_state_reset(inst);
-               instance_destroy(inst, INSTANCE_DESTROY_FAULT);
-               inst = NULL;
-       }
+    if (instance_activate(inst) < 0) {
+       instance_state_reset(inst);
+       instance_destroy(inst, DBOX_DESTROY_TYPE_FAULT);
+       inst = NULL;
+    }
 
-       return inst;
+    return inst;
 }
 
 HAPI struct inst_info *instance_ref(struct inst_info *inst)
 {
-       if (!inst) {
-               return NULL;
-       }
+    if (!inst) {
+       return NULL;
+    }
 
-       inst->refcnt++;
-       return inst;
+    inst->refcnt++;
+    return inst;
 }
 
 HAPI struct inst_info *instance_unref(struct inst_info *inst)
 {
-       if (!inst) {
-               return NULL;
-       }
+    if (!inst) {
+       return NULL;
+    }
 
-       if (inst->refcnt == 0) {
-               ErrPrint("Instance refcnt is not valid\n");
-               return NULL;
-       }
+    if (inst->refcnt == 0) {
+       ErrPrint("Instance refcnt is not valid\n");
+       return NULL;
+    }
 
-       inst->refcnt--;
-       if (inst->refcnt == 0) {
-               destroy_instance(inst);
-               inst = NULL;
-       }
+    inst->refcnt--;
+    if (inst->refcnt == 0) {
+       destroy_instance(inst);
+       inst = NULL;
+    }
 
-       return inst;
+    return inst;
 }
 
 static void deactivate_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct inst_info *inst = data;
-       int ret;
+    struct inst_info *inst = data;
+    int ret;
+
+    /*!
+     * \note
+     * In this callback, we cannot trust the "client" information.
+     * It could be cleared before reach to here.
+     */
 
+    if (!packet) {
        /*!
         * \note
-        * In this callback, we cannot trust the "client" information.
-        * It could be cleared before reach to here.
+        * The instance_reload will care this.
+        * And it will be called from the slave activate callback.
         */
+       goto out;
+    }
 
-       if (!packet) {
-               /*!
-                * \note
-                * The instance_reload will care this.
-                * And it will be called from the slave activate callback.
-                */
-               goto out;
-       }
-
-       if (packet_get(packet, "i", &ret) != 1) {
-               ErrPrint("Invalid argument\n");
-               goto out;
-       }
+    if (packet_get(packet, "i", &ret) != 1) {
+       ErrPrint("Invalid argument\n");
+       goto out;
+    }
 
-       DbgPrint("[%s] %d (0x%X)\n", inst->id, ret, inst->state);
+    DbgPrint("[%s] %d (0x%X)\n", inst->id, ret, inst->state);
 
-       if (inst->state == INST_DESTROYED) {
-               /*!
-                * \note
-                * Already destroyed.
-                * Do nothing at here anymore.
-                */
-               goto out;
-       }
+    if (inst->state == INST_DESTROYED) {
+       /*!
+        * \note
+        * Already destroyed.
+        * Do nothing at here anymore.
+        */
+       goto out;
+    }
 
-       switch (ret) {
+    switch (ret) {
        case 0:
-               /*!
-                * \note
-                * Successfully unloaded
-                */
-               switch (inst->requested_state) {
+           /*!
+            * \note
+            * Successfully unloaded
+            */
+           switch (inst->requested_state) {
                case INST_ACTIVATED:
-                       instance_state_reset(inst);
-                       instance_reactivate(inst);
-                       break;
+                   instance_state_reset(inst);
+                   instance_reactivate(inst);
+                   break;
                case INST_DESTROYED:
-                       if (inst->unicast_delete_event) {
-                               instance_unicast_deleted_event(inst, NULL, ret);
-                       } else {
-                               instance_broadcast_deleted_event(inst, ret);
-                       }
-                       instance_state_reset(inst);
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
+                   if (inst->unicast_delete_event) {
+                       instance_unicast_deleted_event(inst, NULL, ret);
+                   } else {
+                       instance_broadcast_deleted_event(inst, ret);
+                   }
+                   instance_state_reset(inst);
+                   instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
                default:
-                       /*!< Unable to reach here */
-                       break;
-               }
-
-               break;
-       case LB_STATUS_ERROR_INVALID:
-               /*!
-                * \note
-                * Slave has no instance of this package.
-                */
-       case LB_STATUS_ERROR_NOT_EXIST:
-               /*!
-                * \note
-                * This instance's previous state is only can be the INST_ACTIVATED.
-                * So we should care the slave_unload_instance from here.
-                * And we should send notification to clients, about this is deleted.
-                */
-               /*!
-                * \note
-                * Slave has no instance of this.
-                * In this case, ignore the requested_state
-                * Because, this instance is already met a problem.
-                */
+                   /*!< Unable to reach here */
+                   break;
+           }
+
+           break;
+       case DBOX_STATUS_ERROR_INVALID_PARAMETER:
+           /*!
+            * \note
+            * Slave has no instance of this package.
+            */
+       case DBOX_STATUS_ERROR_NOT_EXIST:
+           /*!
+            * \note
+            * This instance's previous state is only can be the INST_ACTIVATED.
+            * So we should care the slave_unload_instance from here.
+            * And we should send notification to clients, about this is deleted.
+            */
+           /*!
+            * \note
+            * Slave has no instance of this.
+            * In this case, ignore the requested_state
+            * Because, this instance is already met a problem.
+            */
        default:
-               /*!
-                * \note
-                * Failed to unload this instance.
-                * This is not possible, slave will always return LB_STATUS_ERROR_NOT_EXIST, LB_STATUS_ERROR_INVALID, or 0.
-                * but care this exceptional case.
-                */
-               instance_broadcast_deleted_event(inst, ret);
-               instance_state_reset(inst);
-               instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-               break;
-       }
+           /*!
+            * \note
+            * Failed to unload this instance.
+            * This is not possible, slave will always return DBOX_STATUS_ERROR_NOT_EXIST, DBOX_STATUS_ERROR_INVALID_PARAMETER, or 0.
+            * but care this exceptional case.
+            */
+           instance_broadcast_deleted_event(inst, ret);
+           instance_state_reset(inst);
+           instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+           break;
+    }
 
 out:
-       inst->changing_state--;
-       if (inst->changing_state < 0) {
-               ErrPrint("Changing state is not correct: %d\n", inst->changing_state);
-       }
-       instance_unref(inst);
+    inst->changing_state--;
+    if (inst->changing_state < 0) {
+       ErrPrint("Changing state is not correct: %d\n", inst->changing_state);
+    }
+    instance_unref(inst);
 }
 
 static void reactivate_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct inst_info *inst = data;
-       enum lb_type lb_type;
-       enum pd_type pd_type;
-       int ret;
-       const char *content;
-       const char *title;
-       int is_pinned_up;
-
-       if (!packet) {
-               /*!
-                * \note
-                * instance_reload function will care this.
-                * and it will be called from the slave_activate callback
-                */
-               goto out;
-       }
+    struct inst_info *inst = data;
+    enum dynamicbox_dbox_type dbox_type;
+    enum dynamicbox_gbar_type gbar_type;
+    int ret;
+    const char *content;
+    const char *title;
+    int is_pinned_up;
 
-       if (packet_get(packet, "issi", &ret, &content, &title, &is_pinned_up) != 4) {
-               ErrPrint("Invalid parameter\n");
-               goto out;
-       }
+    if (!packet) {
+       /*!
+        * \note
+        * instance_reload function will care this.
+        * and it will be called from the slave_activate callback
+        */
+       goto out;
+    }
 
-       if (strlen(content)) {
-               char *tmp;
+    if (packet_get(packet, "issi", &ret, &content, &title, &is_pinned_up) != 4) {
+       ErrPrint("Invalid parameter\n");
+       goto out;
+    }
 
-               tmp = strdup(content);
-               if (!tmp) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       goto out;
-               }
+    if (strlen(content)) {
+       char *tmp;
 
-               DbgFree(inst->content);
-               inst->content = tmp;
+       tmp = strdup(content);
+       if (!tmp) {
+           ErrPrint("Heap: %s\n", strerror(errno));
+           goto out;
        }
 
-       if (strlen(title)) {
-               char *tmp;
+       DbgFree(inst->content);
+       inst->content = tmp;
+    }
 
-               tmp = strdup(title);
-               if (!tmp) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       goto out;
-               }
+    if (strlen(title)) {
+       char *tmp;
 
-               DbgFree(inst->title);
-               inst->title = tmp;
+       tmp = strdup(title);
+       if (!tmp) {
+           ErrPrint("Heap: %s\n", strerror(errno));
+           goto out;
        }
 
-       if (inst->state == INST_DESTROYED) {
-               /*!
-                * \note
-                * Already destroyed.
-                * Do nothing at here anymore.
-                */
-               goto out;
-       }
+       DbgFree(inst->title);
+       inst->title = tmp;
+    }
+
+    if (inst->state == INST_DESTROYED) {
+       /*!
+        * \note
+        * Already destroyed.
+        * Do nothing at here anymore.
+        */
+       goto out;
+    }
 
-       switch (ret) {
+    switch (ret) {
        case 0: /*!< normally created */
-               inst->state = INST_ACTIVATED;
-               switch (inst->requested_state) {
+           inst->state = INST_ACTIVATED;
+           switch (inst->requested_state) {
                case INST_DESTROYED:
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       break;
+                   instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+                   break;
                case INST_ACTIVATED:
-                       inst->is_pinned_up = is_pinned_up;
-                       lb_type = package_lb_type(inst->info);
-                       pd_type = package_pd_type(inst->info);
-
+                   inst->is_pinned_up = is_pinned_up;
+                   dbox_type = package_dbox_type(inst->info);
+                   gbar_type = package_gbar_type(inst->info);
+
+                   /*!
+                    * \note
+                    * Optimization point.
+                    *   In case of the BUFFER type,
+                    *   the slave will request the buffer to render its contents.
+                    *   so the buffer will be automatcially recreated when it gots the
+                    *   buffer request packet.
+                    *   so load a buffer from here is not neccessary.
+                    *   I should to revise it and concrete the concept.
+                    *   Just leave it only for now.
+                    */
+
+                   if (dbox_type == DBOX_TYPE_SCRIPT && inst->dbox.canvas.script) {
+                       script_handler_load(inst->dbox.canvas.script, 0);
+                   } else if (dbox_type == DBOX_TYPE_BUFFER && inst->dbox.canvas.buffer) {
+                       buffer_handler_load(inst->dbox.canvas.buffer);
+                   }
+
+                   if (gbar_type == GBAR_TYPE_SCRIPT && inst->gbar.canvas.script && inst->gbar.is_opened_for_reactivate) {
+                       double x, y;
                        /*!
                         * \note
-                        * Optimization point.
-                        *   In case of the BUFFER type,
-                        *   the slave will request the buffer to render its contents.
-                        *   so the buffer will be automatcially recreated when it gots the
-                        *   buffer request packet.
-                        *   so load a buffer from here is not neccessary.
-                        *   I should to revise it and concrete the concept.
-                        *   Just leave it only for now.
+                        * We should to send a request to open a GBAR to slave.
+                        * if we didn't send it, the slave will not recognize the state of a GBAR.
+                        * We have to keep the view of GBAR seamless even if the dynamicbox is reactivated.
+                        * To do that, send open request from here.
                         */
+                       ret = instance_slave_open_gbar(inst, NULL);
+                       instance_slave_get_gbar_pos(inst, &x, &y);
 
-                       if (lb_type == LB_TYPE_SCRIPT && inst->lb.canvas.script) {
-                               script_handler_load(inst->lb.canvas.script, 0);
-                       } else if (lb_type == LB_TYPE_BUFFER && inst->lb.canvas.buffer) {
-                               buffer_handler_load(inst->lb.canvas.buffer);
-                       }
+                       /*!
+                        * \note
+                        * In this case, master already loads the GBAR script.
+                        * So just send the gbar,show event to the slave again.
+                        */
+                       ret = instance_signal_emit(inst, "gbar,show", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
+                   } else if (gbar_type == GBAR_TYPE_BUFFER && inst->gbar.canvas.buffer && inst->gbar.is_opened_for_reactivate) {
+                       double x, y;
 
-                       if (pd_type == PD_TYPE_SCRIPT && inst->pd.canvas.script && inst->pd.is_opened_for_reactivate) {
-                               double x, y;
-                               /*!
-                                * \note
-                                * We should to send a request to open a PD to slave.
-                                * if we didn't send it, the slave will not recognize the state of a PD.
-                                * We have to keep the view of PD seamless even if the livebox is reactivated.
-                                * To do that, send open request from here.
-                                */
-                               ret = instance_slave_open_pd(inst, NULL);
-                               instance_slave_get_pd_pos(inst, &x, &y);
-
-                               /*!
-                                * \note
-                                * In this case, master already loads the PD script.
-                                * So just send the pd,show event to the slave again.
-                                */
-                               ret = instance_signal_emit(inst, "pd,show", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
-                       } else if (pd_type == PD_TYPE_BUFFER && inst->pd.canvas.buffer && inst->pd.is_opened_for_reactivate) {
-                               double x, y;
-
-                               buffer_handler_load(inst->pd.canvas.buffer);
-                               instance_slave_get_pd_pos(inst, &x, &y);
-
-                               /*!
-                                * \note
-                                * We should to send a request to open a PD to slave.
-                                * if we didn't send it, the slave will not recognize the state of a PD.
-                                * We have to keep the view of PD seamless even if the livebox is reactivated.
-                                * To do that, send open request from here.
-                                */
-                               ret = instance_slave_open_pd(inst, NULL);
-
-                               /*!
-                                * \note
-                                * In this case, just send the pd,show event for keeping the compatibility
-                                */
-                               ret = instance_signal_emit(inst, "pd,show", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
-                       }
+                       buffer_handler_load(inst->gbar.canvas.buffer);
+                       instance_slave_get_gbar_pos(inst, &x, &y);
 
                        /*!
                         * \note
-                        * After create an instance again,
-                        * Send resize request to the livebox.
-                        * instance_resize(inst, inst->lb.width, inst->lb.height);
-                        *
-                        * renew request will resize the livebox while creating it again
+                        * We should to send a request to open a GBAR to slave.
+                        * if we didn't send it, the slave will not recognize the state of a GBAR.
+                        * We have to keep the view of GBAR seamless even if the dynamicbox is reactivated.
+                        * To do that, send open request from here.
                         */
+                       ret = instance_slave_open_gbar(inst, NULL);
 
                        /*!
                         * \note
-                        * This function will check the visiblity of a livebox and
-                        * make decision whether it thaw the update timer or not.
+                        * In this case, just send the gbar,show event for keeping the compatibility
                         */
-                       instance_recover_visible_state(inst);
+                       ret = instance_signal_emit(inst, "gbar,show", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
+                   }
+
+                   /*!
+                    * \note
+                    * After create an instance again,
+                    * Send resize request to the dynamicbox.
+                    * instance_resize(inst, inst->dbox.width, inst->dbox.height);
+                    *
+                    * renew request will resize the dynamicbox while creating it again
+                    */
+
+                   /*!
+                    * \note
+                    * This function will check the visiblity of a dynamicbox and
+                    * make decision whether it thaw the update timer or not.
+                    */
+                   instance_recover_visible_state(inst);
                default:
-                       break;
-               }
-               break;
+                   break;
+           }
+           break;
        default:
-               instance_broadcast_deleted_event(inst, ret);
-               instance_state_reset(inst);
-               instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-               break;
-       }
+           instance_broadcast_deleted_event(inst, ret);
+           instance_state_reset(inst);
+           instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+           break;
+    }
 
 out:
-       inst->changing_state--;
-       if (inst->changing_state < 0) {
-               ErrPrint("Changing state is not correct: %d\n", inst->changing_state);
-       }
-       instance_unref(inst);
+    inst->changing_state--;
+    if (inst->changing_state < 0) {
+       ErrPrint("Changing state is not correct: %d\n", inst->changing_state);
+    }
+    instance_unref(inst);
 }
 
 static void activate_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct inst_info *inst = data;
-       int ret;
-       int w;
-       int h;
-       double priority;
-       char *content;
-       char *title;
-       int is_pinned_up;
+    struct inst_info *inst = data;
+    int ret;
+    int w;
+    int h;
+    double priority;
+    char *content;
+    char *title;
+    int is_pinned_up;
 
-       if (!packet) {
-               /*!
-                * \note
-                * instance_reload will care this
-                * it will be called from the slave_activate callback
-                */
-               goto out;
-       }
+    if (!packet) {
+       /*!
+        * \note
+        * instance_reload will care this
+        * it will be called from the slave_activate callback
+        */
+       goto out;
+    }
 
-       if (packet_get(packet, "iiidssi", &ret, &w, &h, &priority, &content, &title, &is_pinned_up) != 7) {
-               ErrPrint("Invalid parameter\n");
-               goto out;
-       }
+    if (packet_get(packet, "iiidssi", &ret, &w, &h, &priority, &content, &title, &is_pinned_up) != 7) {
+       ErrPrint("Invalid parameter\n");
+       goto out;
+    }
 
-       DbgPrint("[%s] returns %d (state: 0x%X)\n", inst->id, ret, inst->state);
+    DbgPrint("[%s] returns %d (state: 0x%X)\n", inst->id, ret, inst->state);
 
-       if (inst->state == INST_DESTROYED) {
-               /*!
-                * \note
-                * Already destroyed.
-                * Do nothing at here anymore.
-                */
-               goto out;
-       }
+    if (inst->state == INST_DESTROYED) {
+       /*!
+        * \note
+        * Already destroyed.
+        * Do nothing at here anymore.
+        */
+       goto out;
+    }
 
-       switch (ret) {
+    switch (ret) {
        case 1: /*!< need to create */
-               if (util_free_space(IMAGE_PATH) > MINIMUM_SPACE) {
-                       struct inst_info *new_inst;
-                       new_inst = instance_create(inst->client, util_timestamp(), package_name(inst->info),
-                                                       inst->content, inst->cluster, inst->category,
-                                                       inst->lb.period, 0, 0);
-                       if (!new_inst) {
-                               ErrPrint("Failed to create a new instance\n");
-                       }
-               } else {
-                       ErrPrint("Not enough space\n");
+           if (util_free_space(DYNAMICBOX_CONF_IMAGE_PATH) > DYNAMICBOX_CONF_MINIMUM_SPACE) {
+               struct inst_info *new_inst;
+               new_inst = instance_create(inst->client, util_timestamp(), package_name(inst->info),
+                       inst->content, inst->cluster, inst->category,
+                       inst->dbox.period, 0, 0);
+               if (!new_inst) {
+                   ErrPrint("Failed to create a new instance\n");
                }
+           } else {
+               ErrPrint("Not enough space\n");
+           }
        case 0: /*!< normally created */
-               /*!
-                * \note
-                * Anyway this instance is loaded to the slave,
-                * just increase the loaded instance counter
-                * And then reset jobs.
-                */
-               instance_set_lb_size(inst, w, h);
-               instance_set_lb_info(inst, priority, content, title);
-
-               inst->state = INST_ACTIVATED;
-
-               switch (inst->requested_state) {
+           /*!
+            * \note
+            * Anyway this instance is loaded to the slave,
+            * just increase the loaded instance counter
+            * And then reset jobs.
+            */
+           instance_set_dbox_size(inst, w, h);
+           instance_set_dbox_info(inst, priority, content, title);
+
+           inst->state = INST_ACTIVATED;
+
+           switch (inst->requested_state) {
                case INST_DESTROYED:
-                       /**
-                        * In this case, we should destroy the instance.
-                        */
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       break;
+                   /**
+                    * In this case, we should destroy the instance.
+                    */
+                   instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+                   break;
                case INST_ACTIVATED:
                default:
-                       /*!
-                        * \note
-                        * LB should be created at the create time
-                        */
-                       inst->is_pinned_up = is_pinned_up;
-                       if (package_lb_type(inst->info) == LB_TYPE_SCRIPT) {
-                               if (inst->lb.width == 0 && inst->lb.height == 0) {
-                                       livebox_service_get_size(LB_SIZE_TYPE_1x1, &inst->lb.width, &inst->lb.height);
-                               }
-
-                               inst->lb.canvas.script = script_handler_create(inst,
-                                                               package_lb_path(inst->info),
-                                                               package_lb_group(inst->info),
-                                                               inst->lb.width, inst->lb.height);
-
-                               if (!inst->lb.canvas.script) {
-                                       ErrPrint("Failed to create LB\n");
-                               } else {
-                                       script_handler_load(inst->lb.canvas.script, 0);
-                               }
-                       } else if (package_lb_type(inst->info) == LB_TYPE_BUFFER) {
-                               instance_create_lb_buffer(inst, DEFAULT_PIXELS);
+                   /**
+                    * @note
+                    * DBOX should be created at the create time
+                    */
+                   inst->is_pinned_up = is_pinned_up;
+                   if (package_dbox_type(inst->info) == DBOX_TYPE_SCRIPT) {
+                       if (inst->dbox.width == 0 && inst->dbox.height == 0) {
+                           dynamicbox_service_get_size(DBOX_SIZE_TYPE_1x1, &inst->dbox.width, &inst->dbox.height);
                        }
 
-                       if (package_pd_type(inst->info) == PD_TYPE_SCRIPT) {
-                               if (inst->pd.width == 0 && inst->pd.height == 0) {
-                                       instance_set_pd_size(inst, package_pd_width(inst->info), package_pd_height(inst->info));
-                               }
-
-                               inst->pd.canvas.script = script_handler_create(inst,
-                                                               package_pd_path(inst->info),
-                                                               package_pd_group(inst->info),
-                                                               inst->pd.width, inst->pd.height);
-
-                               if (!inst->pd.canvas.script) {
-                                       ErrPrint("Failed to create PD\n");
-                               }
-                       } else if (package_pd_type(inst->info) == PD_TYPE_BUFFER) {
-                               instance_create_pd_buffer(inst, DEFAULT_PIXELS);
+                       inst->dbox.canvas.script = script_handler_create(inst,
+                               package_dbox_path(inst->info),
+                               package_dbox_group(inst->info),
+                               inst->dbox.width, inst->dbox.height);
+
+                       if (!inst->dbox.canvas.script) {
+                           ErrPrint("Failed to create DBOX\n");
+                       } else {
+                           script_handler_load(inst->dbox.canvas.script, 0);
                        }
+                   } else if (package_dbox_type(inst->info) == DBOX_TYPE_BUFFER) {
+                       instance_create_dbox_buffer(inst, DYNAMICBOX_CONF_DEFAULT_PIXELS);
+                   }
 
-                       instance_broadcast_created_event(inst);
+                   if (package_gbar_type(inst->info) == GBAR_TYPE_SCRIPT) {
+                       if (inst->gbar.width == 0 && inst->gbar.height == 0) {
+                           instance_set_gbar_size(inst, package_gbar_width(inst->info), package_gbar_height(inst->info));
+                       }
 
-                       instance_thaw_updator(inst);
-                       break;
-               }
-               break;
+                       inst->gbar.canvas.script = script_handler_create(inst,
+                               package_gbar_path(inst->info),
+                               package_gbar_group(inst->info),
+                               inst->gbar.width, inst->gbar.height);
+
+                       if (!inst->gbar.canvas.script) {
+                           ErrPrint("Failed to create GBAR\n");
+                       }
+                   } else if (package_gbar_type(inst->info) == GBAR_TYPE_BUFFER) {
+                       instance_create_gbar_buffer(inst, DYNAMICBOX_CONF_DEFAULT_PIXELS);
+                   }
+
+                   instance_broadcast_created_event(inst);
+
+                   instance_thaw_updator(inst);
+                   break;
+           }
+           break;
        default:
-               instance_unicast_deleted_event(inst, NULL, ret);
-               instance_state_reset(inst);
-               instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-               break;
-       }
+           instance_unicast_deleted_event(inst, NULL, ret);
+           instance_state_reset(inst);
+           instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+           break;
+    }
 
 out:
-       inst->changing_state--;
-       if (inst->changing_state < 0) {
-               ErrPrint("Changing state is not correct: %d\n", inst->changing_state);
-       }
-       instance_unref(inst);
+    inst->changing_state--;
+    if (inst->changing_state < 0) {
+       ErrPrint("Changing state is not correct: %d\n", inst->changing_state);
+    }
+    instance_unref(inst);
 }
 
-HAPI int instance_create_pd_buffer(struct inst_info *inst, int pixels)
+HAPI int instance_create_gbar_buffer(struct inst_info *inst, int pixels)
 {
-       if (inst->pd.width == 0 && inst->pd.height == 0) {
-               instance_set_pd_size(inst, package_pd_width(inst->info), package_pd_height(inst->info));
-       }
+    if (inst->gbar.width == 0 && inst->gbar.height == 0) {
+       instance_set_gbar_size(inst, package_gbar_width(inst->info), package_gbar_height(inst->info));
+    }
 
-       if (!inst->pd.canvas.buffer) {
-               inst->pd.canvas.buffer = buffer_handler_create(inst, s_info.env_buf_type, inst->pd.width, inst->pd.height, pixels);
-               if (!inst->pd.canvas.buffer) {
-                       ErrPrint("Failed to create PD Buffer\n");
-               }
+    if (!inst->gbar.canvas.buffer) {
+       inst->gbar.canvas.buffer = buffer_handler_create(inst, s_info.env_buf_type, inst->gbar.width, inst->gbar.height, pixels);
+       if (!inst->gbar.canvas.buffer) {
+           ErrPrint("Failed to create GBAR Buffer\n");
        }
+    }
 
-       return !!inst->pd.canvas.buffer;
+    return !!inst->gbar.canvas.buffer;
 }
 
-HAPI int instance_create_lb_buffer(struct inst_info *inst, int pixels)
+HAPI int instance_create_gbar_extra_buffer(struct inst_info *inst, int pixels, int idx)
 {
-       if (inst->lb.width == 0 && inst->lb.height == 0) {
-               livebox_service_get_size(LB_SIZE_TYPE_1x1, &inst->lb.width, &inst->lb.height);
+    if (!inst->gbar.extra_buffer) {
+       return 0;
+    }
+
+    if (inst->gbar.width == 0 && inst->gbar.height == 0) {
+       instance_set_gbar_size(inst, package_gbar_width(inst->info), package_gbar_height(inst->info));
+    }
+
+    if (!inst->gbar.extra_buffer[idx]) {
+       inst->gbar.extra_buffer[idx] = buffer_handler_create(inst, s_info.env_buf_type, inst->gbar.width, inst->gbar.height, pixels);
+       if (!inst->gbar.extra_buffer[idx]) {
+           ErrPrint("Failed to create GBAR Extra Buffer\n");
        }
+    }
 
-       if (!inst->lb.canvas.buffer) {
-               /*!
-                * \note
-                * Slave doesn't call the acquire_buffer.
-                * In this case, create the buffer from here.
-                */
-               inst->lb.canvas.buffer = buffer_handler_create(inst, s_info.env_buf_type, inst->lb.width, inst->lb.height, pixels);
-               if (!inst->lb.canvas.buffer) {
-                       ErrPrint("Failed to create LB\n");
-               }
+    return !!inst->gbar.extra_buffer[idx];
+}
+
+HAPI int instance_create_dbox_buffer(struct inst_info *inst, int pixels)
+{
+    if (inst->dbox.width == 0 && inst->dbox.height == 0) {
+       dynamicbox_service_get_size(DBOX_SIZE_TYPE_1x1, &inst->dbox.width, &inst->dbox.height);
+    }
+
+    if (!inst->dbox.canvas.buffer) {
+       /*!
+        * \note
+        * Slave doesn't call the acquire_buffer.
+        * In this case, create the buffer from here.
+        */
+       inst->dbox.canvas.buffer = buffer_handler_create(inst, s_info.env_buf_type, inst->dbox.width, inst->dbox.height, pixels);
+       if (!inst->dbox.canvas.buffer) {
+           ErrPrint("Failed to create DBOX\n");
        }
+    }
 
-       return !!inst->lb.canvas.buffer;
+    return !!inst->dbox.canvas.buffer;
 }
 
-HAPI int instance_destroy(struct inst_info *inst, enum instance_destroy_type type)
+HAPI int instance_create_dbox_extra_buffer(struct inst_info *inst, int pixels, int idx)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_DELETE;
+    if (!inst->dbox.extra_buffer) {
+       return 0;
+    }
+
+    if (inst->dbox.width == 0 && inst->dbox.height == 0) {
+       dynamicbox_service_get_size(DBOX_SIZE_TYPE_1x1, &inst->dbox.width, &inst->dbox.height);
+    }
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
+    if (!inst->dbox.extra_buffer[idx]) {
+       inst->dbox.extra_buffer[idx] = buffer_handler_create(inst, s_info.env_buf_type, inst->dbox.width, inst->dbox.height, pixels);
+       if (!inst->dbox.extra_buffer[idx]) {
+           ErrPrint("Failed to create DBox Extra buffer\n");
        }
+    }
 
-       switch (inst->state) {
+    return !!inst->dbox.extra_buffer[idx];
+}
+
+HAPI int instance_destroy(struct inst_info *inst, dynamicbox_destroy_type_e type)
+{
+    struct packet *packet;
+    unsigned int cmd = CMD_DELETE;
+
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    switch (inst->state) {
        case INST_REQUEST_TO_ACTIVATE:
        case INST_REQUEST_TO_DESTROY:
        case INST_REQUEST_TO_REACTIVATE:
-               inst->requested_state = INST_DESTROYED;
-               return LB_STATUS_SUCCESS;
+           inst->requested_state = INST_DESTROYED;
+           return DBOX_STATUS_ERROR_NONE;
        case INST_INIT:
-               inst->state = INST_DESTROYED;
-               inst->requested_state = INST_DESTROYED;
-               (void)instance_unref(inst);
-               return LB_STATUS_SUCCESS;
+           inst->state = INST_DESTROYED;
+           inst->requested_state = INST_DESTROYED;
+           (void)instance_unref(inst);
+           return DBOX_STATUS_ERROR_NONE;
        case INST_DESTROYED:
-               inst->requested_state = INST_DESTROYED;
-               return LB_STATUS_SUCCESS;
+           inst->requested_state = INST_DESTROYED;
+           return DBOX_STATUS_ERROR_NONE;
        default:
-               break;
-       }
+           break;
+    }
 
-       packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, type);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, type);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       inst->destroy_type = type;
-       inst->requested_state = INST_DESTROYED;
-       inst->state = INST_REQUEST_TO_DESTROY;
-       inst->changing_state++;
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, deactivate_cb, instance_ref(inst), 0);
+    inst->destroy_type = type;
+    inst->requested_state = INST_DESTROYED;
+    inst->state = INST_REQUEST_TO_DESTROY;
+    inst->changing_state++;
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, deactivate_cb, instance_ref(inst), 0);
 }
 
-HAPI int instance_reload(struct inst_info *inst, enum instance_destroy_type type)
+HAPI int instance_reload(struct inst_info *inst, dynamicbox_destroy_type_e type)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_DELETE;
-       int ret;
+    struct packet *packet;
+    unsigned int cmd = CMD_DELETE;
+    int ret;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       DbgPrint("Reload instance (%s)\n", instance_id(inst));
+    DbgPrint("Reload instance (%s)\n", instance_id(inst));
 
-       switch (inst->state) {
+    switch (inst->state) {
        case INST_REQUEST_TO_ACTIVATE:
        case INST_REQUEST_TO_REACTIVATE:
-               return LB_STATUS_SUCCESS;
+           return DBOX_STATUS_ERROR_NONE;
        case INST_INIT:
-               ret = instance_activate(inst);
-               if (ret < 0) {
-                       ErrPrint("Failed to activate instance: %d (%s)\n", ret, instance_id(inst));
-               }
-               return LB_STATUS_SUCCESS;
+           ret = instance_activate(inst);
+           if (ret < 0) {
+               ErrPrint("Failed to activate instance: %d (%s)\n", ret, instance_id(inst));
+           }
+           return DBOX_STATUS_ERROR_NONE;
        case INST_DESTROYED:
        case INST_REQUEST_TO_DESTROY:
-               DbgPrint("Instance is destroying now\n");
-               return LB_STATUS_SUCCESS;
+           DbgPrint("Instance is destroying now\n");
+           return DBOX_STATUS_ERROR_NONE;
        default:
-               break;
-       }
+           break;
+    }
 
-       packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, type);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, type);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       inst->destroy_type = type;
-       inst->requested_state = INST_ACTIVATED;
-       inst->state = INST_REQUEST_TO_DESTROY;
-       inst->changing_state++;
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, deactivate_cb, instance_ref(inst), 0);
+    inst->destroy_type = type;
+    inst->requested_state = INST_ACTIVATED;
+    inst->state = INST_REQUEST_TO_DESTROY;
+    inst->changing_state++;
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, deactivate_cb, instance_ref(inst), 0);
 }
 
 /* Client Deactivated Callback */
-static int pd_buffer_close_cb(struct client_node *client, void *inst)
+static int gbar_buffer_close_cb(struct client_node *client, void *inst)
 {
-       int ret;
+    int ret;
 
-       ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_NORMAL);
-       if (ret < 0) {
-               DbgPrint("Forcely close the PD ret: %d\n", ret);
-       }
+    ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_NORMAL);
+    if (ret < 0) {
+       DbgPrint("Forcely close the GBAR ret: %d\n", ret);
+    }
 
-       instance_unref(inst);
+    instance_unref(inst);
 
-       return -1; /* Delete this callback */
+    return -1; /* Delete this callback */
 }
 
 /* Client Deactivated Callback */
-static int pd_script_close_cb(struct client_node *client, void *inst)
+static int gbar_script_close_cb(struct client_node *client, void *inst)
 {
-       int ret;
+    int ret;
 
-       ret = script_handler_unload(instance_pd_script(inst), 1);
-       if (ret < 0) {
-               DbgPrint("Unload script: %d\n", ret);
-       }
+    ret = script_handler_unload(instance_gbar_script(inst), 1);
+    if (ret < 0) {
+       DbgPrint("Unload script: %d\n", ret);
+    }
 
-       ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_NORMAL);
-       if (ret < 0) {
-               DbgPrint("Forcely close the PD ret: %d\n", ret);
-       }
+    ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_NORMAL);
+    if (ret < 0) {
+       DbgPrint("Forcely close the GBAR ret: %d\n", ret);
+    }
 
-       instance_unref(inst);
+    instance_unref(inst);
 
-       return -1; /* Delete this callback */
+    return -1; /* Delete this callback */
 }
 
-static inline void release_resource_for_closing_pd(struct pkg_info *info, struct inst_info *inst, struct client_node *client)
+static inline void release_resource_for_closing_gbar(struct pkg_info *info, struct inst_info *inst, struct client_node *client)
 {
+    if (!client) {
+       client = inst->gbar.owner;
        if (!client) {
-               client = inst->pd.owner;
-               if (!client) {
-                       return;
-               }
-       }
-
-       /*!
-        * \note
-        * Clean up the resources
-        */
-       if (package_pd_type(info) == PD_TYPE_BUFFER) {
-               if (client_event_callback_del(client, CLIENT_EVENT_DEACTIVATE, pd_buffer_close_cb, inst) == 0) {
-                       /*!
-                        * \note
-                        * Only if this function succeed to remove the pd_buffer_close_cb,
-                        * Decrease the reference count of this instance
-                        */
-                       instance_unref(inst);
-               }
-       } else if (package_pd_type(info) == PD_TYPE_SCRIPT) {
-               if (client_event_callback_del(client, CLIENT_EVENT_DEACTIVATE, pd_script_close_cb, inst) == 0) {
-                       /*!
-                        * \note
-                        * Only if this function succeed to remove the script_close_cb,
-                        * Decrease the reference count of this instance
-                        */
-                       instance_unref(inst);
-               }
-       } else {
-               ErrPrint("Unknown PD type\n");
-       }
+           return;
+       }
+    }
+
+    /*!
+     * \note
+     * Clean up the resources
+     */
+    if (package_gbar_type(info) == GBAR_TYPE_BUFFER) {
+       if (client_event_callback_del(client, CLIENT_EVENT_DEACTIVATE, gbar_buffer_close_cb, inst) == 0) {
+           /*!
+            * \note
+            * Only if this function succeed to remove the gbar_buffer_close_cb,
+            * Decrease the reference count of this instance
+            */
+           instance_unref(inst);
+       }
+    } else if (package_gbar_type(info) == GBAR_TYPE_SCRIPT) {
+       if (client_event_callback_del(client, CLIENT_EVENT_DEACTIVATE, gbar_script_close_cb, inst) == 0) {
+           /*!
+            * \note
+            * Only if this function succeed to remove the script_close_cb,
+            * Decrease the reference count of this instance
+            */
+           instance_unref(inst);
+       }
+    } else {
+       ErrPrint("Unknown GBAR type\n");
+    }
 
 }
 
 HAPI int instance_state_reset(struct inst_info *inst)
 {
-       enum lb_type lb_type;
-       enum pd_type pd_type;
-
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       if (inst->state == INST_DESTROYED) {
-               goto out;
-       }
-
-       lb_type = package_lb_type(inst->info);
-       pd_type = package_pd_type(inst->info);
-
-       if (lb_type == LB_TYPE_SCRIPT && inst->lb.canvas.script) {
-               script_handler_unload(inst->lb.canvas.script, 0);
-       } else if (lb_type == LB_TYPE_BUFFER && inst->lb.canvas.buffer) {
-               buffer_handler_unload(inst->lb.canvas.buffer);
-       }
-
-       if (pd_type == PD_TYPE_SCRIPT && inst->pd.canvas.script) {
-               inst->pd.is_opened_for_reactivate = script_handler_is_loaded(inst->pd.canvas.script);
-               release_resource_for_closing_pd(instance_package(inst), inst, NULL);
-               script_handler_unload(inst->pd.canvas.script, 1);
-       } else if (pd_type == PD_TYPE_BUFFER && inst->pd.canvas.buffer) {
-               inst->pd.is_opened_for_reactivate = buffer_handler_is_loaded(inst->pd.canvas.buffer);
-               release_resource_for_closing_pd(instance_package(inst), inst, NULL);
-               buffer_handler_unload(inst->pd.canvas.buffer);
-       }
+    enum dynamicbox_dbox_type dbox_type;
+    enum dynamicbox_gbar_type gbar_type;
+
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    if (inst->state == INST_DESTROYED) {
+       goto out;
+    }
+
+    dbox_type = package_dbox_type(inst->info);
+    gbar_type = package_gbar_type(inst->info);
+
+    if (dbox_type == DBOX_TYPE_SCRIPT && inst->dbox.canvas.script) {
+       script_handler_unload(inst->dbox.canvas.script, 0);
+    } else if (dbox_type == DBOX_TYPE_BUFFER && inst->dbox.canvas.buffer) {
+       buffer_handler_unload(inst->dbox.canvas.buffer);
+    }
+
+    if (gbar_type == GBAR_TYPE_SCRIPT && inst->gbar.canvas.script) {
+       inst->gbar.is_opened_for_reactivate = script_handler_is_loaded(inst->gbar.canvas.script);
+       release_resource_for_closing_gbar(instance_package(inst), inst, NULL);
+       script_handler_unload(inst->gbar.canvas.script, 1);
+    } else if (gbar_type == GBAR_TYPE_BUFFER && inst->gbar.canvas.buffer) {
+       inst->gbar.is_opened_for_reactivate = buffer_handler_is_loaded(inst->gbar.canvas.buffer);
+       release_resource_for_closing_gbar(instance_package(inst), inst, NULL);
+       buffer_handler_unload(inst->gbar.canvas.buffer);
+    }
 
 out:
-       inst->state = INST_INIT;
-       inst->requested_state = INST_INIT;
-       return LB_STATUS_SUCCESS;
+    inst->state = INST_INIT;
+    inst->requested_state = INST_INIT;
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int instance_reactivate(struct inst_info *inst)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_RENEW;
-       int ret;
+    struct packet *packet;
+    unsigned int cmd = CMD_RENEW;
+    int ret;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       switch (inst->state) {
+    switch (inst->state) {
        case INST_REQUEST_TO_DESTROY:
        case INST_REQUEST_TO_ACTIVATE:
        case INST_REQUEST_TO_REACTIVATE:
-               inst->requested_state = INST_ACTIVATED;
-               return LB_STATUS_SUCCESS;
+           inst->requested_state = INST_ACTIVATED;
+           return DBOX_STATUS_ERROR_NONE;
        case INST_DESTROYED:
        case INST_ACTIVATED:
-               return LB_STATUS_SUCCESS;
+           return DBOX_STATUS_ERROR_NONE;
        case INST_INIT:
        default:
-               break;
-       }
-
-       packet = packet_create((const char *)&cmd, "sssiidssiisiis",
-                       package_name(inst->info),
-                       inst->id,
-                       inst->content,
-                       package_timeout(inst->info),
-                       !!package_lb_path(inst->info),
-                       inst->lb.period,
-                       inst->cluster,
-                       inst->category,
-                       inst->lb.width, inst->lb.height,
-                       package_abi(inst->info),
-                       inst->scroll_locked,
-                       inst->active_update,
-                       client_direct_addr(inst->client));
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       ret = slave_activate(package_slave(inst->info));
-       if (ret < 0 && ret != LB_STATUS_ERROR_ALREADY) {
-               /*!
-                * \note
-                * If the master failed to launch the slave,
-                * Do not send any requests to the slave.
-                */
-               ErrPrint("Failed to launch the slave\n");
-               packet_destroy(packet);
-               return ret;
-       }
+           break;
+    }
+
+    packet = packet_create((const char *)&cmd, "sssiidssiisiis",
+           package_name(inst->info),
+           inst->id,
+           inst->content,
+           package_timeout(inst->info),
+           !!package_dbox_path(inst->info),
+           inst->dbox.period,
+           inst->cluster,
+           inst->category,
+           inst->dbox.width, inst->dbox.height,
+           package_abi(inst->info),
+           inst->scroll_locked,
+           inst->active_update,
+           client_direct_addr(inst->client));
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    ret = slave_activate(package_slave(inst->info));
+    if (ret < 0 && ret != DBOX_STATUS_ERROR_ALREADY) {
+       /*!
+        * \note
+        * If the master failed to launch the slave,
+        * Do not send any requests to the slave.
+        */
+       ErrPrint("Failed to launch the slave\n");
+       packet_destroy(packet);
+       return ret;
+    }
 
-       inst->requested_state = INST_ACTIVATED;
-       inst->state = INST_REQUEST_TO_REACTIVATE;
-       inst->changing_state++;
+    inst->requested_state = INST_ACTIVATED;
+    inst->state = INST_REQUEST_TO_REACTIVATE;
+    inst->changing_state++;
 
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, reactivate_cb, instance_ref(inst), 1);
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, reactivate_cb, instance_ref(inst), 1);
 }
 
 HAPI int instance_activate(struct inst_info *inst)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_NEW;
-       int ret;
+    struct packet *packet;
+    unsigned int cmd = CMD_NEW;
+    int ret;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       switch (inst->state) {
+    switch (inst->state) {
        case INST_REQUEST_TO_REACTIVATE:
        case INST_REQUEST_TO_ACTIVATE:
        case INST_REQUEST_TO_DESTROY:
-               inst->requested_state = INST_ACTIVATED;
-               return LB_STATUS_SUCCESS;
+           inst->requested_state = INST_ACTIVATED;
+           return DBOX_STATUS_ERROR_NONE;
        case INST_ACTIVATED:
        case INST_DESTROYED:
-               return LB_STATUS_SUCCESS;
+           return DBOX_STATUS_ERROR_NONE;
        case INST_INIT:
        default:
-               break;
-       }
-
-       packet = packet_create((const char *)&cmd, "sssiidssisiis",
-                       package_name(inst->info),
-                       inst->id,
-                       inst->content,
-                       package_timeout(inst->info),
-                       !!package_lb_path(inst->info),
-                       inst->lb.period,
-                       inst->cluster,
-                       inst->category,
-                       !!inst->client,
-                       package_abi(inst->info),
-                       inst->lb.width,
-                       inst->lb.height,
-                       client_direct_addr(inst->client));
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       ret = slave_activate(package_slave(inst->info));
-       if (ret < 0 && ret != LB_STATUS_ERROR_ALREADY) {
-               /*!
-                * \note
-                * If the master failed to launch the slave,
-                * Do not send any requests to the slave.
-                */
-               ErrPrint("Failed to launch the slave\n");
-               packet_destroy(packet);
-               return ret;
-       }
-
-       inst->state = INST_REQUEST_TO_ACTIVATE;
-       inst->requested_state = INST_ACTIVATED;
-       inst->changing_state++;
-
+           break;
+    }
+
+    packet = packet_create((const char *)&cmd, "sssiidssisiis",
+           package_name(inst->info),
+           inst->id,
+           inst->content,
+           package_timeout(inst->info),
+           !!package_dbox_path(inst->info),
+           inst->dbox.period,
+           inst->cluster,
+           inst->category,
+           !!inst->client,
+           package_abi(inst->info),
+           inst->dbox.width,
+           inst->dbox.height,
+           client_direct_addr(inst->client));
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    ret = slave_activate(package_slave(inst->info));
+    if (ret < 0 && ret != DBOX_STATUS_ERROR_ALREADY) {
        /*!
         * \note
-        * Try to activate a slave if it is not activated
+        * If the master failed to launch the slave,
+        * Do not send any requests to the slave.
         */
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, activate_cb, instance_ref(inst), 1);
-}
-
-HAPI int instance_lb_update_begin(struct inst_info *inst, double priority, const char *content, const char *title)
-{
-       struct packet *packet;
-       const char *fbfile;
-       unsigned int cmd = CMD_LB_UPDATE_BEGIN;
-
-       if (!inst->active_update) {
-               ErrPrint("Invalid request [%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       switch (package_lb_type(inst->info)) {
-       case LB_TYPE_BUFFER:
-               if (!inst->lb.canvas.buffer) {
-                       ErrPrint("Buffer is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               fbfile = buffer_handler_id(inst->lb.canvas.buffer);
-               break;
-       case LB_TYPE_SCRIPT:
-               if (!inst->lb.canvas.script) {
-                       ErrPrint("Script is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               fbfile = script_handler_buffer_id(inst->lb.canvas.script);
-               break;
+       ErrPrint("Failed to launch the slave\n");
+       packet_destroy(packet);
+       return ret;
+    }
+
+    inst->state = INST_REQUEST_TO_ACTIVATE;
+    inst->requested_state = INST_ACTIVATED;
+    inst->changing_state++;
+
+    /*!
+     * \note
+     * Try to activate a slave if it is not activated
+     */
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, activate_cb, instance_ref(inst), 1);
+}
+
+HAPI int instance_dbox_update_begin(struct inst_info *inst, double priority, const char *content, const char *title)
+{
+    struct packet *packet;
+    const char *fbfile;
+    unsigned int cmd = CMD_DBOX_UPDATE_BEGIN;
+
+    if (!inst->active_update) {
+       ErrPrint("Invalid request [%s]\n", inst->id);
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    switch (package_dbox_type(inst->info)) {
+       case DBOX_TYPE_BUFFER:
+           if (!inst->dbox.canvas.buffer) {
+               ErrPrint("Buffer is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           fbfile = buffer_handler_id(inst->dbox.canvas.buffer);
+           break;
+       case DBOX_TYPE_SCRIPT:
+           if (!inst->dbox.canvas.script) {
+               ErrPrint("Script is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           fbfile = script_handler_buffer_id(inst->dbox.canvas.script);
+           break;
        default:
-               ErrPrint("Invalid request[%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       packet = packet_create_noack((const char *)&cmd, "ssdsss", package_name(inst->info), inst->id, priority, content, title, fbfile);
-       if (!packet) {
-               ErrPrint("Unable to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       return CLIENT_SEND_EVENT(inst, packet);
-}
-
-HAPI int instance_lb_update_end(struct inst_info *inst)
-{
-       struct packet *packet;
-       unsigned int cmd = CMD_LB_UPDATE_END;
-
-       if (!inst->active_update) {
-               ErrPrint("Invalid request [%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       switch (package_lb_type(inst->info)) {
-       case LB_TYPE_BUFFER:
-               if (!inst->lb.canvas.buffer) {
-                       ErrPrint("Buffer is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               break;
-       case LB_TYPE_SCRIPT:
-               if (!inst->lb.canvas.script) {
-                       ErrPrint("Script is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               break;
+           ErrPrint("Invalid request[%s]\n", inst->id);
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "ssdsss", package_name(inst->info), inst->id, priority, content, title, fbfile);
+    if (!packet) {
+       ErrPrint("Unable to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    return CLIENT_SEND_EVENT(inst, packet);
+}
+
+HAPI int instance_dbox_update_end(struct inst_info *inst)
+{
+    struct packet *packet;
+    unsigned int cmd = CMD_DBOX_UPDATE_END;
+
+    if (!inst->active_update) {
+       ErrPrint("Invalid request [%s]\n", inst->id);
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    switch (package_dbox_type(inst->info)) {
+       case DBOX_TYPE_BUFFER:
+           if (!inst->dbox.canvas.buffer) {
+               ErrPrint("Buffer is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           break;
+       case DBOX_TYPE_SCRIPT:
+           if (!inst->dbox.canvas.script) {
+               ErrPrint("Script is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           break;
        default:
-               ErrPrint("Invalid request[%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
-       }
+           ErrPrint("Invalid request[%s]\n", inst->id);
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
+    if (!packet) {
+       ErrPrint("Unable to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    return CLIENT_SEND_EVENT(inst, packet);
+}
+
+HAPI int instance_gbar_update_begin(struct inst_info *inst)
+{
+    struct packet *packet;
+    const char *fbfile;
+    unsigned int cmd = CMD_GBAR_UPDATE_BEGIN;
+
+    if (!inst->active_update) {
+       ErrPrint("Invalid request [%s]\n", inst->id);
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    switch (package_gbar_type(inst->info)) {
+       case GBAR_TYPE_BUFFER:
+           if (!inst->gbar.canvas.buffer) {
+               ErrPrint("Buffer is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           fbfile = buffer_handler_id(inst->gbar.canvas.buffer);
+           break;
+       case GBAR_TYPE_SCRIPT:
+           if (!inst->gbar.canvas.script) {
+               ErrPrint("Script is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           fbfile = script_handler_buffer_id(inst->gbar.canvas.script);
+           break;
+       default:
+           ErrPrint("Invalid request[%s]\n", inst->id);
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "sss", package_name(inst->info), inst->id, fbfile);
+    if (!packet) {
+       ErrPrint("Unable to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    return CLIENT_SEND_EVENT(inst, packet);
+}
+
+HAPI int instance_gbar_update_end(struct inst_info *inst)
+{
+    struct packet *packet;
+    unsigned int cmd = CMD_GBAR_UPDATE_END;
+
+    if (!inst->active_update) {
+       ErrPrint("Invalid request [%s]\n", inst->id);
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    switch (package_gbar_type(inst->info)) {
+       case GBAR_TYPE_BUFFER:
+           if (!inst->gbar.canvas.buffer) {
+               ErrPrint("Buffer is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           break;
+       case GBAR_TYPE_SCRIPT:
+           if (!inst->gbar.canvas.script) {
+               ErrPrint("Script is null [%s]\n", inst->id);
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+           }
+           break;
+       default:
+           ErrPrint("Invalid request[%s]\n", inst->id);
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
-       if (!packet) {
-               ErrPrint("Unable to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
+    if (!packet) {
+       ErrPrint("Unable to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return CLIENT_SEND_EVENT(inst, packet);
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI int instance_pd_update_begin(struct inst_info *inst)
+HAPI void instance_extra_info_updated_by_instance(struct inst_info *inst)
 {
-       struct packet *packet;
-       const char *fbfile;
-       unsigned int cmd = CMD_PD_UPDATE_BEGIN;
-
-       if (!inst->active_update) {
-               ErrPrint("Invalid request [%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
-       }
+    struct packet *packet;
+    unsigned int cmd = CMD_EXTRA_INFO;
 
-       switch (package_pd_type(inst->info)) {
-       case PD_TYPE_BUFFER:
-               if (!inst->pd.canvas.buffer) {
-                       ErrPrint("Buffer is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               fbfile = buffer_handler_id(inst->pd.canvas.buffer);
-               break;
-       case PD_TYPE_SCRIPT:
-               if (!inst->pd.canvas.script) {
-                       ErrPrint("Script is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               fbfile = script_handler_buffer_id(inst->pd.canvas.script);
-               break;
-       default:
-               ErrPrint("Invalid request[%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       packet = packet_create_noack((const char *)&cmd, "sss", package_name(inst->info), inst->id, fbfile);
-       if (!packet) {
-               ErrPrint("Unable to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssssssd", package_name(inst->info), inst->id,
+           inst->content, inst->title,
+           inst->icon, inst->name,
+           inst->dbox.priority);
+    if (!packet) {
+       ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
+       return;
+    }
 
-       return CLIENT_SEND_EVENT(inst, packet);
+    (void)CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI int instance_pd_update_end(struct inst_info *inst)
+HAPI void instance_extra_updated_by_instance(struct inst_info *inst, int is_gbar, int idx, int x, int y, int w, int h)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_PD_UPDATE_END;
+    struct packet *packet;
+    enum dynamicbox_dbox_type dbox_type;
+    unsigned int cmd = CMD_EXTRA_UPDATED;
 
-       if (!inst->active_update) {
-               ErrPrint("Invalid request [%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (idx < 0 || idx > DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT) {
+       ErrPrint("Invalid index\n");
+       return;
+    }
 
-       switch (package_pd_type(inst->info)) {
-       case PD_TYPE_BUFFER:
-               if (!inst->pd.canvas.buffer) {
-                       ErrPrint("Buffer is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               break;
-       case PD_TYPE_SCRIPT:
-               if (!inst->pd.canvas.script) {
-                       ErrPrint("Script is null [%s]\n", inst->id);
-                       return LB_STATUS_ERROR_INVALID;
-               }
-               break;
-       default:
-               ErrPrint("Invalid request[%s]\n", inst->id);
-               return LB_STATUS_ERROR_INVALID;
+    if (is_gbar == 0) {
+       if (!inst->dbox.extra_buffer || inst->dbox.extra_buffer[idx] == 0u) {
+           ErrPrint("Invalid extra buffer\n");
+           return;
        }
-
-       packet = packet_create_noack((const char *)&cmd, "ss", package_name(inst->info), inst->id);
-       if (!packet) {
-               ErrPrint("Unable to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
+    } else {
+       if (!inst->gbar.extra_buffer || inst->gbar.extra_buffer[idx] == 0u) {
+           ErrPrint("Invalid extra buffer\n");
+           return;
        }
+    }
 
-       return CLIENT_SEND_EVENT(inst, packet);
-}
+    if (inst->client && inst->visible != DBOX_SHOW) {
+       if (inst->visible == DBOX_HIDE) {
+           DbgPrint("Ignore update event %s(HIDE)\n", inst->id);
+           return;
+       }
+    }
 
-HAPI void instance_extra_info_updated_by_instance(struct inst_info *inst)
-{
-       struct packet *packet;
-       unsigned int cmd = CMD_EXTRA_INFO;
+    dbox_type = package_dbox_type(inst->info);
+    if (dbox_type != DBOX_TYPE_BUFFER) {
+       ErrPrint("Unsupported type\n");
+       return;
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ssssssd", package_name(inst->info), inst->id,
-                                                               inst->content, inst->title,
-                                                               inst->icon, inst->name,
-                                                               inst->lb.priority);
-       if (!packet) {
-               ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
-               return;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssiiiiii", package_name(inst->info), inst->id, is_gbar, idx, x, y, w, h);
+    if (!packet) {
+       ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
+       return;
+    }
 
-       (void)CLIENT_SEND_EVENT(inst, packet);
+    (void)CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI void instance_lb_updated_by_instance(struct inst_info *inst, const char *safe_file)
+HAPI void instance_dbox_updated_by_instance(struct inst_info *inst, const char *safe_file, int x, int y, int w, int h)
 {
-       struct packet *packet;
-       const char *id = NULL;
-       enum lb_type lb_type;
-       unsigned int cmd = CMD_LB_UPDATED;
+    struct packet *packet;
+    const char *id = NULL;
+    enum dynamicbox_dbox_type dbox_type;
+    unsigned int cmd = CMD_DBOX_UPDATED;
 
-       if (inst->client && inst->visible != LB_SHOW) {
-               if (inst->visible == LB_HIDE) {
-                       DbgPrint("Ignore update event %s(HIDE)\n", inst->id);
-                       return;
-               }
+    if (inst->client && inst->visible != DBOX_SHOW) {
+       if (inst->visible == DBOX_HIDE) {
+           DbgPrint("Ignore update event %s(HIDE)\n", inst->id);
+           return;
        }
+    }
 
-       lb_type = package_lb_type(inst->info);
-       if (lb_type == LB_TYPE_SCRIPT) {
-               id = script_handler_buffer_id(inst->lb.canvas.script);
-       } else if (lb_type == LB_TYPE_BUFFER) {
-               id = buffer_handler_id(inst->lb.canvas.buffer);
-       }
+    dbox_type = package_dbox_type(inst->info);
+    if (dbox_type == DBOX_TYPE_SCRIPT) {
+       id = script_handler_buffer_id(inst->dbox.canvas.script);
+    } else if (dbox_type == DBOX_TYPE_BUFFER) {
+       id = buffer_handler_id(inst->dbox.canvas.buffer);
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ssssii",
-                       package_name(inst->info), inst->id, id, safe_file,
-                       inst->lb.width, inst->lb.height);
-       if (!packet) {
-               ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
-               return;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssssiiii", package_name(inst->info), inst->id, id, safe_file, x, y, w, h);
+    if (!packet) {
+       ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
+       return;
+    }
 
-       (void)CLIENT_SEND_EVENT(inst, packet);
+    (void)CLIENT_SEND_EVENT(inst, packet);
 }
 
 HAPI int instance_hold_scroll(struct inst_info *inst, int hold)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_SCROLL;
+    struct packet *packet;
+    unsigned int cmd = CMD_SCROLL;
 
-       DbgPrint("HOLD: (%s) %d\n", inst->id, hold);
-       if (inst->scroll_locked == hold) {
-               return LB_STATUS_ERROR_ALREADY;
-       }
+    DbgPrint("HOLD: (%s) %d\n", inst->id, hold);
+    if (inst->scroll_locked == hold) {
+       return DBOX_STATUS_ERROR_ALREADY;
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, hold);
-       if (!packet) {
-               ErrPrint("Failed to build a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, hold);
+    if (!packet) {
+       ErrPrint("Failed to build a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       inst->scroll_locked = hold;
-       return CLIENT_SEND_EVENT(inst, packet);
+    inst->scroll_locked = hold;
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI void instance_pd_updated_by_instance(struct inst_info *inst, const char *descfile)
+HAPI void instance_gbar_updated_by_instance(struct inst_info *inst, const char *descfile, int x, int y, int w, int h)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_PD_UPDATED;
-       const char *id;
-
-       if (inst->client && inst->visible != LB_SHOW) {
-               DbgPrint("Livebox is hidden. ignore update event\n");
-               return;
-       }
-
-       if (!inst->pd.need_to_send_close_event) {
-               DbgPrint("PD is not created yet. Ignore update event - %s\n", descfile);
+    struct packet *packet;
+    unsigned int cmd = CMD_GBAR_UPDATED;
+    const char *id;
 
-               if (inst->pd.pended_update_desc) {
-                       DbgFree(inst->pd.pended_update_desc);
-                       inst->pd.pended_update_desc = NULL;
-               }
+    if (inst->client && inst->visible != DBOX_SHOW) {
+       DbgPrint("Dynamicbox is hidden. ignore update event\n");
+       return;
+    }
 
-               if (descfile) {
-                       inst->pd.pended_update_desc = strdup(descfile);
-                       if (!inst->pd.pended_update_desc) {
-                               ErrPrint("Heap: %s\n", strerror(errno));
-                       }
-               }
+    if (!inst->gbar.need_to_send_close_event) {
+       DbgPrint("GBAR is not created yet. Ignore update event - %s\n", descfile);
 
-               inst->pd.pended_update_cnt++;
-               return;
+       if (inst->gbar.pended_update_desc) {
+           DbgFree(inst->gbar.pended_update_desc);
+           inst->gbar.pended_update_desc = NULL;
        }
 
-       if (!descfile) {
-               descfile = inst->id;
+       if (descfile) {
+           inst->gbar.pended_update_desc = strdup(descfile);
+           if (!inst->gbar.pended_update_desc) {
+               ErrPrint("Heap: %s\n", strerror(errno));
+           }
        }
 
-       switch (package_pd_type(inst->info)) {
-       case PD_TYPE_SCRIPT:
-               id = script_handler_buffer_id(inst->pd.canvas.script);
-               break;
-       case PD_TYPE_BUFFER:
-               id = buffer_handler_id(inst->pd.canvas.buffer);
-               break;
-       case PD_TYPE_TEXT:
+       inst->gbar.pended_update_cnt++;
+       return;
+    }
+
+    if (!descfile) {
+       descfile = inst->id;
+    }
+
+    switch (package_gbar_type(inst->info)) {
+       case GBAR_TYPE_SCRIPT:
+           id = script_handler_buffer_id(inst->gbar.canvas.script);
+           break;
+       case GBAR_TYPE_BUFFER:
+           id = buffer_handler_id(inst->gbar.canvas.buffer);
+           break;
+       case GBAR_TYPE_TEXT:
        default:
-               id = "";
-               break;
-       }
+           id = "";
+           break;
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ssssii",
-                       package_name(inst->info), inst->id, descfile, id,
-                       inst->pd.width, inst->pd.height);
-       if (!packet) {
-               ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
-               return;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssssiiii", package_name(inst->info), inst->id, id, descfile, x, y, w, h);
+    if (!packet) {
+       ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
+       return;
+    }
 
-       (void)CLIENT_SEND_EVENT(inst, packet);
+    (void)CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI void instance_pd_updated(const char *pkgname, const char *id, const char *descfile)
+HAPI void instance_gbar_updated(const char *pkgname, const char *id, const char *descfile, int x, int y, int w, int h)
 {
-       struct inst_info *inst;
+    struct inst_info *inst;
 
-       inst = package_find_instance_by_id(pkgname, id);
-       if (!inst) {
-               return;
-       }
+    inst = package_find_instance_by_id(pkgname, id);
+    if (!inst) {
+       return;
+    }
 
-       instance_pd_updated_by_instance(inst, descfile);
+    instance_gbar_updated_by_instance(inst, descfile, x, y, w, h);
 }
 
 HAPI int instance_set_update_mode(struct inst_info *inst, int active_update)
 {
-       struct packet *packet;
-       struct update_mode_cbdata *cbdata;
-       unsigned int cmd = CMD_UPDATE_MODE;
-
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       if (inst->active_update == active_update) {
-               DbgPrint("Active update is not changed: %d\n", inst->active_update);
-               return LB_STATUS_ERROR_ALREADY;
-       }
-
-       cbdata = malloc(sizeof(*cbdata));
-       if (!cbdata) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
-       }
-
-       cbdata->inst = instance_ref(inst);
-       cbdata->active_update = active_update;
-
-       /* NOTE: param is resued from here */
-       packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, active_update);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               instance_unref(cbdata->inst);
-               DbgFree(cbdata);
-               return LB_STATUS_ERROR_FAULT;
-       }
+    struct packet *packet;
+    struct update_mode_cbdata *cbdata;
+    unsigned int cmd = CMD_UPDATE_MODE;
+
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    if (inst->active_update == active_update) {
+       DbgPrint("Active update is not changed: %d\n", inst->active_update);
+       return DBOX_STATUS_ERROR_ALREADY;
+    }
+
+    cbdata = malloc(sizeof(*cbdata));
+    if (!cbdata) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
+
+    cbdata->inst = instance_ref(inst);
+    cbdata->active_update = active_update;
+
+    /* NOTE: param is resued from here */
+    packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, active_update);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       instance_unref(cbdata->inst);
+       DbgFree(cbdata);
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, update_mode_cb, cbdata, 0);
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, update_mode_cb, cbdata, 0);
 }
 
 HAPI int instance_active_update(struct inst_info *inst)
 {
-       return inst->active_update;
+    return inst->active_update;
 }
 
-HAPI void instance_set_lb_info(struct inst_info *inst, double priority, const char *content, const char *title)
+HAPI void instance_set_dbox_info(struct inst_info *inst, double priority, const char *content, const char *title)
 {
-       char *_content = NULL;
-       char *_title = NULL;
+    char *_content = NULL;
+    char *_title = NULL;
 
-       if (content && strlen(content)) {
-               _content = strdup(content);
-               if (!_content) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-               }
+    if (content && strlen(content)) {
+       _content = strdup(content);
+       if (!_content) {
+           ErrPrint("Heap: %s\n", strerror(errno));
        }
+    }
 
-       if (title && strlen(title)) {
-               _title = strdup(title);
-               if (!_title) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-               }
+    if (title && strlen(title)) {
+       _title = strdup(title);
+       if (!_title) {
+           ErrPrint("Heap: %s\n", strerror(errno));
        }
+    }
 
-       if (_content) {
-               DbgFree(inst->content);
-               inst->content= _content;
-       }
+    if (_content) {
+       DbgFree(inst->content);
+       inst->content= _content;
+    }
 
-       if (_title) {
-               DbgFree(inst->title);
-               inst->title = _title;
-       }
+    if (_title) {
+       DbgFree(inst->title);
+       inst->title = _title;
+    }
 
-       if (priority >= 0.0f && priority <= 1.0f) {
-               inst->lb.priority = priority;
-       }
+    if (priority >= 0.0f && priority <= 1.0f) {
+       inst->dbox.priority = priority;
+    }
 }
 
 HAPI void instance_set_alt_info(struct inst_info *inst, const char *icon, const char *name)
 {
-       char *_icon = NULL;
-       char *_name = NULL;
+    char *_icon = NULL;
+    char *_name = NULL;
 
-       if (icon && strlen(icon)) {
-               _icon = strdup(icon);
-               if (!_icon) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-               }
+    if (icon && strlen(icon)) {
+       _icon = strdup(icon);
+       if (!_icon) {
+           ErrPrint("Heap: %s\n", strerror(errno));
        }
+    }
 
-       if (name && strlen(name)) {
-               _name = strdup(name);
-               if (!_name) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-               }
+    if (name && strlen(name)) {
+       _name = strdup(name);
+       if (!_name) {
+           ErrPrint("Heap: %s\n", strerror(errno));
        }
+    }
 
-       if (_icon) {
-               DbgFree(inst->icon);
-               inst->icon = _icon;
-       }
+    if (_icon) {
+       DbgFree(inst->icon);
+       inst->icon = _icon;
+    }
 
-       if (_name) {
-               DbgFree(inst->name);
-               inst->name = _name;
-       }
+    if (_name) {
+       DbgFree(inst->name);
+       inst->name = _name;
+    }
 }
 
-HAPI void instance_set_lb_size(struct inst_info *inst, int w, int h)
+HAPI void instance_set_dbox_size(struct inst_info *inst, int w, int h)
 {
-       if (inst->lb.width != w || inst->lb.height != h) {
-               instance_send_resized_event(inst, IS_LB, w, h, LB_STATUS_SUCCESS);
-       }
+    if (inst->dbox.width != w || inst->dbox.height != h) {
+       instance_send_resized_event(inst, IS_DBOX, w, h, DBOX_STATUS_ERROR_NONE);
+    }
 
-       inst->lb.width = w;
-       inst->lb.height = h;
+    inst->dbox.width = w;
+    inst->dbox.height = h;
 }
 
-HAPI void instance_set_pd_size(struct inst_info *inst, int w, int h)
+HAPI void instance_set_gbar_size(struct inst_info *inst, int w, int h)
 {
-       if (inst->pd.width != w || inst->pd.height != h) {
-               instance_send_resized_event(inst, IS_PD, w, h, LB_STATUS_SUCCESS);
-       }
+    if (inst->gbar.width != w || inst->gbar.height != h) {
+       instance_send_resized_event(inst, IS_GBAR, w, h, DBOX_STATUS_ERROR_NONE);
+    }
 
-       inst->pd.width = w;
-       inst->pd.height = h;
+    inst->gbar.width = w;
+    inst->gbar.height = h;
 }
 
 static void pinup_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct set_pinup_cbdata *cbdata = data;
-       const char *content;
-       struct packet *result;
-       unsigned int cmd = CMD_RESULT_PINUP;
-       int ret;
+    struct set_pinup_cbdata *cbdata = data;
+    const char *content;
+    struct packet *result;
+    unsigned int cmd = CMD_RESULT_PINUP;
+    int ret;
 
-       if (!packet) {
-               /*!
-                * \todo
-                * Send pinup failed event to client.
-                */
-               ret = LB_STATUS_ERROR_INVALID;
-               goto out;
-       }
-
-       if (packet_get(packet, "is", &ret, &content) != 2) {
-               /*!
-                * \todo
-                * Send pinup failed event to client
-                */
-               ret = LB_STATUS_ERROR_INVALID;
-               goto out;
-       }
+    if (!packet) {
+       /*!
+        * \todo
+        * Send pinup failed event to client.
+        */
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+       goto out;
+    }
 
-       if (ret == 0) {
-               char *new_content;
+    if (packet_get(packet, "is", &ret, &content) != 2) {
+       /*!
+        * \todo
+        * Send pinup failed event to client
+        */
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+       goto out;
+    }
 
-               new_content = strdup(content);
-               if (!new_content) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       /*!
-                        * \note
-                        * send pinup failed event to client
-                        */
-                       ret = LB_STATUS_ERROR_MEMORY;
-                       goto out;
-               }
-       
-               cbdata->inst->is_pinned_up = cbdata->pinup;
-               DbgFree(cbdata->inst->content);
+    if (ret == 0) {
+       char *new_content;
 
-               cbdata->inst->content = new_content;
+       new_content = strdup(content);
+       if (!new_content) {
+           ErrPrint("Heap: %s\n", strerror(errno));
+           /*!
+            * \note
+            * send pinup failed event to client
+            */
+           ret = DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+           goto out;
        }
 
-out:
-       /*!
-        * \node
-        * Send PINUP Result to client.
-        * Client should wait this event.
-        */
-       result = packet_create_noack((const char *)&cmd, "iisss", ret, cbdata->inst->is_pinned_up,
-                                                       package_name(cbdata->inst->info), cbdata->inst->id, cbdata->inst->content);
-       if (result) {
-               (void)CLIENT_SEND_EVENT(cbdata->inst, result);
-       } else {
-               ErrPrint("Failed to build a packet for %s\n", package_name(cbdata->inst->info));
-       }
+       cbdata->inst->is_pinned_up = cbdata->pinup;
+       DbgFree(cbdata->inst->content);
 
-       instance_unref(cbdata->inst);
-       DbgFree(cbdata);
+       cbdata->inst->content = new_content;
+    }
+
+out:
+    /*!
+     * \node
+     * Send PINUP Result to client.
+     * Client should wait this event.
+     */
+    result = packet_create_noack((const char *)&cmd, "iisss", ret, cbdata->inst->is_pinned_up,
+           package_name(cbdata->inst->info), cbdata->inst->id, cbdata->inst->content);
+    if (result) {
+       (void)CLIENT_SEND_EVENT(cbdata->inst, result);
+    } else {
+       ErrPrint("Failed to build a packet for %s\n", package_name(cbdata->inst->info));
+    }
+
+    instance_unref(cbdata->inst);
+    DbgFree(cbdata);
 }
 
 HAPI int instance_set_pinup(struct inst_info *inst, int pinup)
 {
-       struct set_pinup_cbdata *cbdata;
-       struct packet *packet;
-       unsigned int cmd = CMD_PINUP;
+    struct set_pinup_cbdata *cbdata;
+    struct packet *packet;
+    unsigned int cmd = CMD_PINUP;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       if (!package_pinup(inst->info)) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!package_pinup(inst->info)) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (pinup == inst->is_pinned_up) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (pinup == inst->is_pinned_up) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       cbdata = malloc(sizeof(*cbdata));
-       if (!cbdata) {
-               return LB_STATUS_ERROR_MEMORY;
-       }
+    cbdata = malloc(sizeof(*cbdata));
+    if (!cbdata) {
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
 
-       cbdata->inst = instance_ref(inst);
-       cbdata->pinup = pinup;
+    cbdata->inst = instance_ref(inst);
+    cbdata->pinup = pinup;
 
-       packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, pinup);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               instance_unref(cbdata->inst);
-               DbgFree(cbdata);
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create((const char *)&cmd, "ssi", package_name(inst->info), inst->id, pinup);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       instance_unref(cbdata->inst);
+       DbgFree(cbdata);
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, pinup_cb, cbdata, 0);
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, pinup_cb, cbdata, 0);
 }
 
 HAPI int instance_freeze_updator(struct inst_info *inst)
 {
-       if (!inst->update_timer) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst->update_timer) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       timer_freeze(inst);
-       return LB_STATUS_SUCCESS;
+    timer_freeze(inst);
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int instance_thaw_updator(struct inst_info *inst)
 {
-       if (!inst->update_timer) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst->update_timer) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (client_is_all_paused() || setting_is_lcd_off()) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (client_is_all_paused() || setting_is_lcd_off()) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (inst->visible == LB_HIDE_WITH_PAUSE) {
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (inst->visible == DBOX_HIDE_WITH_PAUSE) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       timer_thaw(inst);
-       return LB_STATUS_SUCCESS;
+    timer_thaw(inst);
+    return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI enum livebox_visible_state instance_visible_state(struct inst_info *inst)
+HAPI enum dynamicbox_visible_state instance_visible_state(struct inst_info *inst)
 {
-       return inst->visible;
+    return inst->visible;
 }
 
-HAPI int instance_set_visible_state(struct inst_info *inst, enum livebox_visible_state state)
+HAPI int instance_set_visible_state(struct inst_info *inst, enum dynamicbox_visible_state state)
 {
-       if (inst->visible == state) {
-               return LB_STATUS_SUCCESS;
-       }
+    if (inst->visible == state) {
+       return DBOX_STATUS_ERROR_NONE;
+    }
 
-       switch (state) {
-       case LB_SHOW:
-       case LB_HIDE:
-               if (inst->visible == LB_HIDE_WITH_PAUSE) {
-                       if (resume_livebox(inst) == 0) {
-                               inst->visible = state;
-                       }
-
-                       instance_thaw_updator(inst);
-               } else {
-                       inst->visible = state;
-               }
-               break;
-
-       case LB_HIDE_WITH_PAUSE:
-               if (pause_livebox(inst) == 0) {
-                       inst->visible = LB_HIDE_WITH_PAUSE;
+    switch (state) {
+       case DBOX_SHOW:
+       case DBOX_HIDE:
+           if (inst->visible == DBOX_HIDE_WITH_PAUSE) {
+               if (resume_dynamicbox(inst) == 0) {
+                   inst->visible = state;
                }
 
-               instance_freeze_updator(inst);
-               break;
-
-       default:
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       return LB_STATUS_SUCCESS;
-}
-
-static void resize_cb(struct slave_node *slave, const struct packet *packet, void *data)
-{
-       struct resize_cbdata *cbdata = data;
-       int ret;
-
-       if (!packet) {
-               ErrPrint("RESIZE: Invalid packet\n");
-               instance_send_resized_event(cbdata->inst, IS_LB, cbdata->inst->lb.width, cbdata->inst->lb.height, LB_STATUS_ERROR_FAULT);
-               instance_unref(cbdata->inst);
-               DbgFree(cbdata);
-               return;
-       }
+               instance_thaw_updator(inst);
+           } else {
+               inst->visible = state;
+           }
+           break;
 
-       if (packet_get(packet, "i", &ret) != 1) {
-               ErrPrint("RESIZE: Invalid parameter\n");
-               instance_send_resized_event(cbdata->inst, IS_LB, cbdata->inst->lb.width, cbdata->inst->lb.height, LB_STATUS_ERROR_INVALID);
-               instance_unref(cbdata->inst);
-               DbgFree(cbdata);
-               return;
-       }
+       case DBOX_HIDE_WITH_PAUSE:
+           if (pause_dynamicbox(inst) == 0) {
+               inst->visible = DBOX_HIDE_WITH_PAUSE;
+           }
 
-       if (ret == (int)LB_STATUS_SUCCESS) {
-               /*!
-                * \note
-                * else waiting the first update with new size
-                */
-               if (cbdata->inst->lb.width == cbdata->w && cbdata->inst->lb.height == cbdata->h) {
-                       /*!
-                        * \note
-                        * Right after the viewer adds a new box,
-                        * Box has no size information, then it will try to use the default size,
-                        * After a box returns created event.
-                        *
-                        * A box will start to generate default size content.
-                        * But the viewer doesn't know it,.
-                        *
-                        * So the viewer will try to change the size of a box.
-                        *
-                        * At that time, the provider gots the size changed event from the box.
-                        * So it sent the size changed event to the viewer.
-                        * But the viewer ignores it. if it doesn't care the size changed event.
-                        * (even if it cares the size changed event, there is a timing issue)
-                        *
-                        * And the provider receives resize request,
-                        * right before send the size changed event.
-                        * but there is no changes about the size.
-                        *
-                        * Now the view will waits size changed event forever.
-                        * To resolve this timing issue.
-                        *
-                        * Check the size of a box from here.
-                        * And if the size is already updated, send the ALREADY event to the viewer
-                        * to get the size changed event callback correctly.
-                        */
-                       instance_send_resized_event(cbdata->inst, IS_LB, cbdata->inst->lb.width, cbdata->inst->lb.height, LB_STATUS_ERROR_ALREADY);
-                       DbgPrint("RESIZE: Livebox is already resized [%s - %dx%d]\n", instance_id(cbdata->inst), cbdata->w, cbdata->h);
-               } else {
-                       DbgPrint("RESIZE: Request is successfully sent [%s - %dx%d]\n", instance_id(cbdata->inst), cbdata->w, cbdata->h);
-               }
-       } else {
-               DbgPrint("RESIZE: Livebox rejects the new size: %s - %dx%d (%d)\n", instance_id(cbdata->inst), cbdata->w, cbdata->h, ret);
-               instance_send_resized_event(cbdata->inst, IS_LB, cbdata->inst->lb.width, cbdata->inst->lb.height, ret);
-       }
+           instance_freeze_updator(inst);
+           break;
 
-       instance_unref(cbdata->inst);
-       DbgFree(cbdata);
+       default:
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI int instance_resize(struct inst_info *inst, int w, int h)
+static void resize_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct resize_cbdata *cbdata;
-       struct packet *packet;
-       unsigned int cmd = CMD_RESIZE;
-       int ret;
+    struct resize_cbdata *cbdata = data;
+    int ret;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!packet) {
+       ErrPrint("RESIZE: Invalid packet\n");
+       instance_send_resized_event(cbdata->inst, IS_DBOX, cbdata->inst->dbox.width, cbdata->inst->dbox.height, DBOX_STATUS_ERROR_FAULT);
+       instance_unref(cbdata->inst);
+       DbgFree(cbdata);
+       return;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package: %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    if (packet_get(packet, "i", &ret) != 1) {
+       ErrPrint("RESIZE: Invalid parameter\n");
+       instance_send_resized_event(cbdata->inst, IS_DBOX, cbdata->inst->dbox.width, cbdata->inst->dbox.height, DBOX_STATUS_ERROR_INVALID_PARAMETER);
+       instance_unref(cbdata->inst);
+       DbgFree(cbdata);
+       return;
+    }
 
-       cbdata = malloc(sizeof(*cbdata));
-       if (!cbdata) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+    if (ret == (int)DBOX_STATUS_ERROR_NONE) {
+       /*!
+        * \note
+        * else waiting the first update with new size
+        */
+       if (cbdata->inst->dbox.width == cbdata->w && cbdata->inst->dbox.height == cbdata->h) {
+           /*!
+            * \note
+            * Right after the viewer adds a new box,
+            * Box has no size information, then it will try to use the default size,
+            * After a box returns created event.
+            *
+            * A box will start to generate default size content.
+            * But the viewer doesn't know it,.
+            *
+            * So the viewer will try to change the size of a box.
+            *
+            * At that time, the provider gots the size changed event from the box.
+            * So it sent the size changed event to the viewer.
+            * But the viewer ignores it. if it doesn't care the size changed event.
+            * (even if it cares the size changed event, there is a timing issue)
+            *
+            * And the provider receives resize request,
+            * right before send the size changed event.
+            * but there is no changes about the size.
+            *
+            * Now the view will waits size changed event forever.
+            * To resolve this timing issue.
+            *
+            * Check the size of a box from here.
+            * And if the size is already updated, send the ALREADY event to the viewer
+            * to get the size changed event callback correctly.
+            */
+           instance_send_resized_event(cbdata->inst, IS_DBOX, cbdata->inst->dbox.width, cbdata->inst->dbox.height, DBOX_STATUS_ERROR_ALREADY);
+           DbgPrint("RESIZE: Dynamicbox is already resized [%s - %dx%d]\n", instance_id(cbdata->inst), cbdata->w, cbdata->h);
+       } else {
+           DbgPrint("RESIZE: Request is successfully sent [%s - %dx%d]\n", instance_id(cbdata->inst), cbdata->w, cbdata->h);
        }
+    } else {
+       DbgPrint("RESIZE: Dynamicbox rejects the new size: %s - %dx%d (%d)\n", instance_id(cbdata->inst), cbdata->w, cbdata->h, ret);
+       instance_send_resized_event(cbdata->inst, IS_DBOX, cbdata->inst->dbox.width, cbdata->inst->dbox.height, ret);
+    }
 
-       cbdata->inst = instance_ref(inst);
-       cbdata->w = w;
-       cbdata->h = h;
-
-       /* NOTE: param is resued from here */
-       packet = packet_create((const char *)&cmd, "ssii", package_name(inst->info), inst->id, w, h);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               instance_unref(cbdata->inst);
-               DbgFree(cbdata);
-               return LB_STATUS_ERROR_FAULT;
-       }
+    instance_unref(cbdata->inst);
+    DbgFree(cbdata);
+}
 
-       DbgPrint("RESIZE: [%s] resize[%dx%d]\n", instance_id(inst), w, h);
-       ret = slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, resize_cb, cbdata, 0);
-       return ret;
+HAPI int instance_resize(struct inst_info *inst, int w, int h)
+{
+    struct resize_cbdata *cbdata;
+    struct packet *packet;
+    unsigned int cmd = CMD_RESIZE;
+    int ret;
+
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package: %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    cbdata = malloc(sizeof(*cbdata));
+    if (!cbdata) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
+
+    cbdata->inst = instance_ref(inst);
+    cbdata->w = w;
+    cbdata->h = h;
+
+    /* NOTE: param is resued from here */
+    packet = packet_create((const char *)&cmd, "ssii", package_name(inst->info), inst->id, w, h);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       instance_unref(cbdata->inst);
+       DbgFree(cbdata);
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    DbgPrint("RESIZE: [%s] resize[%dx%d]\n", instance_id(inst), w, h);
+    ret = slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, resize_cb, cbdata, 0);
+    return ret;
 }
 
 static void set_period_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct period_cbdata *cbdata = data;
-       unsigned int cmd = CMD_PERIOD_CHANGED;
-       struct packet *result;
-       int ret;
+    struct period_cbdata *cbdata = data;
+    unsigned int cmd = CMD_PERIOD_CHANGED;
+    struct packet *result;
+    int ret;
 
-       if (!packet) {
-               ret = LB_STATUS_ERROR_FAULT;
-               goto out;
-       }
+    if (!packet) {
+       ret = DBOX_STATUS_ERROR_FAULT;
+       goto out;
+    }
 
-       if (packet_get(packet, "i", &ret) != 1) {
-               ret = LB_STATUS_ERROR_INVALID;
-               goto out;
-       }
+    if (packet_get(packet, "i", &ret) != 1) {
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+       goto out;
+    }
 
-       if (ret == 0) {
-               cbdata->inst->lb.period = cbdata->period;
-       } else {
-               ErrPrint("Failed to set period %d\n", ret);
-       }
+    if (ret == 0) {
+       cbdata->inst->dbox.period = cbdata->period;
+    } else {
+       ErrPrint("Failed to set period %d\n", ret);
+    }
 
 out:
-       result = packet_create_noack((const char *)&cmd, "idss", ret, cbdata->inst->lb.period, package_name(cbdata->inst->info), cbdata->inst->id);
-       if (result) {
-               (void)CLIENT_SEND_EVENT(cbdata->inst, result);
-       } else {
-               ErrPrint("Failed to build a packet for %s\n", package_name(cbdata->inst->info));
-       }
+    result = packet_create_noack((const char *)&cmd, "idss", ret, cbdata->inst->dbox.period, package_name(cbdata->inst->info), cbdata->inst->id);
+    if (result) {
+       (void)CLIENT_SEND_EVENT(cbdata->inst, result);
+    } else {
+       ErrPrint("Failed to build a packet for %s\n", package_name(cbdata->inst->info));
+    }
 
-       instance_unref(cbdata->inst);
-       DbgFree(cbdata);
-       return;
+    instance_unref(cbdata->inst);
+    DbgFree(cbdata);
+    return;
 }
 
 static Eina_Bool timer_updator_cb(void *data)
 {
-       struct period_cbdata *cbdata = data;
-       struct inst_info *inst;
-       struct packet *result;
-       unsigned int cmd = CMD_PERIOD_CHANGED;
-       double period;
-
-       period = cbdata->period;
-       inst = cbdata->inst;
-       DbgFree(cbdata);
-
-       inst->lb.period = period;
-       if (inst->update_timer) {
-               if (inst->lb.period == 0.0f) {
-                       ecore_timer_del(inst->update_timer);
-                       inst->update_timer = NULL;
-               } else {
-                       util_timer_interval_set(inst->update_timer, inst->lb.period);
-               }
-       } else if (inst->lb.period > 0.0f) {
-               inst->update_timer = util_timer_add(inst->lb.period, update_timer_cb, inst);
-               if (!inst->update_timer) {
-                       ErrPrint("Failed to add an update timer for instance %s\n", inst->id);
-               } else {
-                       timer_freeze(inst); /* Freeze the update timer as default */
-               }
+    struct period_cbdata *cbdata = data;
+    struct inst_info *inst;
+    struct packet *result;
+    unsigned int cmd = CMD_PERIOD_CHANGED;
+    double period;
+
+    period = cbdata->period;
+    inst = cbdata->inst;
+    DbgFree(cbdata);
+
+    inst->dbox.period = period;
+    if (inst->update_timer) {
+       if (inst->dbox.period == 0.0f) {
+           ecore_timer_del(inst->update_timer);
+           inst->update_timer = NULL;
+       } else {
+           util_timer_interval_set(inst->update_timer, inst->dbox.period);
        }
-
-       result = packet_create_noack((const char *)&cmd, "idss", 0, inst->lb.period, package_name(inst->info), inst->id);
-       if (result) {
-               (void)CLIENT_SEND_EVENT(inst, result);
+    } else if (inst->dbox.period > 0.0f) {
+       inst->update_timer = util_timer_add(inst->dbox.period, update_timer_cb, inst);
+       if (!inst->update_timer) {
+           ErrPrint("Failed to add an update timer for instance %s\n", inst->id);
        } else {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+           timer_freeze(inst); /* Freeze the update timer as default */
        }
+    }
+
+    result = packet_create_noack((const char *)&cmd, "idss", 0, inst->dbox.period, package_name(inst->info), inst->id);
+    if (result) {
+       (void)CLIENT_SEND_EVENT(inst, result);
+    } else {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+    }
 
-       instance_unref(inst);
-       return ECORE_CALLBACK_CANCEL;
+    instance_unref(inst);
+    return ECORE_CALLBACK_CANCEL;
 }
 
 HAPI void instance_reload_period(struct inst_info *inst, double period)
 {
-       inst->lb.period = period;
+    inst->dbox.period = period;
 }
 
 HAPI int instance_set_period(struct inst_info *inst, double period)
 {
-       struct packet *packet;
-       struct period_cbdata *cbdata;
-       unsigned int cmd = CMD_SET_PERIOD;
+    struct packet *packet;
+    struct period_cbdata *cbdata;
+    unsigned int cmd = CMD_SET_PERIOD;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       if (period < 0.0f) { /* Use the default period */
-               period = package_period(inst->info);
-       } else if (period > 0.0f && period < MINIMUM_PERIOD) {
-               period = MINIMUM_PERIOD; /* defined at conf.h */
-       }
+    if (period < 0.0f) { /* Use the default period */
+       period = package_period(inst->info);
+    } else if (period > 0.0f && period < DYNAMICBOX_CONF_MINIMUM_PERIOD) {
+       period = DYNAMICBOX_CONF_MINIMUM_PERIOD; /* defined at conf.h */
+    }
 
-       cbdata = malloc(sizeof(*cbdata));
-       if (!cbdata) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
-       }
+    cbdata = malloc(sizeof(*cbdata));
+    if (!cbdata) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
 
-       cbdata->period = period;
-       cbdata->inst = instance_ref(inst);
+    cbdata->period = period;
+    cbdata->inst = instance_ref(inst);
 
-       if (package_secured(inst->info)) {
-               /*!
-                * \note
-                * Secured livebox doesn't need to send its update period to the slave.
-                * Slave has no local timer for updating liveboxes
-                *
-                * So update its timer at here.
-                */
-               if (!ecore_timer_add(DELAY_TIME, timer_updator_cb, cbdata)) {
-                       timer_updator_cb(cbdata);
-               }
-               return LB_STATUS_SUCCESS;
+    if (package_secured(inst->info)) {
+       /*!
+        * \note
+        * Secured dynamicbox doesn't need to send its update period to the slave.
+        * Slave has no local timer for updating dynamicboxes
+        *
+        * So update its timer at here.
+        */
+       if (!ecore_timer_add(DELAY_TIME, timer_updator_cb, cbdata)) {
+           timer_updator_cb(cbdata);
        }
+       return DBOX_STATUS_ERROR_NONE;
+    }
 
-       packet = packet_create((const char *)&cmd, "ssd", package_name(inst->info), inst->id, period);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               instance_unref(cbdata->inst);
-               DbgFree(cbdata);
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create((const char *)&cmd, "ssd", package_name(inst->info), inst->id, period);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       instance_unref(cbdata->inst);
+       DbgFree(cbdata);
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, set_period_cb, cbdata, 0);
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, set_period_cb, cbdata, 0);
 }
 
 HAPI int instance_clicked(struct inst_info *inst, const char *event, double timestamp, double x, double y)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_CLICKED;
+    struct packet *packet;
+    unsigned int cmd = CMD_CLICKED;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       /* NOTE: param is resued from here */
-       packet = packet_create_noack((const char *)&cmd, "sssddd", package_name(inst->info), inst->id, event, timestamp, x, y);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    /* NOTE: param is resued from here */
+    packet = packet_create_noack((const char *)&cmd, "sssddd", package_name(inst->info), inst->id, event, timestamp, x, y);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
+    return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
 }
 
 HAPI int instance_signal_emit(struct inst_info *inst, const char *signal, const char *part, double sx, double sy, double ex, double ey, double x, double y, int down)
 {
-       const char *pkgname;
-       const char *id;
-       struct slave_node *slave;
-       struct packet *packet;
-       struct pkg_info *pkg;
-       unsigned int cmd = CMD_SCRIPT;
-
-       pkg = instance_package(inst);
-       pkgname = package_name(pkg);
-       id = instance_id(inst);
-       if (!pkgname || !id) {
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       slave = package_slave(pkg);
-       if (!slave) {
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       packet = packet_create_noack((const char *)&cmd, "ssssddddddi",
-                       pkgname, id,
-                       signal, part,
-                       sx, sy, ex, ey,
-                       x, y, down);
-       if (!packet) {
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       return slave_rpc_request_only(slave, pkgname, packet, 0); 
+    const char *pkgname;
+    const char *id;
+    struct slave_node *slave;
+    struct packet *packet;
+    struct pkg_info *pkg;
+    unsigned int cmd = CMD_SCRIPT;
+
+    pkg = instance_package(inst);
+    pkgname = package_name(pkg);
+    id = instance_id(inst);
+    if (!pkgname || !id) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    slave = package_slave(pkg);
+    if (!slave) {
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "ssssddddddi",
+           pkgname, id,
+           signal, part,
+           sx, sy, ex, ey,
+           x, y, down);
+    if (!packet) {
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    return slave_rpc_request_only(slave, pkgname, packet, 0); 
 }
 
 HAPI int instance_text_signal_emit(struct inst_info *inst, const char *emission, const char *source, double sx, double sy, double ex, double ey)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_TEXT_SIGNAL;
+    struct packet *packet;
+    unsigned int cmd = CMD_TEXT_SIGNAL;
 
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       packet = packet_create_noack((const char *)&cmd, "ssssdddd", package_name(inst->info), inst->id, emission, source, sx, sy, ex, ey);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssssdddd", package_name(inst->info), inst->id, emission, source, sx, sy, ex, ey);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
+    return slave_rpc_request_only(package_slave(inst->info), package_name(inst->info), packet, 0);
 }
 
 static void change_group_cb(struct slave_node *slave, const struct packet *packet, void *data)
 {
-       struct change_group_cbdata *cbdata = data;
-       struct packet *result;
-       unsigned int cmd = CMD_GROUP_CHANGED;
-       int ret;
-
-       if (!packet) {
-               DbgFree(cbdata->cluster);
-               DbgFree(cbdata->category);
-               ret = LB_STATUS_ERROR_FAULT;
-               goto out;
-       }
-
-       if (packet_get(packet, "i", &ret) != 1) {
-               ErrPrint("Invalid packet\n");
-               DbgFree(cbdata->cluster);
-               DbgFree(cbdata->category);
-               ret = LB_STATUS_ERROR_INVALID;
-               goto out;
-       }
-
-       if (ret == 0) {
-               DbgFree(cbdata->inst->cluster);
-               cbdata->inst->cluster = cbdata->cluster;
-
-               DbgFree(cbdata->inst->category);
-               cbdata->inst->category = cbdata->category;
-       } else {
-               DbgFree(cbdata->cluster);
-               DbgFree(cbdata->category);
-       }
+    struct change_group_cbdata *cbdata = data;
+    struct packet *result;
+    unsigned int cmd = CMD_GROUP_CHANGED;
+    int ret;
+
+    if (!packet) {
+       DbgFree(cbdata->cluster);
+       DbgFree(cbdata->category);
+       ret = DBOX_STATUS_ERROR_FAULT;
+       goto out;
+    }
+
+    if (packet_get(packet, "i", &ret) != 1) {
+       ErrPrint("Invalid packet\n");
+       DbgFree(cbdata->cluster);
+       DbgFree(cbdata->category);
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+       goto out;
+    }
+
+    if (ret == 0) {
+       DbgFree(cbdata->inst->cluster);
+       cbdata->inst->cluster = cbdata->cluster;
+
+       DbgFree(cbdata->inst->category);
+       cbdata->inst->category = cbdata->category;
+    } else {
+       DbgFree(cbdata->cluster);
+       DbgFree(cbdata->category);
+    }
 
 out:
-       result = packet_create_noack((const char *)&cmd, "ssiss",
-                               package_name(cbdata->inst->info), cbdata->inst->id, ret,
-                               cbdata->inst->cluster, cbdata->inst->category);
-       if (!result) {
-               ErrPrint("Failed to build a packet %s\n", package_name(cbdata->inst->info));
-       } else {
-               (void)CLIENT_SEND_EVENT(cbdata->inst, result);
-       }
+    result = packet_create_noack((const char *)&cmd, "ssiss",
+           package_name(cbdata->inst->info), cbdata->inst->id, ret,
+           cbdata->inst->cluster, cbdata->inst->category);
+    if (!result) {
+       ErrPrint("Failed to build a packet %s\n", package_name(cbdata->inst->info));
+    } else {
+       (void)CLIENT_SEND_EVENT(cbdata->inst, result);
+    }
 
-       instance_unref(cbdata->inst);
-       DbgFree(cbdata);
+    instance_unref(cbdata->inst);
+    DbgFree(cbdata);
 }
 
 HAPI int instance_change_group(struct inst_info *inst, const char *cluster, const char *category)
 {
-       struct packet *packet;
-       struct change_group_cbdata *cbdata;
-       unsigned int cmd = CMD_CHANGE_GROUP;
-
-       if (!inst) {
-               ErrPrint("Invalid instance handle\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Fault package [%s]\n", package_name(inst->info));
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       cbdata = malloc(sizeof(*cbdata));
-       if (!cbdata) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
-       }
-
-       cbdata->cluster = strdup(cluster);
-       if (!cbdata->cluster) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               DbgFree(cbdata);
-               return LB_STATUS_ERROR_MEMORY;
-       }
+    struct packet *packet;
+    struct change_group_cbdata *cbdata;
+    unsigned int cmd = CMD_CHANGE_GROUP;
+
+    if (!inst) {
+       ErrPrint("Invalid instance handle\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Fault package [%s]\n", package_name(inst->info));
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    cbdata = malloc(sizeof(*cbdata));
+    if (!cbdata) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
+
+    cbdata->cluster = strdup(cluster);
+    if (!cbdata->cluster) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       DbgFree(cbdata);
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
 
-       cbdata->category = strdup(category);
-       if (!cbdata->category) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               DbgFree(cbdata->cluster);
-               DbgFree(cbdata);
-               return LB_STATUS_ERROR_MEMORY;
-       }
+    cbdata->category = strdup(category);
+    if (!cbdata->category) {
+       ErrPrint("Heap: %s\n", strerror(errno));
+       DbgFree(cbdata->cluster);
+       DbgFree(cbdata);
+       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
+    }
 
-       cbdata->inst = instance_ref(inst);
+    cbdata->inst = instance_ref(inst);
 
-       packet = packet_create((const char *)&cmd, "ssss", package_name(inst->info), inst->id, cluster, category);
-       if (!packet) {
-               ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
-               instance_unref(cbdata->inst);
-               DbgFree(cbdata->category);
-               DbgFree(cbdata->cluster);
-               DbgFree(cbdata);
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create((const char *)&cmd, "ssss", package_name(inst->info), inst->id, cluster, category);
+    if (!packet) {
+       ErrPrint("Failed to build a packet for %s\n", package_name(inst->info));
+       instance_unref(cbdata->inst);
+       DbgFree(cbdata->category);
+       DbgFree(cbdata->cluster);
+       DbgFree(cbdata);
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, change_group_cb, cbdata, 0);
+    return slave_rpc_async_request(package_slave(inst->info), package_name(inst->info), packet, change_group_cb, cbdata, 0);
 }
 
 HAPI const char * const instance_auto_launch(const struct inst_info *inst)
 {
-       return package_auto_launch(inst->info);
+    return package_auto_launch(inst->info);
 }
 
 HAPI const int const instance_priority(const struct inst_info *inst)
 {
-       return inst->lb.priority;
+    return inst->dbox.priority;
 }
 
 HAPI const struct client_node *const instance_client(const struct inst_info *inst)
 {
-       return inst->client;
+    return inst->client;
 }
 
 HAPI const int const instance_timeout(const struct inst_info *inst)
 {
-       return package_timeout(inst->info);
+    return package_timeout(inst->info);
 }
 
 HAPI const double const instance_period(const struct inst_info *inst)
 {
-       return inst->lb.period;
+    return inst->dbox.period;
 }
 
-HAPI const int const instance_lb_width(const struct inst_info *inst)
+HAPI const int const instance_dbox_width(const struct inst_info *inst)
 {
-       return inst->lb.width;
+    return inst->dbox.width;
 }
 
-HAPI const int const instance_lb_height(const struct inst_info *inst)
+HAPI const int const instance_dbox_height(const struct inst_info *inst)
 {
-       return inst->lb.height;
+    return inst->dbox.height;
 }
 
-HAPI const int const instance_pd_width(const struct inst_info *inst)
+HAPI const int const instance_gbar_width(const struct inst_info *inst)
 {
-       return inst->pd.width;
+    return inst->gbar.width;
 }
 
-HAPI const int const instance_pd_height(const struct inst_info *inst)
+HAPI const int const instance_gbar_height(const struct inst_info *inst)
 {
-       return inst->pd.height;
+    return inst->gbar.height;
 }
 
 HAPI struct pkg_info *const instance_package(const struct inst_info *inst)
 {
-       return inst->info;
+    return inst->info;
+}
+
+HAPI struct script_info *const instance_dbox_script(const struct inst_info *inst)
+{
+    return (package_dbox_type(inst->info) == DBOX_TYPE_SCRIPT) ? inst->dbox.canvas.script : NULL;
+}
+
+HAPI struct script_info *const instance_gbar_script(const struct inst_info *inst)
+{
+    return (package_gbar_type(inst->info) == GBAR_TYPE_SCRIPT) ? inst->gbar.canvas.script : NULL;
 }
 
-HAPI struct script_info *const instance_lb_script(const struct inst_info *inst)
+HAPI struct buffer_info *const instance_dbox_buffer(const struct inst_info *inst)
 {
-       return (package_lb_type(inst->info) == LB_TYPE_SCRIPT) ? inst->lb.canvas.script : NULL;
+    return (package_dbox_type(inst->info) == DBOX_TYPE_BUFFER) ? inst->dbox.canvas.buffer : NULL;
 }
 
-HAPI struct script_info *const instance_pd_script(const struct inst_info *inst)
+HAPI struct buffer_info *const instance_gbar_buffer(const struct inst_info *inst)
 {
-       return (package_pd_type(inst->info) == PD_TYPE_SCRIPT) ? inst->pd.canvas.script : NULL;
+    return (package_gbar_type(inst->info) == GBAR_TYPE_BUFFER) ? inst->gbar.canvas.buffer : NULL;
 }
 
-HAPI struct buffer_info *const instance_lb_buffer(const struct inst_info *inst)
+HAPI struct buffer_info *const instance_dbox_extra_buffer(const struct inst_info *inst, int idx)
 {
-       return (package_lb_type(inst->info) == LB_TYPE_BUFFER) ? inst->lb.canvas.buffer : NULL;
+    return (package_dbox_type(inst->info) == DBOX_TYPE_BUFFER) ? (inst->dbox.extra_buffer ? inst->dbox.extra_buffer[idx] : NULL) : NULL;
 }
 
-HAPI struct buffer_info *const instance_pd_buffer(const struct inst_info *inst)
+HAPI struct buffer_info *const instance_gbar_extra_buffer(const struct inst_info *inst, int idx)
 {
-       return (package_pd_type(inst->info) == PD_TYPE_BUFFER) ? inst->pd.canvas.buffer : NULL;
+    return (package_gbar_type(inst->info) == GBAR_TYPE_BUFFER) ? (inst->gbar.extra_buffer ? inst->gbar.extra_buffer[idx] : NULL) : NULL;
 }
 
 HAPI const char *const instance_id(const struct inst_info *inst)
 {
-       return inst->id;
+    return inst->id;
 }
 
 HAPI const char *const instance_content(const struct inst_info *inst)
 {
-       return inst->content;
+    return inst->content;
 }
 
 HAPI const char *const instance_category(const struct inst_info *inst)
 {
-       return inst->category;
+    return inst->category;
 }
 
 HAPI const char *const instance_cluster(const struct inst_info *inst)
 {
-       return inst->cluster;
+    return inst->cluster;
 }
 
 HAPI const char * const instance_title(const struct inst_info *inst)
 {
-       return inst->title;
+    return inst->title;
 }
 
 HAPI const double const instance_timestamp(const struct inst_info *inst)
 {
-       return inst->timestamp;
+    return inst->timestamp;
 }
 
 HAPI const enum instance_state const instance_state(const struct inst_info *inst)
 {
-       return inst->state;
+    return inst->state;
 }
 
 HAPI int instance_destroyed(struct inst_info *inst, int reason)
 {
-       switch (inst->state) {
+    switch (inst->state) {
        case INST_INIT:
        case INST_REQUEST_TO_ACTIVATE:
-               if (inst->unicast_delete_event) {
-                       /*!
-                        * \note
-                        * No other clients know the existence of this instance,
-                        * only who added this knows it.
-                        * So send deleted event to only it.
-                        */
-                       DbgPrint("Send deleted event - unicast - %p\n", inst->client);
-                       instance_unicast_deleted_event(inst, NULL, reason);
-               } else {
-                       instance_broadcast_deleted_event(inst, reason);
-               }
-               instance_state_reset(inst);
-               instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-               break;
+           if (inst->unicast_delete_event) {
+               /*!
+                * \note
+                * No other clients know the existence of this instance,
+                * only who added this knows it.
+                * So send deleted event to only it.
+                */
+               DbgPrint("Send deleted event - unicast - %p\n", inst->client);
+               instance_unicast_deleted_event(inst, NULL, reason);
+           } else {
+               instance_broadcast_deleted_event(inst, reason);
+           }
+           instance_state_reset(inst);
+           instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+           break;
        case INST_REQUEST_TO_REACTIVATE:
        case INST_REQUEST_TO_DESTROY:
        case INST_ACTIVATED:
-               DbgPrint("Send deleted event - multicast\n");
-               instance_broadcast_deleted_event(inst, reason);
-               instance_state_reset(inst);
-               instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
+           DbgPrint("Send deleted event - multicast\n");
+           instance_broadcast_deleted_event(inst, reason);
+           instance_state_reset(inst);
+           instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
        case INST_DESTROYED:
-               break;
+           break;
        default:
-               return LB_STATUS_ERROR_INVALID;
-       }
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       return LB_STATUS_SUCCESS;
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 /*!
@@ -2838,69 +2997,69 @@ HAPI int instance_destroyed(struct inst_info *inst, int reason)
  */
 HAPI int instance_recover_state(struct inst_info *inst)
 {
-       int ret = 0;
+    int ret = 0;
 
-       if (inst->changing_state > 0) {
-               DbgPrint("Doesn't need to recover the state\n");
-               return LB_STATUS_SUCCESS;
-       }
+    if (inst->changing_state > 0) {
+       DbgPrint("Doesn't need to recover the state\n");
+       return DBOX_STATUS_ERROR_NONE;
+    }
 
-       if (package_is_fault(inst->info)) {
-               ErrPrint("Package is faulted(%s), Delete it\n", inst->id);
-               inst->requested_state = INST_DESTROYED;
-       }
+    if (package_is_fault(inst->info)) {
+       ErrPrint("Package is faulted(%s), Delete it\n", inst->id);
+       inst->requested_state = INST_DESTROYED;
+    }
 
-       switch (inst->state) {
+    switch (inst->state) {
        case INST_ACTIVATED:
        case INST_REQUEST_TO_REACTIVATE:
        case INST_REQUEST_TO_DESTROY:
-               switch (inst->requested_state) {
+           switch (inst->requested_state) {
                case INST_ACTIVATED:
-                       DbgPrint("Req. to RE-ACTIVATED (%s)\n", package_name(inst->info));
-                       instance_state_reset(inst);
-                       instance_reactivate(inst);
-                       ret = 1;
-                       break;
+                   DbgPrint("Req. to RE-ACTIVATED (%s)\n", package_name(inst->info));
+                   instance_state_reset(inst);
+                   instance_reactivate(inst);
+                   ret = 1;
+                   break;
                case INST_DESTROYED:
-                       DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
-                       instance_state_reset(inst);
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       break;
+                   DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
+                   instance_state_reset(inst);
+                   instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+                   break;
                default:
-                       break;
-               }
-               break;
+                   break;
+           }
+           break;
        case INST_INIT:
        case INST_REQUEST_TO_ACTIVATE:
-               switch (inst->requested_state) {
+           switch (inst->requested_state) {
                case INST_ACTIVATED:
                case INST_INIT:
-                       DbgPrint("Req. to ACTIVATED (%s)\n", package_name(inst->info));
+                   DbgPrint("Req. to ACTIVATED (%s)\n", package_name(inst->info));
+                   instance_state_reset(inst);
+                   if (instance_activate(inst) < 0) {
+                       DbgPrint("Failed to reactivate the instance\n");
+                       instance_broadcast_deleted_event(inst, DBOX_STATUS_ERROR_FAULT);
                        instance_state_reset(inst);
-                       if (instance_activate(inst) < 0) {
-                               DbgPrint("Failed to reactivate the instance\n");
-                               instance_broadcast_deleted_event(inst, LB_STATUS_ERROR_FAULT);
-                               instance_state_reset(inst);
-                               instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       } else {
-                               ret = 1;
-                       }
-                       break;
+                       instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+                   } else {
+                       ret = 1;
+                   }
+                   break;
                case INST_DESTROYED:
-                       DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
-                       instance_state_reset(inst);
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       break;
+                   DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
+                   instance_state_reset(inst);
+                   instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+                   break;
                default:
-                       break;
-               }
-               break;
+                   break;
+           }
+           break;
        case INST_DESTROYED:
        default:
-               break;
-       }
+           break;
+    }
 
-       return ret;
+    return ret;
 }
 
 /*!
@@ -2908,459 +3067,543 @@ HAPI int instance_recover_state(struct inst_info *inst)
  */
 HAPI int instance_need_slave(struct inst_info *inst)
 {
-       int ret = 0;
-
-       if (inst->client && client_is_faulted(inst->client)) {
-               /*!
-                * \note
-                * In this case, the client is faulted(disconnected)
-                * when the client is deactivated, its liveboxes should be removed too.
-                * So if the current inst is created by the faulted client,
-                * remove it and don't try to recover its states
-                */
+    int ret = 0;
 
-               DbgPrint("CLIENT FAULT: Req. to DESTROYED (%s)\n", package_name(inst->info));
-               switch (inst->state) {
-               case INST_INIT:
-               case INST_ACTIVATED:
-               case INST_REQUEST_TO_REACTIVATE:
-               case INST_REQUEST_TO_DESTROY:
-               case INST_REQUEST_TO_ACTIVATE:
-                       instance_state_reset(inst);
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       break;
-               case INST_DESTROYED:
-                       break;
-               }
+    if (inst->client && client_is_faulted(inst->client)) {
+       /*!
+        * \note
+        * In this case, the client is faulted(disconnected)
+        * when the client is deactivated, its dynamicboxes should be removed too.
+        * So if the current inst is created by the faulted client,
+        * remove it and don't try to recover its states
+        */
 
-               return LB_STATUS_SUCCESS;
+       DbgPrint("CLIENT FAULT: Req. to DESTROYED (%s)\n", package_name(inst->info));
+       switch (inst->state) {
+           case INST_INIT:
+           case INST_ACTIVATED:
+           case INST_REQUEST_TO_REACTIVATE:
+           case INST_REQUEST_TO_DESTROY:
+           case INST_REQUEST_TO_ACTIVATE:
+               instance_state_reset(inst);
+               instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+               break;
+           case INST_DESTROYED:
+               break;
        }
 
-       switch (inst->state) {
+       return DBOX_STATUS_ERROR_NONE;
+    }
+
+    switch (inst->state) {
        case INST_ACTIVATED:
        case INST_REQUEST_TO_REACTIVATE:
        case INST_REQUEST_TO_DESTROY:
-               switch (inst->requested_state) {
+           switch (inst->requested_state) {
                case INST_INIT:
                case INST_ACTIVATED:
-                       DbgPrint("Req. to ACTIVATED (%s)\n", package_name(inst->info));
-                       ret = 1;
-                       break;
+                   DbgPrint("Req. to ACTIVATED (%s)\n", package_name(inst->info));
+                   ret = 1;
+                   break;
                case INST_DESTROYED:
-                       DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
-                       instance_state_reset(inst);
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       break;
+                   DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
+                   instance_state_reset(inst);
+                   instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+                   break;
                default:
-                       break;
-               }
-               break;
+                   break;
+           }
+           break;
        case INST_INIT:
        case INST_REQUEST_TO_ACTIVATE:
-               switch (inst->requested_state) {
+           switch (inst->requested_state) {
                case INST_INIT:
                case INST_ACTIVATED:
-                       DbgPrint("Req. to ACTIVATED (%s)\n", package_name(inst->info));
-                       ret = 1;
-                       break;
+                   DbgPrint("Req. to ACTIVATED (%s)\n", package_name(inst->info));
+                   ret = 1;
+                   break;
                case INST_DESTROYED:
-                       DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
-                       instance_state_reset(inst);
-                       instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
-                       break;
+                   DbgPrint("Req. to DESTROYED (%s)\n", package_name(inst->info));
+                   instance_state_reset(inst);
+                   instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
+                   break;
                default:
-                       break;
-               }
-               break;
+                   break;
+           }
+           break;
        case INST_DESTROYED:
        default:
-               break;
-       }
+           break;
+    }
 
-       return ret;
+    return ret;
 }
 
 HAPI int instance_forward_packet(struct inst_info *inst, struct packet *packet)
 {
-       return CLIENT_SEND_EVENT(inst, packet);
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
 HAPI int instance_send_key_status(struct inst_info *inst, int status)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_KEY_STATUS;
+    struct packet *packet;
+    unsigned int cmd = CMD_KEY_STATUS;
 
-       packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, status);
-       if (!packet) {
-               ErrPrint("Failed to build a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, status);
+    if (!packet) {
+       ErrPrint("Failed to build a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return CLIENT_SEND_EVENT(inst, packet);
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
 HAPI int instance_send_access_status(struct inst_info *inst, int status)
 {
-       struct packet *packet;
-       unsigned int cmd = CMD_ACCESS_STATUS;
+    struct packet *packet;
+    unsigned int cmd = CMD_ACCESS_STATUS;
 
-       packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, status);
-       if (!packet) {
-               ErrPrint("Failed to build a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssi", package_name(inst->info), inst->id, status);
+    if (!packet) {
+       ErrPrint("Failed to build a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return CLIENT_SEND_EVENT(inst, packet);
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI void instance_slave_set_pd_pos(struct inst_info *inst, double x, double y)
+HAPI void instance_slave_set_gbar_pos(struct inst_info *inst, double x, double y)
 {
-       inst->pd.x = x;
-       inst->pd.y = y;
+    inst->gbar.x = x;
+    inst->gbar.y = y;
 }
 
-HAPI void instance_slave_get_pd_pos(struct inst_info *inst, double *x, double *y)
+HAPI void instance_slave_get_gbar_pos(struct inst_info *inst, double *x, double *y)
 {
-       if (x) {
-               *x = inst->pd.x;
-       }
+    if (x) {
+       *x = inst->gbar.x;
+    }
 
-       if (y) {
-               *y = inst->pd.y;
-       }
+    if (y) {
+       *y = inst->gbar.y;
+    }
 }
 
-HAPI int instance_slave_open_pd(struct inst_info *inst, struct client_node *client)
+HAPI int instance_slave_open_gbar(struct inst_info *inst, struct client_node *client)
 {
-       const char *pkgname;
-       const char *id;
-       struct packet *packet;
-       struct slave_node *slave;
-       const struct pkg_info *info;
-       unsigned int cmd = CMD_PD_SHOW;
-       int ret;
+    const char *pkgname;
+    const char *id;
+    struct packet *packet;
+    struct slave_node *slave;
+    const struct pkg_info *info;
+    unsigned int cmd = CMD_GBAR_SHOW;
+    int ret;
 
+    if (!client) {
+       client = inst->gbar.owner;
        if (!client) {
-               client = inst->pd.owner;
-               if (!client) {
-                       ErrPrint("Client is not valid\n");
-                       return LB_STATUS_ERROR_INVALID;
-               }
-       } else if (inst->pd.owner) {
-               if (inst->pd.owner != client) {
-                       ErrPrint("Client is already owned\n");
-                       return LB_STATUS_ERROR_ALREADY;
-               }
-       }
-
-       info = instance_package(inst);
-       if (!info) {
-               ErrPrint("No package info\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       slave = package_slave(info);
-       if (!slave) {
-               ErrPrint("No slave\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       pkgname = package_name(info);
-       id = instance_id(inst);
-
-       if (!pkgname || !id) {
-               ErrPrint("pkgname[%s] id[%s]\n", pkgname, id);
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       packet = packet_create_noack((const char *)&cmd, "ssiidd", pkgname, id, instance_pd_width(inst), instance_pd_height(inst), inst->pd.x, inst->pd.y);
-       if (!packet) {
-               ErrPrint("Failed to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
-
-       /*!
-        * \note
-        * Do not return from here even though we failed to freeze the TTL timer.
-        * Because the TTL timer is not able to be exists.
-        * So we can ignore this error.
-        */
-       (void)slave_freeze_ttl(slave);
-
-       DbgPrint("PERF_DBOX\n");
-       ret = slave_rpc_request_only(slave, pkgname, packet, 0);
-       if (ret < 0) {
-               ErrPrint("Unable to send request to slave\n");
-               /*!
-                * \note
-                * Also we can ignore the TTL timer at here too ;)
-                */
-               (void)slave_thaw_ttl(slave);
-               return ret;
-       }
-
+           ErrPrint("Client is not valid\n");
+           return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+       }
+    } else if (inst->gbar.owner) {
+       if (inst->gbar.owner != client) {
+           ErrPrint("Client is already owned\n");
+           return DBOX_STATUS_ERROR_ALREADY;
+       }
+    }
+
+    info = instance_package(inst);
+    if (!info) {
+       ErrPrint("No package info\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    slave = package_slave(info);
+    if (!slave) {
+       ErrPrint("No slave\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    pkgname = package_name(info);
+    id = instance_id(inst);
+
+    if (!pkgname || !id) {
+       ErrPrint("pkgname[%s] id[%s]\n", pkgname, id);
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "ssiidd", pkgname, id, instance_gbar_width(inst), instance_gbar_height(inst), inst->gbar.x, inst->gbar.y);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    /*!
+     * \note
+     * Do not return from here even though we failed to freeze the TTL timer.
+     * Because the TTL timer is not able to be exists.
+     * So we can ignore this error.
+     */
+    (void)slave_freeze_ttl(slave);
+
+    DbgPrint("PERF_DBOX\n");
+    ret = slave_rpc_request_only(slave, pkgname, packet, 0);
+    if (ret < 0) {
+       ErrPrint("Unable to send request to slave\n");
        /*!
         * \note
-        * If a client is disconnected, the slave has to close the PD
-        * So the pd_buffer_close_cb/pd_script_close_cb will catch the disconnection event
-        * then it will send the close request to the slave
+        * Also we can ignore the TTL timer at here too ;)
         */
-       if (package_pd_type(info) == PD_TYPE_BUFFER) {
-               instance_ref(inst);
-               if (client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, pd_buffer_close_cb, inst) < 0) {
-                       instance_unref(inst);
-               }
-       } else if (package_pd_type(info) == PD_TYPE_SCRIPT) {
-               instance_ref(inst);
-               if (client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, pd_script_close_cb, inst) < 0) {
-                       instance_unref(inst);
-               }
+       (void)slave_thaw_ttl(slave);
+       return ret;
+    }
+
+    /*!
+     * \note
+     * If a client is disconnected, the slave has to close the GBAR
+     * So the gbar_buffer_close_cb/gbar_script_close_cb will catch the disconnection event
+     * then it will send the close request to the slave
+     */
+    if (package_gbar_type(info) == GBAR_TYPE_BUFFER) {
+       instance_ref(inst);
+       if (client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, gbar_buffer_close_cb, inst) < 0) {
+           instance_unref(inst);
        }
+    } else if (package_gbar_type(info) == GBAR_TYPE_SCRIPT) {
+       instance_ref(inst);
+       if (client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, gbar_script_close_cb, inst) < 0) {
+           instance_unref(inst);
+       }
+    }
+
+    inst->gbar.owner = client;
+    return ret;
+}
+
+HAPI int instance_slave_close_gbar(struct inst_info *inst, struct client_node *client, int reason)
+{
+    const char *pkgname;
+    const char *id;
+    struct packet *packet;
+    struct slave_node *slave;
+    struct pkg_info *pkg;
+    unsigned int cmd = CMD_GBAR_HIDE;
+    int ret;
+
+    if (inst->gbar.owner != client) {
+       ErrPrint("Has no permission\n");
+       return DBOX_STATUS_ERROR_PERMISSION_DENIED;
+    }
+
+    pkg = instance_package(inst);
+    if (!pkg) {
+       ErrPrint("No package info\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    slave = package_slave(pkg);
+    if (!slave) {
+       ErrPrint("No assigned slave\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    pkgname = package_name(pkg);
+    id = instance_id(inst);
+
+    if (!pkgname || !id) {
+       ErrPrint("pkgname[%s] & id[%s] is not valid\n", pkgname, id);
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "ssi", pkgname, id, reason);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    slave_thaw_ttl(slave);
+
+    ret = slave_rpc_request_only(slave, pkgname, packet, 0);
+    release_resource_for_closing_gbar(pkg, inst, client);
+    inst->gbar.owner = NULL;
+    DbgPrint("PERF_DBOX\n");
+    return ret;
+}
+
+HAPI int instance_client_gbar_created(struct inst_info *inst, int status)
+{
+    struct packet *packet;
+    const char *buf_id;
+    unsigned int cmd = CMD_GBAR_CREATED;
+    int ret;
+
+    if (inst->gbar.need_to_send_close_event) {
+       DbgPrint("GBAR is already created\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    switch (package_gbar_type(inst->info)) {
+       case GBAR_TYPE_SCRIPT:
+           buf_id = script_handler_buffer_id(inst->gbar.canvas.script);
+           break;
+       case GBAR_TYPE_BUFFER:
+           buf_id = buffer_handler_id(inst->gbar.canvas.buffer);
+           break;
+       case GBAR_TYPE_TEXT:
+       default:
+           buf_id = "";
+           break;
+    }
 
-       inst->pd.owner = client;
-       return ret;
-}
+    inst->gbar.need_to_send_close_event = (status == 0);
 
-HAPI int instance_slave_close_pd(struct inst_info *inst, struct client_node *client, int reason)
-{
-       const char *pkgname;
-       const char *id;
-       struct packet *packet;
-       struct slave_node *slave;
-       struct pkg_info *pkg;
-       unsigned int cmd = CMD_PD_HIDE;
-       int ret;
+    packet = packet_create_noack((const char *)&cmd, "sssiii", 
+           package_name(inst->info), inst->id, buf_id,
+           inst->gbar.width, inst->gbar.height, status);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       if (inst->pd.owner != client) {
-               ErrPrint("Has no permission\n");
-               return LB_STATUS_ERROR_PERMISSION;
-       }
+    ret = CLIENT_SEND_EVENT(inst, packet);
 
-       pkg = instance_package(inst);
-       if (!pkg) {
-               ErrPrint("No package info\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (inst->gbar.need_to_send_close_event && inst->gbar.pended_update_cnt) {
+       DbgPrint("Apply pended desc(%d) - %s\n", inst->gbar.pended_update_cnt, inst->gbar.pended_update_desc);
+       instance_gbar_updated_by_instance(inst, inst->gbar.pended_update_desc, 0, 0, inst->gbar.width, inst->gbar.height);
+       inst->gbar.pended_update_cnt = 0;
+       DbgFree(inst->gbar.pended_update_desc);
+       inst->gbar.pended_update_desc = NULL;
+    }
 
-       slave = package_slave(pkg);
-       if (!slave) {
-               ErrPrint("No assigned slave\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    return ret;
+}
 
-       pkgname = package_name(pkg);
-       id = instance_id(inst);
+HAPI int instance_client_gbar_destroyed(struct inst_info *inst, int status)
+{
+    return send_gbar_destroyed_to_client(inst, status);
+}
 
-       if (!pkgname || !id) {
-               ErrPrint("pkgname[%s] & id[%s] is not valid\n", pkgname, id);
-               return LB_STATUS_ERROR_INVALID;
-       }
+HAPI int instance_client_gbar_extra_buffer_created(struct inst_info *inst, int idx)
+{
+    struct packet *packet;
+    unsigned int cmd = CMD_GBAR_CREATE_XBUF;
+    int pixmap;
 
-       packet = packet_create_noack((const char *)&cmd, "ssi", pkgname, id, reason);
-       if (!packet) {
-               ErrPrint("Failed to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    pixmap = buffer_handler_pixmap(inst->gbar.extra_buffer[idx]);
+    if (pixmap == 0) {
+       ErrPrint("Invalid buffer\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       slave_thaw_ttl(slave);
+    packet = packet_create_noack((const char *)&cmd, "ssii", package_name(inst->info), inst->id, pixmap, idx);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       ret = slave_rpc_request_only(slave, pkgname, packet, 0);
-       release_resource_for_closing_pd(pkg, inst, client);
-       inst->pd.owner = NULL;
-       DbgPrint("PERF_DBOX\n");
-       return ret;
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI int instance_client_pd_created(struct inst_info *inst, int status)
+HAPI int instance_client_gbar_extra_buffer_destroyed(struct inst_info *inst, int idx)
 {
-       struct packet *packet;
-       const char *buf_id;
-       unsigned int cmd = CMD_PD_CREATED;
-       int ret;
+    struct packet *packet;
+    unsigned int cmd = CMD_GBAR_DESTROY_XBUF;
+    int pixmap;
 
-       if (inst->pd.need_to_send_close_event) {
-               DbgPrint("PD is already created\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    pixmap = buffer_handler_pixmap(inst->gbar.extra_buffer[idx]);
+    if (pixmap == 0) {
+       ErrPrint("Invalid buffer\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       switch (package_pd_type(inst->info)) {
-       case PD_TYPE_SCRIPT:
-               buf_id = script_handler_buffer_id(inst->pd.canvas.script);
-               break;
-       case PD_TYPE_BUFFER:
-               buf_id = buffer_handler_id(inst->pd.canvas.buffer);
-               break;
-       case PD_TYPE_TEXT:
-       default:
-               buf_id = "";
-               break;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssii", package_name(inst->info), inst->id, pixmap, idx);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       inst->pd.need_to_send_close_event = (status == 0);
+    return CLIENT_SEND_EVENT(inst, packet);
+}
 
-       packet = packet_create_noack((const char *)&cmd, "sssiii", 
-                       package_name(inst->info), inst->id, buf_id,
-                       inst->pd.width, inst->pd.height, status);
-       if (!packet) {
-               ErrPrint("Failed to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+HAPI int instance_client_dbox_extra_buffer_created(struct inst_info *inst, int idx)
+{
+    struct packet *packet;
+    unsigned int cmd = CMD_DBOX_CREATE_XBUF;
+    int pixmap;
 
-       ret = CLIENT_SEND_EVENT(inst, packet);
+    pixmap = buffer_handler_pixmap(inst->dbox.extra_buffer[idx]);
+    if (pixmap == 0) {
+       ErrPrint("Invalid buffer\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       if (inst->pd.need_to_send_close_event && inst->pd.pended_update_cnt) {
-               DbgPrint("Apply pended desc(%d) - %s\n", inst->pd.pended_update_cnt, inst->pd.pended_update_desc);
-               instance_pd_updated_by_instance(inst, inst->pd.pended_update_desc);
-               inst->pd.pended_update_cnt = 0;
-               DbgFree(inst->pd.pended_update_desc);
-               inst->pd.pended_update_desc = NULL;
-       }
+    packet = packet_create_noack((const char *)&cmd, "ssii", package_name(inst->info), inst->id, pixmap, idx);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       return ret;
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
-HAPI int instance_client_pd_destroyed(struct inst_info *inst, int status)
+HAPI int instance_client_dbox_extra_buffer_destroyed(struct inst_info *inst, int idx)
 {
-       return send_pd_destroyed_to_client(inst, status);
+    struct packet *packet;
+    unsigned int cmd = CMD_DBOX_DESTROY_XBUF;
+    int pixmap;
+
+    pixmap = buffer_handler_pixmap(inst->dbox.extra_buffer[idx]);
+    if (pixmap == 0) {
+       ErrPrint("Invalid buffer\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
+
+    packet = packet_create_noack((const char *)&cmd, "ssii", package_name(inst->info), inst->id, pixmap, idx);
+    if (!packet) {
+       ErrPrint("Failed to create a packet\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
+
+    return CLIENT_SEND_EVENT(inst, packet);
 }
 
 HAPI int instance_add_client(struct inst_info *inst, struct client_node *client)
 {
-       if (inst->client == client) {
-               ErrPrint("Owner cannot be the viewer\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (inst->client == client) {
+       ErrPrint("Owner cannot be the viewer\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       DbgPrint("%d is added to the list of viewer of %s(%s)\n", client_pid(client), package_name(instance_package(inst)), instance_id(inst));
-       if (client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, viewer_deactivated_cb, inst) < 0) {
-               ErrPrint("Failed to add a deactivate callback\n");
-               return LB_STATUS_ERROR_FAULT;
-       }
+    DbgPrint("%d is added to the list of viewer of %s(%s)\n", client_pid(client), package_name(instance_package(inst)), instance_id(inst));
+    if (client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, viewer_deactivated_cb, inst) < 0) {
+       ErrPrint("Failed to add a deactivate callback\n");
+       return DBOX_STATUS_ERROR_FAULT;
+    }
 
-       instance_ref(inst);
-       inst->client_list = eina_list_append(inst->client_list, client);
-       return LB_STATUS_SUCCESS;
+    instance_ref(inst);
+    inst->client_list = eina_list_append(inst->client_list, client);
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int instance_del_client(struct inst_info *inst, struct client_node *client)
 {
-       if (inst->client == client) {
-               ErrPrint("Owner is not in the viewer list\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
+    if (inst->client == client) {
+       ErrPrint("Owner is not in the viewer list\n");
+       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
+    }
 
-       client_event_callback_del(client, CLIENT_EVENT_DEACTIVATE, viewer_deactivated_cb, inst);
-       viewer_deactivated_cb(client, inst);
-       return LB_STATUS_SUCCESS;
+    client_event_callback_del(client, CLIENT_EVENT_DEACTIVATE, viewer_deactivated_cb, inst);
+    viewer_deactivated_cb(client, inst);
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int instance_has_client(struct inst_info *inst, struct client_node *client)
 {
-       return !!eina_list_data_find(inst->client_list, client);
+    return !!eina_list_data_find(inst->client_list, client);
 }
 
 HAPI void *instance_client_list(struct inst_info *inst)
 {
-       return inst->client_list;
+    return inst->client_list;
 }
 
 HAPI int instance_init(void)
 {
-       if (!strcasecmp(PROVIDER_METHOD, "shm")) {
-               s_info.env_buf_type = BUFFER_TYPE_SHM;
-       } else if (!strcasecmp(PROVIDER_METHOD, "pixmap")) {
-               s_info.env_buf_type = BUFFER_TYPE_PIXMAP;
-       }
-       /* Default method is BUFFER_TYPE_FILE */
+    if (!strcasecmp(DYNAMICBOX_CONF_PROVIDER_METHOD, "shm")) {
+       s_info.env_buf_type = DBOX_FB_TYPE_SHM;
+    } else if (!strcasecmp(DYNAMICBOX_CONF_PROVIDER_METHOD, "pixmap")) {
+       s_info.env_buf_type = DBOX_FB_TYPE_PIXMAP;
+    }
+    /* Default method is DBOX_FB_TYPE_FILE */
 
-       return LB_STATUS_SUCCESS;
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int instance_fini(void)
 {
-       return LB_STATUS_SUCCESS;
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline struct tag_item *find_tag_item(struct inst_info *inst, const char *tag)
 {
-       struct tag_item *item;
-       Eina_List *l;
+    struct tag_item *item;
+    Eina_List *l;
 
-       EINA_LIST_FOREACH(inst->data_list, l, item) {
-               if (!strcmp(item->tag, tag)) {
-                       return item;
-               }
+    EINA_LIST_FOREACH(inst->data_list, l, item) {
+       if (!strcmp(item->tag, tag)) {
+           return item;
        }
+    }
 
-       return NULL;
+    return NULL;
 }
 
 HAPI int instance_set_data(struct inst_info *inst, const char *tag, void *data)
 {
-       struct tag_item *item;
+    struct tag_item *item;
 
-       item = find_tag_item(inst, tag);
+    item = find_tag_item(inst, tag);
+    if (!item) {
+       item = malloc(sizeof(*item));
        if (!item) {
-               item = malloc(sizeof(*item));
-               if (!item) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       return LB_STATUS_ERROR_MEMORY;
-               }
-
-               item->tag = strdup(tag);
-               if (!item->tag) {
-                       ErrPrint("Heap: %s\n", strerror(errno));
-                       DbgFree(item);
-                       return LB_STATUS_ERROR_MEMORY;
-               }
-
-               inst->data_list = eina_list_append(inst->data_list, item);
+           ErrPrint("Heap: %s\n", strerror(errno));
+           return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       if (!data) {
-               inst->data_list = eina_list_remove(inst->data_list, item);
-               DbgFree(item->tag);
-               DbgFree(item);
-       } else {
-               item->data = data;
+       item->tag = strdup(tag);
+       if (!item->tag) {
+           ErrPrint("Heap: %s\n", strerror(errno));
+           DbgFree(item);
+           return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       return LB_STATUS_SUCCESS;
+       inst->data_list = eina_list_append(inst->data_list, item);
+    }
+
+    if (!data) {
+       inst->data_list = eina_list_remove(inst->data_list, item);
+       DbgFree(item->tag);
+       DbgFree(item);
+    } else {
+       item->data = data;
+    }
+
+    return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void *instance_del_data(struct inst_info *inst, const char *tag)
 {
-       struct tag_item *item;
-       void *data;
+    struct tag_item *item;
+    void *data;
 
-       item = find_tag_item(inst, tag);
-       if (!item) {
-               return NULL;
-       }
+    item = find_tag_item(inst, tag);
+    if (!item) {
+       return NULL;
+    }
 
-       inst->data_list = eina_list_remove(inst->data_list, item);
-       data = item->data;
-       DbgFree(item->tag);
-       DbgFree(item);
+    inst->data_list = eina_list_remove(inst->data_list, item);
+    data = item->data;
+    DbgFree(item->tag);
+    DbgFree(item);
 
-       return data;
+    return data;
 }
 
 HAPI void *instance_get_data(struct inst_info *inst, const char *tag)
 {
-       struct tag_item *item;
+    struct tag_item *item;
 
-       item = find_tag_item(inst, tag);
-       if (!item) {
-               return NULL;
-       }
+    item = find_tag_item(inst, tag);
+    if (!item) {
+       return NULL;
+    }
 
-       return item->data;
+    return item->data;
 }
 
-HAPI struct client_node *instance_pd_owner(struct inst_info *inst)
+HAPI struct client_node *instance_gbar_owner(struct inst_info *inst)
 {
-       return inst->pd.owner;
+    return inst->gbar.owner;
 }
 
 /* End of a file */
index 8593ab7..aeb0503 100644 (file)
--- a/src/io.c
+++ b/src/io.c
@@ -27,7 +27,9 @@
 #include <Eina.h>
 #include <sqlite3.h>
 #include <db-util.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_conf.h>
 
 #include "debug.h"
 #include "conf.h"
@@ -42,6 +44,9 @@
 
 int errno;
 
+#define MAX_ABI                256
+#define MAX_PKGNAME    512
+
 static struct {
        sqlite3 *handle;
 } s_info = {
@@ -75,7 +80,7 @@ static int load_abi_table(void)
 
        fp = fopen("/usr/share/"PACKAGE"/abi.ini", "rt");
        if (!fp) {
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        state = INIT;
@@ -211,12 +216,12 @@ static int load_abi_table(void)
        if (fclose(fp) != 0) {
                ErrPrint("fclose: %s\n", strerror(errno));
        }
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int build_client_info(struct pkg_info *info)
 {
-       static const char *dml = "SELECT auto_launch, pd_size FROM client WHERE pkgid = ?";
+       static const char *dml = "SELECT auto_launch, gbar_size FROM client WHERE pkgid = ?";
        sqlite3_stmt *stmt;
        int width;
        int height;
@@ -226,14 +231,14 @@ static inline int build_client_info(struct pkg_info *info)
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        ret = sqlite3_bind_text(stmt, 1, package_name(info), -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrint("Failed to bind a pkgname %s\n", package_name(info));
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (sqlite3_step(stmt) != SQLITE_ROW) {
@@ -241,7 +246,7 @@ static inline int build_client_info(struct pkg_info *info)
                sqlite3_reset(stmt);
                sqlite3_clear_bindings(stmt);
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        package_set_auto_launch(info, (const char *)sqlite3_column_text(stmt, 0));
@@ -249,22 +254,22 @@ static inline int build_client_info(struct pkg_info *info)
        tmp = (const char *)sqlite3_column_text(stmt, 1);
        if (tmp && strlen(tmp)) {
                if (sscanf(tmp, "%dx%d", &width, &height) != 2) {
-                       ErrPrint("Failed to get PD width and Height (%s)\n", tmp);
+                       ErrPrint("Failed to get GBAR width and Height (%s)\n", tmp);
                } else {
-                       package_set_pd_width(info, width);
-                       package_set_pd_height(info, height);
+                       package_set_gbar_width(info, width);
+                       package_set_gbar_height(info, height);
                }
        }
 
        sqlite3_reset(stmt);
        sqlite3_clear_bindings(stmt);
        sqlite3_finalize(stmt);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int build_provider_info(struct pkg_info *info)
 {
-       static const char *dml = "SELECT provider.network, provider.abi, provider.secured, provider.box_type, provider.box_src, provider.box_group, provider.pd_type, provider.pd_src, provider.pd_group, provider.libexec, provider.timeout, provider.period, provider.script, provider.pinup, pkgmap.appid FROM provider, pkgmap WHERE pkgmap.pkgid = ? AND provider.pkgid = ?";
+       static const char *dml = "SELECT provider.network, provider.abi, provider.secured, provider.box_type, provider.box_src, provider.box_group, provider.gbar_type, provider.gbar_src, provider.gbar_group, provider.libexec, provider.timeout, provider.period, provider.script, provider.pinup, pkgmap.appid FROM provider, pkgmap WHERE pkgmap.pkgid = ? AND provider.pkgid = ?";
        sqlite3_stmt *stmt;
        int ret;
        const char *tmp;
@@ -273,19 +278,19 @@ static inline int build_provider_info(struct pkg_info *info)
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (sqlite3_bind_text(stmt, 1, package_name(info), -1, SQLITE_TRANSIENT) != SQLITE_OK) {
                ErrPrint("Failed to bind a pkgname(%s) - %s\n", package_name(info), sqlite3_errmsg(s_info.handle));
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (sqlite3_bind_text(stmt, 2, package_name(info), -1, SQLITE_TRANSIENT) != SQLITE_OK) {
                ErrPrint("Failed to bind a pkgname(%s) - %s\n", package_name(info), sqlite3_errmsg(s_info.handle));
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (sqlite3_step(stmt) != SQLITE_ROW) {
@@ -293,7 +298,7 @@ static inline int build_provider_info(struct pkg_info *info)
                sqlite3_reset(stmt);
                sqlite3_clear_bindings(stmt);
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        appid = (const char *)sqlite3_column_text(stmt, 14);
@@ -302,7 +307,7 @@ static inline int build_provider_info(struct pkg_info *info)
                sqlite3_reset(stmt);
                sqlite3_clear_bindings(stmt);
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        package_set_network(info, sqlite3_column_int(stmt, 0));
@@ -313,25 +318,25 @@ static inline int build_provider_info(struct pkg_info *info)
                package_set_abi(info, tmp);
        }
 
-       package_set_lb_type(info, sqlite3_column_int(stmt, 3));
+       package_set_dbox_type(info, sqlite3_column_int(stmt, 3));
        tmp = (const char *)sqlite3_column_text(stmt, 4);
        if (tmp && strlen(tmp)) {
-               package_set_lb_path(info, tmp);
+               package_set_dbox_path(info, tmp);
 
                tmp = (const char *)sqlite3_column_text(stmt, 5);
                if (tmp && strlen(tmp)) {
-                       package_set_lb_group(info, tmp);
+                       package_set_dbox_group(info, tmp);
                }
        }
 
-       package_set_pd_type(info, sqlite3_column_int(stmt, 6));
+       package_set_gbar_type(info, sqlite3_column_int(stmt, 6));
        tmp = (const char *)sqlite3_column_text(stmt, 7);
        if (tmp && strlen(tmp)) {
-               package_set_pd_path(info, tmp);
+               package_set_gbar_path(info, tmp);
 
                tmp = (const char *)sqlite3_column_text(stmt, 8);
                if (tmp && strlen(tmp)) {
-                       package_set_pd_group(info, tmp);
+                       package_set_gbar_group(info, tmp);
                }
        }
 
@@ -357,7 +362,7 @@ static inline int build_provider_info(struct pkg_info *info)
        sqlite3_reset(stmt);
        sqlite3_clear_bindings(stmt);
        sqlite3_finalize(stmt);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int build_box_size_info(struct pkg_info *info)
@@ -371,13 +376,13 @@ static inline int build_box_size_info(struct pkg_info *info)
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (sqlite3_bind_text(stmt, 1, package_name(info), -1, SQLITE_TRANSIENT) != SQLITE_OK) {
                ErrPrint("Failed to bind a pkgname(%s) - %s\n", package_name(info), sqlite3_errmsg(s_info.handle));
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        size_list = 0;
@@ -391,7 +396,7 @@ static inline int build_box_size_info(struct pkg_info *info)
        sqlite3_reset(stmt);
        sqlite3_clear_bindings(stmt);
        sqlite3_finalize(stmt);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int load_context_option(struct context_item *item, int id)
@@ -405,17 +410,17 @@ static inline int load_context_option(struct context_item *item, int id)
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        ret = sqlite3_bind_int(stmt, 1, id);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               ret = LB_STATUS_ERROR_IO;
+               ret = DBOX_STATUS_ERROR_IO_ERROR;
                goto out;
        }
 
-       ret = LB_STATUS_ERROR_NOT_EXIST;
+       ret = DBOX_STATUS_ERROR_NOT_EXIST;
        while (sqlite3_step(stmt) == SQLITE_ROW) {
                key = (const char *)sqlite3_column_text(stmt, 0);
                if (!key || !strlen(key)) {
@@ -454,17 +459,17 @@ static inline int load_context_item(struct context_info *info, int id)
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        ret = sqlite3_bind_int(stmt, 1, id);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               ret = LB_STATUS_ERROR_IO;
+               ret = DBOX_STATUS_ERROR_IO_ERROR;
                goto out;
        }
 
-       ret = LB_STATUS_ERROR_NOT_EXIST;
+       ret = DBOX_STATUS_ERROR_NOT_EXIST;
        while (sqlite3_step(stmt) == SQLITE_ROW) {
                ctx_item = (const char *)sqlite3_column_text(stmt, 0);
                option_id = sqlite3_column_int(stmt, 1);
@@ -472,7 +477,7 @@ static inline int load_context_item(struct context_info *info, int id)
                item = group_add_context_item(info, ctx_item);
                if (!item) {
                        ErrPrint("Failed to add a new context item\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        break;
                }
 
@@ -504,14 +509,14 @@ static inline int build_group_info(struct pkg_info *info)
        ret = sqlite3_prepare_v2(s_info.handle, dml, -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        ret = sqlite3_bind_text(stmt, 1, package_name(info), -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrint("Failed to bind a package name(%s)\n", package_name(info));
                sqlite3_finalize(stmt);
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        while (sqlite3_step(stmt) == SQLITE_ROW) {
@@ -557,7 +562,7 @@ static inline int build_group_info(struct pkg_info *info)
                if (ctx_info) {
                        ret = load_context_item(ctx_info, id);
                        if (ret < 0) {
-                               if (ret == (int)LB_STATUS_ERROR_NOT_EXIST) {
+                               if (ret == (int)DBOX_STATUS_ERROR_NOT_EXIST) {
                                        DbgPrint("Has no specific context info\n");
                                } else {
                                        DbgPrint("Context info is not valid\n");
@@ -575,7 +580,7 @@ static inline int build_group_info(struct pkg_info *info)
        sqlite3_reset(stmt);
        sqlite3_clear_bindings(stmt);
        sqlite3_finalize(stmt);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int io_is_exists(const char *lbid)
@@ -585,25 +590,25 @@ HAPI int io_is_exists(const char *lbid)
 
        if (!s_info.handle) {
                ErrPrint("DB is not ready\n");
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        ret = sqlite3_prepare_v2(s_info.handle, "SELECT COUNT(pkgid) FROM pkgmap WHERE pkgid = ?", -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        ret = sqlite3_bind_text(stmt, 1, lbid, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               ret = LB_STATUS_ERROR_IO;
+               ret = DBOX_STATUS_ERROR_IO_ERROR;
                goto out;
        }
 
        if (sqlite3_step(stmt) != SQLITE_ROW) {
                ErrPrint("%s has no record (%s)\n", lbid, sqlite3_errmsg(s_info.handle));
-               ret = LB_STATUS_ERROR_IO;
+               ret = DBOX_STATUS_ERROR_IO_ERROR;
                goto out;
        }
 
@@ -614,7 +619,7 @@ out:
        return ret;
 }
 
-HAPI char *io_livebox_pkgname(const char *pkgname)
+HAPI char *io_dynamicbox_pkgname(const char *pkgname)
 {
        sqlite3_stmt *stmt;
        char *pkgid;
@@ -665,7 +670,7 @@ out:
        return pkgid;
 }
 
-HAPI int io_crawling_liveboxes(int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data)
+HAPI int io_crawling_dynamicboxes(int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data)
 {
        DIR *dir;
 
@@ -699,7 +704,7 @@ HAPI int io_crawling_liveboxes(int (*cb)(const char *pkgid, const char *lbid, in
                                if (cb(pkgid, lbid, prime, data) < 0) {
                                        sqlite3_reset(stmt);
                                        sqlite3_finalize(stmt);
-                                       return LB_STATUS_ERROR_CANCEL;
+                                       return DBOX_STATUS_ERROR_CANCEL;
                                }
                        }
 
@@ -708,7 +713,7 @@ HAPI int io_crawling_liveboxes(int (*cb)(const char *pkgid, const char *lbid, in
                }
        }
 
-       dir = opendir(ROOT_PATH);
+       dir = opendir(DYNAMICBOX_CONF_ROOT_PATH);
        if (!dir) {
                ErrPrint("Error: %s\n", strerror(errno));
        } else {
@@ -723,7 +728,7 @@ HAPI int io_crawling_liveboxes(int (*cb)(const char *pkgid, const char *lbid, in
                                if (closedir(dir) < 0) {
                                        ErrPrint("closedir: %s\n", strerror(errno));
                                }
-                               return LB_STATUS_ERROR_CANCEL;
+                               return DBOX_STATUS_ERROR_CANCEL;
                        }
                }
 
@@ -732,10 +737,10 @@ HAPI int io_crawling_liveboxes(int (*cb)(const char *pkgid, const char *lbid, in
                }
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI int io_update_livebox_package(const char *pkgid, int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data)
+HAPI int io_update_dynamicbox_package(const char *pkgid, int (*cb)(const char *pkgid, const char *lbid, int prime, void *data), void *data)
 {
        sqlite3_stmt *stmt;
        char *lbid;
@@ -743,24 +748,24 @@ HAPI int io_update_livebox_package(const char *pkgid, int (*cb)(const char *pkgi
        int ret;
 
        if (!cb || !pkgid) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!s_info.handle) {
                ErrPrint("DB is not ready\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = sqlite3_prepare_v2(s_info.handle, "SELECT pkgid, prime FROM pkgmap WHERE appid = ?", -1, &stmt, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        ret = sqlite3_bind_text(stmt, 1, pkgid, -1, SQLITE_TRANSIENT);
        if (ret != SQLITE_OK) {
                ErrPrint("Error: %s\n", sqlite3_errmsg(s_info.handle));
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
@@ -792,7 +797,7 @@ HAPI int io_load_package_db(struct pkg_info *info)
 
        if (!s_info.handle) {
                ErrPrint("DB is not ready\n");
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        ret = build_provider_info(info);
@@ -815,7 +820,7 @@ HAPI int io_load_package_db(struct pkg_info *info)
                return ret;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int db_init(void)
@@ -823,43 +828,43 @@ static inline int db_init(void)
        int ret;
        struct stat stat;
 
-       ret = db_util_open_with_options(DBFILE, &s_info.handle, SQLITE_OPEN_READONLY, NULL);
+       ret = db_util_open_with_options(DYNAMICBOX_CONF_DBFILE, &s_info.handle, SQLITE_OPEN_READONLY, NULL);
        if (ret != SQLITE_OK) {
                ErrPrint("Failed to open a DB\n");
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
-       if (lstat(DBFILE, &stat) < 0) {
+       if (lstat(DYNAMICBOX_CONF_DBFILE, &stat) < 0) {
                db_util_close(s_info.handle);
                s_info.handle = NULL;
                ErrPrint("%s\n", strerror(errno));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (!S_ISREG(stat.st_mode)) {
                ErrPrint("Invalid file\n");
                db_util_close(s_info.handle);
                s_info.handle = NULL;
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (stat.st_size <= 0) {
                DbgPrint("Size is %d (But use this ;)\n", stat.st_size);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int db_fini(void)
 {
        if (!s_info.handle) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        db_util_close(s_info.handle);
        s_info.handle = NULL;
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int io_init(void)
@@ -876,7 +881,7 @@ HAPI int io_init(void)
                DbgPrint("ABI table is loaded: %d\n", ret);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int io_fini(void)
@@ -889,7 +894,7 @@ HAPI int io_fini(void)
        if (ret < 0) {
                DbgPrint("DB finalized: %d\n", ret);
        }
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index 9c8f217..cba5b95 100644 (file)
@@ -27,7 +27,7 @@
 #include <Eina.h>
 
 #include <dlog.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 
 #include "util.h"
 #include "debug.h"
@@ -151,10 +151,10 @@ HAPI int liveinfo_open_fifo(struct liveinfo *info)
        info->fp = fopen(info->fifo_name, "w");
        if (!info->fp) {
                ErrPrint("open: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void liveinfo_close_fifo(struct liveinfo *info)
index a20f4aa..e71894d 100644 (file)
 #include <dlog.h>
 
 #if defined(HAVE_LIVEBOX)
+
+#include <dynamicbox_service.h>
+#include <dynamicbox_conf.h>
+
 #include "slave_life.h"
 #include "slave_rpc.h"
 #include "client_life.h"
@@ -68,9 +72,9 @@ static inline int app_create(void)
 {
        int ret;
 
-       if (access(SLAVE_LOG_PATH, R_OK | W_OK) != 0) {
-               if (mkdir(SLAVE_LOG_PATH, 0755) < 0) {
-                       ErrPrint("Failed to create %s (%s)\n", SLAVE_LOG_PATH, strerror(errno));
+       if (access(DYNAMICBOX_CONF_LOG_PATH, R_OK | W_OK) != 0) {
+               if (mkdir(DYNAMICBOX_CONF_LOG_PATH, 0755) < 0) {
+                       ErrPrint("Failed to create %s (%s)\n", DYNAMICBOX_CONF_LOG_PATH, strerror(errno));
                }
        }
 
@@ -144,24 +148,24 @@ static inline int app_create(void)
 
        script_init();
 
-       if (util_service_is_enabled(SERVICE_FILE)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_FILE)) {
                file_service_init();
        }
 
-       if (util_service_is_enabled(SERVICE_UTILITY)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_UTILITY)) {
                utility_service_init();
        }
 #endif
 
-       if (util_service_is_enabled(SERVICE_SHORTCUT)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_SHORTCUT)) {
                shortcut_service_init();
        }
 
-       if (util_service_is_enabled(SERVICE_NOTIFICATION)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_NOTIFICATION)) {
                notification_service_init();
        }
 
-       if (util_service_is_enabled(SERVICE_BADGE)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_BADGE)) {
                badge_service_init();
        }
 
@@ -172,21 +176,21 @@ static inline int app_terminate(void)
 {
        int ret;
 
-       if (util_service_is_enabled(SERVICE_BADGE)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_BADGE)) {
                ret = badge_service_fini();
                if (ret < 0) {
                        DbgPrint("badge: %d\n", ret);
                }
        }
 
-       if (util_service_is_enabled(SERVICE_NOTIFICATION)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_NOTIFICATION)) {
                ret = notification_service_fini();
                if (ret < 0) {
                        DbgPrint("noti: %d\n", ret);
                }
        }
 
-       if (util_service_is_enabled(SERVICE_SHORTCUT)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_SHORTCUT)) {
                ret = shortcut_service_fini();
                if (ret < 0) {
                        DbgPrint("shortcut: %d\n", ret);
@@ -194,7 +198,7 @@ static inline int app_terminate(void)
        }
 
 #if defined(HAVE_LIVEBOX)
-       if (util_service_is_enabled(SERVICE_FILE)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_FILE)) {
                ret = file_service_fini();
                if (ret < 0) {
                        DbgPrint("Finalize the file service: %d\n", ret);
@@ -211,7 +215,7 @@ static inline int app_terminate(void)
                DbgPrint("dead signal handler finalized: %d\n", ret);
        }
 
-       if (util_service_is_enabled(SERVICE_UTILITY)) {
+       if (util_service_is_enabled(DYNAMICBOX_CONF_SERVICE_UTILITY)) {
                ret = utility_service_fini();
                if (ret < 0) {
                        DbgPrint("utility: %d\n", ret);
@@ -349,8 +353,8 @@ int main(int argc, char *argv[])
                return -EFAULT;
        }
 
-       conf_init();
-       conf_loader();
+       dynamicbox_conf_init();
+       dynamicbox_conf_load();
 
        /*!
         * How could we care this return values?
@@ -365,12 +369,12 @@ int main(int argc, char *argv[])
         * \note
         * Clear old contents files before start the master provider.
         */
-       (void)util_unlink_files(ALWAYS_PATH);
-       (void)util_unlink_files(READER_PATH);
-       (void)util_unlink_files(IMAGE_PATH);
-       (void)util_unlink_files(SLAVE_LOG_PATH);
+       (void)util_unlink_files(DYNAMICBOX_CONF_ALWAYS_PATH);
+       (void)util_unlink_files(DYNAMICBOX_CONF_READER_PATH);
+       (void)util_unlink_files(DYNAMICBOX_CONF_IMAGE_PATH);
+       (void)util_unlink_files(DYNAMICBOX_CONF_LOG_PATH);
 
-       if (util_free_space(IMAGE_PATH) < MINIMUM_SPACE) {
+       if (util_free_space(DYNAMICBOX_CONF_IMAGE_PATH) < DYNAMICBOX_CONF_MINIMUM_SPACE) {
                util_remove_emergency_disk();
                util_prepare_emergency_disk();
        }
@@ -413,14 +417,6 @@ int main(int argc, char *argv[])
        g_type_init();
 #endif
 
-#if defined(HAVE_LIVEBOX)
-       /*!
-        * \note
-        * conf_update_size requires util_screen_init.
-        */
-       conf_update_size();
-#endif
-
        app_create();
 
        vconf_get_int(VCONFKEY_MASTER_RESTART_COUNT, &restart_count);
@@ -448,7 +444,7 @@ int main(int argc, char *argv[])
        }
 #endif
 
-       conf_reset();
+       dynamicbox_conf_reset();
        return 0;
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index b892534..e14ca90
@@ -19,7 +19,7 @@
 
 #include <dlog.h>
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #else
 #include "lite-errno.h"
 #endif
@@ -762,7 +762,7 @@ HAPI int notification_service_init(void)
 {
        if (s_info.svc_ctx) {
                ErrPrint("Already initialized\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        _notification_init();
@@ -770,7 +770,7 @@ HAPI int notification_service_init(void)
        s_info.svc_ctx = service_common_create(NOTIFICATION_SOCKET, service_thread_main, NULL);
        if (!s_info.svc_ctx) {
                ErrPrint("Unable to activate service thread\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), NOTIFICATION_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
@@ -778,7 +778,7 @@ HAPI int notification_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
@@ -787,24 +787,24 @@ HAPI int notification_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
        DbgPrint("Successfully initiated\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int notification_service_fini(void)
 {
        if (!s_info.svc_ctx) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        service_common_destroy(s_info.svc_ctx);
        s_info.svc_ctx = NULL;
        DbgPrint("Successfully Finalized\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index 6eb4dba..16da610 100644 (file)
@@ -23,8 +23,9 @@
 #include <Eina.h>
 
 #include <packet.h>
-#include <livebox-errno.h>
-#include <livebox-service.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_conf.h>
 #include <pkgmgr-info.h>
 #include <ail.h>
 
@@ -60,10 +61,10 @@ struct fault_info {
 
 struct pkg_info {
        char *pkgid;
-       char *lbid;
+       char *dbox_id;
 
        struct {
-               enum lb_type type;
+               enum dynamicbox_dbox_type type;
 
                union {
                        struct {
@@ -90,10 +91,10 @@ struct pkg_info {
                int timeout;
                double period;
                char *libexec;
-       } lb;
+       } dbox;
 
        struct {
-               enum pd_type type;
+               enum dynamicbox_gbar_type type;
 
                union {
                        struct {
@@ -112,7 +113,7 @@ struct pkg_info {
 
                unsigned int width;
                unsigned int height;
-       } pd;
+       } gbar;
 
        int network;
        int secured;
@@ -184,7 +185,7 @@ static int slave_fault_cb(struct slave_node *slave, void *data)
        DbgPrint("Slave critical fault - package: %s (by slave fault %s\n", package_name(info), slave_name(slave));
        EINA_LIST_FOREACH_SAFE(info->inst_list, l, n, inst) {
                DbgPrint("Destroy instance %p\n", inst);
-               instance_destroyed(inst, LB_STATUS_ERROR_FAULT);
+               instance_destroyed(inst, DBOX_STATUS_ERROR_FAULT);
        }
 
        return 0;
@@ -200,7 +201,7 @@ static int slave_deactivated_cb(struct slave_node *slave, void *data)
 
        if (info->fault_info) {
                EINA_LIST_FOREACH_SAFE(info->inst_list, l, n, inst) {
-                       instance_destroyed(inst, LB_STATUS_ERROR_FAULT);
+                       instance_destroyed(inst, DBOX_STATUS_ERROR_FAULT);
                }
        } else {
                EINA_LIST_FOREACH_SAFE(info->inst_list, l, n, inst) {
@@ -283,29 +284,29 @@ static int slave_resumed_cb(struct slave_node *slave, void *data)
 static inline void destroy_package(struct pkg_info *info)
 {
        eina_list_free(info->ctx_list);
-       /* This items will be deleted from group_del_livebox */
+       /* This items will be deleted from group_del_dynamicbox */
        info->ctx_list = NULL;
 
-       group_del_livebox(info->lbid);
+       group_del_dynamicbox(info->dbox_id);
        package_clear_fault(info);
 
        s_info.pkg_list = eina_list_remove(s_info.pkg_list, info);
 
-       if (info->lb.type == LB_TYPE_SCRIPT) {
-               DbgFree(info->lb.info.script.path);
-               DbgFree(info->lb.info.script.group);
+       if (info->dbox.type == DBOX_TYPE_SCRIPT) {
+               DbgFree(info->dbox.info.script.path);
+               DbgFree(info->dbox.info.script.group);
        }
 
-       if (info->pd.type == PD_TYPE_SCRIPT) {
-               DbgFree(info->pd.info.script.path);
-               DbgFree(info->pd.info.script.group);
+       if (info->gbar.type == GBAR_TYPE_SCRIPT) {
+               DbgFree(info->gbar.info.script.path);
+               DbgFree(info->gbar.info.script.group);
        }
 
        DbgFree(info->script);
        DbgFree(info->abi);
-       DbgFree(info->lbid);
-       DbgFree(info->lb.libexec);
-       DbgFree(info->lb.auto_launch);
+       DbgFree(info->dbox_id);
+       DbgFree(info->dbox.libexec);
+       DbgFree(info->dbox.auto_launch);
        DbgFree(info->pkgid);
 
        DbgFree(info);
@@ -317,181 +318,181 @@ static inline int load_conf(struct pkg_info *info)
        const char *str;
        const char *group;
 
-       parser = parser_load(info->lbid);
+       parser = parser_load(info->dbox_id);
        if (!parser) {
-               info->lb.size_list = 0x01; /* Default */
+               info->dbox.size_list = 0x01; /* Default */
 
-               info->script = strdup(DEFAULT_SCRIPT);
+               info->script = strdup(DYNAMICBOX_CONF_DEFAULT_SCRIPT);
                if (!info->script) {
                        ErrPrint("Heap: %s\n", strerror(errno));
-                       return LB_STATUS_ERROR_MEMORY;
+                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                }
 
-               info->abi = strdup(DEFAULT_ABI);
+               info->abi = strdup(DYNAMICBOX_CONF_DEFAULT_ABI);
                if (!info->abi) {
                        ErrPrint("Heap: %s\n", strerror(errno));
                        DbgFree(info->script);
                        info->script = NULL;
-                       return LB_STATUS_ERROR_MEMORY;
+                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                }
 
-               info->pd.width = g_conf.width;
-               info->pd.height = g_conf.height >> 2;
-               info->lb.pinup = 1;
-               return LB_STATUS_SUCCESS;
+               info->gbar.width = DYNAMICBOX_CONF_BASE_W;
+               info->gbar.height = DYNAMICBOX_CONF_BASE_H >> 2;
+               info->dbox.pinup = 1;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       info->lb.type = LB_TYPE_FILE;
-       if (parser_text_lb(parser)) {
-               info->lb.type = LB_TYPE_TEXT;
-       } else if (parser_buffer_lb(parser)) {
-               info->lb.type = LB_TYPE_BUFFER;
+       info->dbox.type = DBOX_TYPE_FILE;
+       if (parser_text_dbox(parser)) {
+               info->dbox.type = DBOX_TYPE_TEXT;
+       } else if (parser_buffer_dbox(parser)) {
+               info->dbox.type = DBOX_TYPE_BUFFER;
        } else {
-               str = parser_lb_path(parser);
+               str = parser_dbox_path(parser);
                if (str) {
-                       info->lb.type = LB_TYPE_SCRIPT;
+                       info->dbox.type = DBOX_TYPE_SCRIPT;
 
-                       info->lb.info.script.path = strdup(str);
-                       if (!info->lb.info.script.path) {
+                       info->dbox.info.script.path = strdup(str);
+                       if (!info->dbox.info.script.path) {
                                ErrPrint("Heap: %s\n", strerror(errno));
                                parser_unload(parser);
-                               return LB_STATUS_ERROR_MEMORY;
+                               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                        }
 
-                       str = parser_lb_group(parser);
+                       str = parser_dbox_group(parser);
                        if (str) {
-                               info->lb.info.script.group = strdup(str);
-                               if (!info->lb.info.script.group) {
+                               info->dbox.info.script.group = strdup(str);
+                               if (!info->dbox.info.script.group) {
                                        ErrPrint("Heap: %s\n", strerror(errno));
-                                       DbgFree(info->lb.info.script.path);
+                                       DbgFree(info->dbox.info.script.path);
                                        parser_unload(parser);
-                                       return LB_STATUS_ERROR_MEMORY;
+                                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                                }
                        }
                }
        }
 
-       if (parser_text_pd(parser)) {
-               info->pd.type = PD_TYPE_TEXT;
-       } else if (parser_buffer_pd(parser)) {
-               info->pd.type = PD_TYPE_BUFFER;
+       if (parser_text_gbar(parser)) {
+               info->gbar.type = GBAR_TYPE_TEXT;
+       } else if (parser_buffer_gbar(parser)) {
+               info->gbar.type = GBAR_TYPE_BUFFER;
        } else {
-               str = parser_pd_path(parser);
+               str = parser_gbar_path(parser);
                if (str) {
-                       info->pd.type = PD_TYPE_SCRIPT;
-                       info->pd.info.script.path = strdup(str);
-                       if (!info->pd.info.script.path) {
+                       info->gbar.type = GBAR_TYPE_SCRIPT;
+                       info->gbar.info.script.path = strdup(str);
+                       if (!info->gbar.info.script.path) {
                                ErrPrint("Heap: %s\n", strerror(errno));
-                               if (info->lb.type == LB_TYPE_SCRIPT) {
-                                       DbgFree(info->lb.info.script.path);
-                                       DbgFree(info->lb.info.script.group);
+                               if (info->dbox.type == DBOX_TYPE_SCRIPT) {
+                                       DbgFree(info->dbox.info.script.path);
+                                       DbgFree(info->dbox.info.script.group);
                                }
                                parser_unload(parser);
-                               return LB_STATUS_ERROR_MEMORY;
+                               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                        }
 
-                       str = parser_pd_group(parser);
+                       str = parser_gbar_group(parser);
                        if (str) {
-                               info->pd.info.script.group = strdup(str);
-                               if (!info->pd.info.script.group) {
+                               info->gbar.info.script.group = strdup(str);
+                               if (!info->gbar.info.script.group) {
                                        ErrPrint("Heap: %s\n", strerror(errno));
-                                       DbgFree(info->pd.info.script.path);
-                                       if (info->lb.type == LB_TYPE_SCRIPT) {
-                                               DbgFree(info->lb.info.script.path);
-                                               DbgFree(info->lb.info.script.group);
+                                       DbgFree(info->gbar.info.script.path);
+                                       if (info->dbox.type == DBOX_TYPE_SCRIPT) {
+                                               DbgFree(info->dbox.info.script.path);
+                                               DbgFree(info->dbox.info.script.group);
                                        }
                                        parser_unload(parser);
-                                       return LB_STATUS_ERROR_MEMORY;
+                                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                                }
                        }
                }
        }
 
        str = parser_script(parser);
-       str = str ? str : DEFAULT_SCRIPT;
+       str = str ? str : DYNAMICBOX_CONF_DEFAULT_SCRIPT;
        info->script = strdup(str);
        if (!info->script) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               if (info->pd.type == PD_TYPE_SCRIPT) {
-                       DbgFree(info->pd.info.script.path);
-                       DbgFree(info->pd.info.script.group);
+               if (info->gbar.type == GBAR_TYPE_SCRIPT) {
+                       DbgFree(info->gbar.info.script.path);
+                       DbgFree(info->gbar.info.script.group);
                }
 
-               if (info->lb.type == LB_TYPE_SCRIPT) {
-                       DbgFree(info->lb.info.script.path);
-                       DbgFree(info->lb.info.script.group);
+               if (info->dbox.type == DBOX_TYPE_SCRIPT) {
+                       DbgFree(info->dbox.info.script.path);
+                       DbgFree(info->dbox.info.script.group);
                }
 
                parser_unload(parser);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        str = parser_abi(parser);
-       str = str ? str : DEFAULT_ABI;
+       str = str ? str : DYNAMICBOX_CONF_DEFAULT_ABI;
        info->abi = strdup(str);
        if (!info->abi) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(info->script);
-               if (info->pd.type == PD_TYPE_SCRIPT) {
-                       DbgFree(info->pd.info.script.path);
-                       DbgFree(info->pd.info.script.group);
+               if (info->gbar.type == GBAR_TYPE_SCRIPT) {
+                       DbgFree(info->gbar.info.script.path);
+                       DbgFree(info->gbar.info.script.group);
                }
 
-               if (info->lb.type == LB_TYPE_SCRIPT) {
-                       DbgFree(info->lb.info.script.path);
-                       DbgFree(info->lb.info.script.group);
+               if (info->dbox.type == DBOX_TYPE_SCRIPT) {
+                       DbgFree(info->dbox.info.script.path);
+                       DbgFree(info->dbox.info.script.group);
                }
                parser_unload(parser);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       info->lb.timeout = parser_timeout(parser);
+       info->dbox.timeout = parser_timeout(parser);
        info->network = parser_network(parser);
 
-       info->lb.period = parser_period(parser);
-       if (info->lb.period < 0.0f) {
-               info->lb.period = 0.0f;
-       } else if (info->lb.period > 0.0f && info->lb.period < MINIMUM_PERIOD) {
-               info->lb.period = MINIMUM_PERIOD;
+       info->dbox.period = parser_period(parser);
+       if (info->dbox.period < 0.0f) {
+               info->dbox.period = 0.0f;
+       } else if (info->dbox.period > 0.0f && info->dbox.period < DYNAMICBOX_CONF_MINIMUM_PERIOD) {
+               info->dbox.period = DYNAMICBOX_CONF_MINIMUM_PERIOD;
        }
 
-       info->lb.size_list = parser_size(parser);
+       info->dbox.size_list = parser_size(parser);
 
        str = parser_auto_launch(parser);
        str = str ? str : "";
-       info->lb.auto_launch = strdup(str);
-       if (!info->lb.auto_launch) {
+       info->dbox.auto_launch = strdup(str);
+       if (!info->dbox.auto_launch) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(info->abi);
                DbgFree(info->script);
-               if (info->pd.type == PD_TYPE_SCRIPT) {
-                       DbgFree(info->pd.info.script.path);
-                       DbgFree(info->pd.info.script.group);
+               if (info->gbar.type == GBAR_TYPE_SCRIPT) {
+                       DbgFree(info->gbar.info.script.path);
+                       DbgFree(info->gbar.info.script.group);
                }
 
-               if (info->lb.type == LB_TYPE_SCRIPT) {
-                       DbgFree(info->lb.info.script.path);
-                       DbgFree(info->lb.info.script.group);
+               if (info->dbox.type == DBOX_TYPE_SCRIPT) {
+                       DbgFree(info->dbox.info.script.path);
+                       DbgFree(info->dbox.info.script.group);
                }
                parser_unload(parser);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        info->secured = parser_secured(parser);
-       info->lb.pinup = parser_pinup(parser);
+       info->dbox.pinup = parser_pinup(parser);
 
-       parser_get_pdsize(parser, &info->pd.width, &info->pd.height);
+       parser_get_gbar_size(parser, &info->gbar.width, &info->gbar.height);
 
        group = parser_group_str(parser);
-       if (group && group_add_livebox(group, info->lbid) < 0) {
-               ErrPrint("Failed to build cluster tree for %s{%s}\n", info->lbid, group);
+       if (group && group_add_dynamicbox(group, info->dbox_id) < 0) {
+               ErrPrint("Failed to build cluster tree for %s{%s}\n", info->dbox_id, group);
        }
 
        parser_unload(parser);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI struct pkg_info *package_create(const char *pkgid, const char *lbid)
+HAPI struct pkg_info *package_create(const char *pkgid, const char *dbox_id)
 {
        struct pkg_info *pkginfo;
 
@@ -508,18 +509,11 @@ HAPI struct pkg_info *package_create(const char *pkgid, const char *lbid)
                return NULL;
        }
 
-       pkginfo->lbid = io_livebox_pkgname(lbid);
-       if (!pkginfo->lbid) {
+       pkginfo->dbox_id = io_dynamicbox_pkgname(dbox_id);
+       if (!pkginfo->dbox_id) {
                ErrPrint("Failed to get pkgname, fallback to fs checker\n");
-               if (util_validate_livebox_package(lbid) < 0) {
-                       ErrPrint("Invalid package name: %s\n", lbid);
-                       DbgFree(pkginfo->pkgid);
-                       DbgFree(pkginfo);
-                       return NULL;
-               }
-
-               pkginfo->lbid = strdup(lbid);
-               if (!pkginfo->lbid) {
+               pkginfo->dbox_id = strdup(dbox_id);
+               if (!pkginfo->dbox_id) {
                        ErrPrint("Heap: %s\n", strerror(errno));
                        DbgFree(pkginfo->pkgid);
                        DbgFree(pkginfo);
@@ -531,7 +525,7 @@ HAPI struct pkg_info *package_create(const char *pkgid, const char *lbid)
                ErrPrint("Failed to load DB, fall back to conf file loader\n");
                if (load_conf(pkginfo) < 0) {
                        ErrPrint("Failed to initiate the conf file loader\n");
-                       DbgFree(pkginfo->lbid);
+                       DbgFree(pkginfo->dbox_id);
                        DbgFree(pkginfo->pkgid);
                        DbgFree(pkginfo);
                        return NULL;
@@ -548,7 +542,7 @@ HAPI struct pkg_info *package_create(const char *pkgid, const char *lbid)
 HAPI int package_destroy(struct pkg_info *info)
 {
        package_unref(info);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI Eina_List *package_ctx_info(struct pkg_info *pkginfo)
@@ -566,49 +560,45 @@ HAPI void package_del_ctx_info(struct pkg_info *pkginfo, struct context_info *in
        pkginfo->ctx_list = eina_list_remove(pkginfo->ctx_list, info);
 }
 
-HAPI char *package_lb_pkgname(const char *pkgname)
+HAPI char *package_dbox_pkgname(const char *pkgname)
 {
-       char *lbid;
-
-       lbid = io_livebox_pkgname(pkgname);
-       if (!lbid) {
-               if (util_validate_livebox_package(pkgname) < 0) {
-                       return NULL;
-               }
+       char *dbox_id;
 
-               lbid = strdup(pkgname);
-               if (!lbid) {
+       dbox_id = io_dynamicbox_pkgname(pkgname);
+       if (!dbox_id) {
+               dbox_id = strdup(pkgname);
+               if (!dbox_id) {
                        ErrPrint("Heap: %s\n", strerror(errno));
                        return NULL;
                }
        }
 
-       return lbid;
+       return dbox_id;
 }
 
-HAPI int package_is_lb_pkgname(const char *pkgname)
+HAPI int package_is_dbox_pkgname(const char *pkgname)
 {
-       char *lbid;
+       char *dbox_id;
        int ret;
 
-       lbid = package_lb_pkgname(pkgname);
-       ret = !!lbid;
-       DbgFree(lbid);
+       dbox_id = package_dbox_pkgname(pkgname);
+       ret = !!dbox_id;
+       DbgFree(dbox_id);
 
        return ret;
 }
 
-HAPI struct pkg_info *package_find(const char *lbid)
+HAPI struct pkg_info *package_find(const char *dbox_id)
 {
        Eina_List *l;
        struct pkg_info *info;
 
-       if (!lbid) {
+       if (!dbox_id) {
                return NULL;
        }
 
        EINA_LIST_FOREACH(s_info.pkg_list, l, info) {
-               if (!strcmp(info->lbid, lbid)) {
+               if (!strcmp(info->dbox_id, dbox_id)) {
                        return info;
                }
        }
@@ -616,15 +606,15 @@ HAPI struct pkg_info *package_find(const char *lbid)
        return NULL;
 }
 
-HAPI struct inst_info *package_find_instance_by_id(const char *lbid, const char *id)
+HAPI struct inst_info *package_find_instance_by_id(const char *dbox_id, const char *id)
 {
        Eina_List *l;
        struct inst_info *inst;
        struct pkg_info *info;
 
-       info = package_find(lbid);
+       info = package_find(dbox_id);
        if (!info) {
-               ErrPrint("Package %s is not exists\n", lbid);
+               ErrPrint("Package %s is not exists\n", dbox_id);
                return NULL;
        }
 
@@ -637,15 +627,15 @@ HAPI struct inst_info *package_find_instance_by_id(const char *lbid, const char
        return NULL;
 }
 
-HAPI struct inst_info *package_find_instance_by_timestamp(const char *lbid, double timestamp)
+HAPI struct inst_info *package_find_instance_by_timestamp(const char *dbox_id, double timestamp)
 {
        Eina_List *l;
        struct inst_info *inst;
        struct pkg_info *info;
 
-       info = package_find(lbid);
+       info = package_find(dbox_id);
        if (!info) {
-               ErrPrint("Package %s is not exists\n", lbid);
+               ErrPrint("Package %s is not exists\n", dbox_id);
                return NULL;
        }
 
@@ -661,27 +651,27 @@ HAPI struct inst_info *package_find_instance_by_timestamp(const char *lbid, doub
 HAPI int package_dump_fault_info(struct pkg_info *info)
 {
        if (!info->fault_info) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        CRITICAL_LOG("=============\n");
        CRITICAL_LOG("faulted at %lf\n", info->fault_info->timestamp);
-       CRITICAL_LOG("Package: %s\n", info->lbid);
+       CRITICAL_LOG("Package: %s\n", info->dbox_id);
        CRITICAL_LOG("Function: %s\n", info->fault_info->function);
        CRITICAL_LOG("InstanceID: %s\n", info->fault_info->filename);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int package_get_fault_info(struct pkg_info *info, double *timestamp, const char **filename, const char **function)
 {
        if (!info->fault_info) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        *timestamp = info->fault_info->timestamp;
        *filename = info->fault_info->filename;
        *function = info->fault_info->function;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int package_set_fault_info(struct pkg_info *info, double timestamp, const char *filename, const char *function)
@@ -693,7 +683,7 @@ HAPI int package_set_fault_info(struct pkg_info *info, double timestamp, const c
        fault = calloc(1, sizeof(*fault));
        if (!fault) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        fault->timestamp = timestamp;
@@ -708,7 +698,7 @@ HAPI int package_set_fault_info(struct pkg_info *info, double timestamp, const c
        if (!fault->filename) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(fault);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        fault->function = strdup(function);
@@ -716,18 +706,18 @@ HAPI int package_set_fault_info(struct pkg_info *info, double timestamp, const c
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(fault->filename);
                DbgFree(fault);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        info->fault_info = fault;
        info->fault_count++;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int package_clear_fault(struct pkg_info *info)
 {
        if (!info->fault_info) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
        
        package_dump_fault_info(info);
@@ -736,7 +726,7 @@ HAPI int package_clear_fault(struct pkg_info *info)
        DbgFree(info->fault_info->filename);
        DbgFree(info->fault_info);
        info->fault_info = NULL;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI const int const package_is_fault(const struct pkg_info *info)
@@ -751,22 +741,22 @@ HAPI struct slave_node * const package_slave(const struct pkg_info *info)
 
 HAPI const int const package_timeout(const struct pkg_info *info)
 {
-       return info->lb.timeout;
+       return info->dbox.timeout;
 }
 
 HAPI void package_set_timeout(struct pkg_info *info, int timeout)
 {
-       info->lb.timeout = timeout;
+       info->dbox.timeout = timeout;
 }
 
 HAPI const double const package_period(const struct pkg_info *info)
 {
-       return info->lb.period;
+       return info->dbox.period;
 }
 
 HAPI void package_set_period(struct pkg_info *info, double period)
 {
-       info->lb.period = period;
+       info->dbox.period = period;
 }
 
 HAPI const int const package_secured(const struct pkg_info *info)
@@ -791,12 +781,12 @@ HAPI int package_set_script(struct pkg_info *info, const char *script)
        tmp = strdup(script);
        if (!tmp) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        DbgFree(info->script);
        info->script = tmp;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI const char * const package_abi(const struct pkg_info *info)
@@ -810,139 +800,139 @@ HAPI int package_set_abi(struct pkg_info *info, const char *abi)
        tmp = strdup(abi);
        if (!tmp) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        DbgFree(info->abi);
        info->abi = tmp;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI const char * const package_lb_path(const struct pkg_info *info)
+HAPI const char * const package_dbox_path(const struct pkg_info *info)
 {
-       if (info->lb.type != LB_TYPE_SCRIPT) {
+       if (info->dbox.type != DBOX_TYPE_SCRIPT) {
                return NULL;
        }
 
-       return info->lb.info.script.path;
+       return info->dbox.info.script.path;
 }
 
-HAPI int package_set_lb_path(struct pkg_info *info, const char *path)
+HAPI int package_set_dbox_path(struct pkg_info *info, const char *path)
 {
        char *tmp;
 
-       if (info->lb.type != LB_TYPE_SCRIPT) {
-               return LB_STATUS_ERROR_INVALID;
+       if (info->dbox.type != DBOX_TYPE_SCRIPT) {
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        tmp = strdup(path);
        if (!tmp) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       DbgFree(info->lb.info.script.path);
-       info->lb.info.script.path = tmp;
-       return LB_STATUS_SUCCESS;
+       DbgFree(info->dbox.info.script.path);
+       info->dbox.info.script.path = tmp;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI const char * const package_lb_group(const struct pkg_info *info)
+HAPI const char * const package_dbox_group(const struct pkg_info *info)
 {
-       if (info->lb.type != LB_TYPE_SCRIPT) {
+       if (info->dbox.type != DBOX_TYPE_SCRIPT) {
                return NULL;
        }
 
-       return info->lb.info.script.group;
+       return info->dbox.info.script.group;
 }
 
-HAPI int package_set_lb_group(struct pkg_info *info, const char *group)
+HAPI int package_set_dbox_group(struct pkg_info *info, const char *group)
 {
        char *tmp;
 
-       if (info->lb.type != LB_TYPE_SCRIPT) {
-               return LB_STATUS_ERROR_INVALID;
+       if (info->dbox.type != DBOX_TYPE_SCRIPT) {
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        tmp = strdup(group);
        if (!tmp) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       DbgFree(info->lb.info.script.group);
-       info->lb.info.script.group = tmp;
-       return LB_STATUS_SUCCESS;
+       DbgFree(info->dbox.info.script.group);
+       info->dbox.info.script.group = tmp;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI const char * const package_pd_path(const struct pkg_info *info)
+HAPI const char * const package_gbar_path(const struct pkg_info *info)
 {
-       if (info->pd.type != PD_TYPE_SCRIPT) {
+       if (info->gbar.type != GBAR_TYPE_SCRIPT) {
                return NULL;
        }
 
-       return info->pd.info.script.path;
+       return info->gbar.info.script.path;
 }
 
-HAPI int package_set_pd_path(struct pkg_info *info, const char *path)
+HAPI int package_set_gbar_path(struct pkg_info *info, const char *path)
 {
        char *tmp;
 
-       if (info->pd.type != PD_TYPE_SCRIPT) {
-               return LB_STATUS_ERROR_INVALID;
+       if (info->gbar.type != GBAR_TYPE_SCRIPT) {
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        tmp = strdup(path);
        if (!tmp) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       DbgFree(info->pd.info.script.path);
-       info->pd.info.script.path = tmp;
-       return LB_STATUS_SUCCESS;
+       DbgFree(info->gbar.info.script.path);
+       info->gbar.info.script.path = tmp;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
-HAPI const char * const package_pd_group(const struct pkg_info *info)
+HAPI const char * const package_gbar_group(const struct pkg_info *info)
 {
-       if (info->pd.type != PD_TYPE_SCRIPT) {
+       if (info->gbar.type != GBAR_TYPE_SCRIPT) {
                return NULL;
        }
 
-       return info->pd.info.script.group;
+       return info->gbar.info.script.group;
 }
 
-HAPI int package_set_pd_group(struct pkg_info *info, const char *group)
+HAPI int package_set_gbar_group(struct pkg_info *info, const char *group)
 {
        char *tmp;
 
-       if (info->pd.type != PD_TYPE_SCRIPT) {
-               return LB_STATUS_ERROR_INVALID;
+       if (info->gbar.type != GBAR_TYPE_SCRIPT) {
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        tmp = strdup(group);
        if (!tmp) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       DbgFree(info->pd.info.script.group);
-       info->pd.info.script.group = tmp;
-       return LB_STATUS_SUCCESS;
+       DbgFree(info->gbar.info.script.group);
+       info->gbar.info.script.group = tmp;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI const int const package_pinup(const struct pkg_info *info)
 {
-       return info->lb.pinup;
+       return info->dbox.pinup;
 }
 
 HAPI void package_set_pinup(struct pkg_info *info, int pinup)
 {
-       info->lb.pinup = pinup;
+       info->dbox.pinup = pinup;
 }
 
 HAPI const char * const package_auto_launch(const struct pkg_info *info)
 {
-       return info->lb.auto_launch;
+       return info->dbox.auto_launch;
 }
 
 HAPI void package_set_auto_launch(struct pkg_info *info, const char *auto_launch)
@@ -951,8 +941,8 @@ HAPI void package_set_auto_launch(struct pkg_info *info, const char *auto_launch
                auto_launch = "";
        }
 
-       info->lb.auto_launch = strdup(auto_launch);
-       if (!info->lb.auto_launch) {
+       info->dbox.auto_launch = strdup(auto_launch);
+       if (!info->dbox.auto_launch) {
                ErrPrint("Heap: %s\n", strerror(errno));
                return;
        }
@@ -960,32 +950,32 @@ HAPI void package_set_auto_launch(struct pkg_info *info, const char *auto_launch
 
 HAPI const unsigned int const package_size_list(const struct pkg_info *info)
 {
-       return info->lb.size_list;
+       return info->dbox.size_list;
 }
 
 HAPI void package_set_size_list(struct pkg_info *info, unsigned int size_list)
 {
-       info->lb.size_list = size_list;
+       info->dbox.size_list = size_list;
 }
 
-HAPI const int const package_pd_width(const struct pkg_info *info)
+HAPI const int const package_gbar_width(const struct pkg_info *info)
 {
-       return info->pd.width;
+       return info->gbar.width;
 }
 
-HAPI void package_set_pd_width(struct pkg_info *info, int width)
+HAPI void package_set_gbar_width(struct pkg_info *info, int width)
 {
-       info->pd.width = width;
+       info->gbar.width = width;
 }
 
-HAPI const int const package_pd_height(const struct pkg_info *info)
+HAPI const int const package_gbar_height(const struct pkg_info *info)
 {
-       return info->pd.height;
+       return info->gbar.height;
 }
 
-HAPI void package_set_pd_height(struct pkg_info *info, int height)
+HAPI void package_set_gbar_height(struct pkg_info *info, int height)
 {
-       info->pd.height = height;
+       info->gbar.height = height;
 }
 
 HAPI struct pkg_info * const package_ref(struct pkg_info *info)
@@ -1015,19 +1005,19 @@ HAPI const int const package_refcnt(const struct pkg_info *info)
        return info->refcnt;
 }
 
-HAPI const enum lb_type package_lb_type(const struct pkg_info *info)
+HAPI const enum dynamicbox_dbox_type package_dbox_type(const struct pkg_info *info)
 {
-       return info ? info->lb.type : LB_TYPE_NONE;
+       return info ? info->dbox.type : DBOX_TYPE_NONE;
 }
 
-HAPI void package_set_lb_type(struct pkg_info *info, enum lb_type type)
+HAPI void package_set_dbox_type(struct pkg_info *info, enum dynamicbox_dbox_type type)
 {
-       info->lb.type = type;
+       info->dbox.type = type;
 }
 
 HAPI const char * const package_libexec(struct pkg_info *info)
 {
-       return info->lb.libexec;
+       return info->dbox.libexec;
 }
 
 HAPI int package_set_libexec(struct pkg_info *info, const char *libexec)
@@ -1037,12 +1027,12 @@ HAPI int package_set_libexec(struct pkg_info *info, const char *libexec)
        tmp = strdup(libexec);
        if (!tmp) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       DbgFree(info->lb.libexec);
-       info->lb.libexec = tmp;
-       return LB_STATUS_SUCCESS;
+       DbgFree(info->dbox.libexec);
+       info->dbox.libexec = tmp;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int package_network(struct pkg_info *info)
@@ -1055,14 +1045,14 @@ HAPI void package_set_network(struct pkg_info *info, int network)
        info->network = network;
 }
 
-HAPI const enum pd_type const package_pd_type(const struct pkg_info *info)
+HAPI const enum dynamicbox_gbar_type const package_gbar_type(const struct pkg_info *info)
 {
-       return info ? info->pd.type : PD_TYPE_NONE;
+       return info ? info->gbar.type : GBAR_TYPE_NONE;
 }
 
-HAPI void package_set_pd_type(struct pkg_info *info, enum pd_type type)
+HAPI void package_set_gbar_type(struct pkg_info *info, enum dynamicbox_gbar_type type)
 {
-       info->pd.type = type;
+       info->gbar.type = type;
 }
 
 /*!
@@ -1077,10 +1067,10 @@ static inline int assign_new_slave(const char *slave_pkgname, struct pkg_info *i
        s_name = util_slavename();
        if (!s_name) {
                ErrPrint("Failed to get a new slave name\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
-       DbgPrint("New slave[%s] is assigned for %s (using %s / abi[%s])\n", s_name, info->lbid, slave_pkgname, info->abi);
+       DbgPrint("New slave[%s] is assigned for %s (using %s / abi[%s])\n", s_name, info->dbox_id, slave_pkgname, info->abi);
        info->slave = slave_create(s_name, info->secured, info->abi, slave_pkgname, info->network);
 
        DbgFree(s_name);
@@ -1093,13 +1083,13 @@ static inline int assign_new_slave(const char *slave_pkgname, struct pkg_info *i
                 * If the list method couldn't find an "info" from the list,
                 * it just do nothing so I'll leave this.
                 */
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
        /*!
         * \note
         * Slave is not activated yet.
         */
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int package_add_instance(struct pkg_info *info, struct inst_info *inst)
@@ -1107,9 +1097,9 @@ HAPI int package_add_instance(struct pkg_info *info, struct inst_info *inst)
        if (!info->inst_list) {
                char *slave_pkgname;
 
-               slave_pkgname = slave_package_name(info->abi, info->lbid);
+               slave_pkgname = slave_package_name(info->abi, info->dbox_id);
                if (!slave_pkgname) {
-                       return LB_STATUS_ERROR_MEMORY;
+                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                }
 
                info->slave = slave_find_available(slave_pkgname, info->abi, info->secured, info->network);
@@ -1123,7 +1113,7 @@ HAPI int package_add_instance(struct pkg_info *info, struct inst_info *inst)
                        }
                } else {
                        DbgFree(slave_pkgname);
-                       DbgPrint("Slave %s is used for %s\n", slave_name(info->slave), info->lbid);
+                       DbgPrint("Slave %s is used for %s\n", slave_name(info->slave), info->dbox_id);
                }
 
                (void)slave_ref(info->slave);
@@ -1150,7 +1140,7 @@ HAPI int package_add_instance(struct pkg_info *info, struct inst_info *inst)
        }
 
        info->inst_list = eina_list_append(info->inst_list, inst);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int package_del_instance(struct pkg_info *info, struct inst_info *inst)
@@ -1158,7 +1148,7 @@ HAPI int package_del_instance(struct pkg_info *info, struct inst_info *inst)
        info->inst_list = eina_list_remove(info->inst_list, inst);
 
        if (info->inst_list) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (info->slave) {
@@ -1184,7 +1174,7 @@ HAPI int package_del_instance(struct pkg_info *info, struct inst_info *inst)
                package_destroy(info);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI Eina_List *package_instance_list(struct pkg_info *info)
@@ -1202,7 +1192,7 @@ static int client_created_cb(struct client_node *client, void *data)
 
        EINA_LIST_FOREACH(s_info.pkg_list, l, info) {
                if (info->fault_info) {
-                       fault_unicast_info(client, info->lbid, info->fault_info->filename, info->fault_info->function);
+                       fault_unicast_info(client, info->dbox_id, info->fault_info->filename, info->fault_info->function);
                        continue;
                }
 
@@ -1223,7 +1213,7 @@ static int client_created_cb(struct client_node *client, void *data)
                                         */
                                        if (client_is_subscribed(client, instance_cluster(inst), instance_category(inst))) {
                                                instance_unicast_created_event(inst, client);
-                                               DbgPrint("(Subscribed) Created package: %s\n", info->lbid);
+                                               DbgPrint("(Subscribed) Created package: %s\n", info->dbox_id);
                                        }
                                }
 
@@ -1239,17 +1229,17 @@ static int client_created_cb(struct client_node *client, void *data)
        return 0;
 }
 
-static int io_uninstall_cb(const char *pkgid, const char *lbid, int prime, void *data)
+static int io_uninstall_cb(const char *pkgid, const char *dbox_id, int prime, void *data)
 {
        struct pkg_info *info;
        Eina_List *l;
        Eina_List *n;
        struct inst_info *inst;
 
-       DbgPrint("Package %s is uninstalled\n", lbid);
-       info = package_find(lbid);
+       DbgPrint("Package %s is uninstalled\n", dbox_id);
+       info = package_find(dbox_id);
        if (!info) {
-               DbgPrint("%s is not yet loaded\n", lbid);
+               DbgPrint("%s is not yet loaded\n", dbox_id);
                return 0;
        }
 
@@ -1263,7 +1253,7 @@ static int io_uninstall_cb(const char *pkgid, const char *lbid, int prime, void
         */
        if (info->inst_list) {
                EINA_LIST_FOREACH_SAFE(info->inst_list, l, n, inst) {
-                       instance_destroy(inst, INSTANCE_DESTROY_UNINSTALL);
+                       instance_destroy(inst, DBOX_DESTROY_TYPE_UNINSTALL);
                }
        } else {
                package_destroy(info);
@@ -1284,9 +1274,9 @@ static inline void reload_package_info(struct pkg_info *info)
 
        DbgPrint("Already exists, try to update it\n");
 
-       old_period = info->lb.period;
+       old_period = info->dbox.period;
 
-       group_del_livebox(info->lbid);
+       group_del_dynamicbox(info->dbox_id);
        package_clear_fault(info);
 
        /*!
@@ -1300,25 +1290,25 @@ static inline void reload_package_info(struct pkg_info *info)
         * Without "is_uninstalled", the package will be kept
         */
        EINA_LIST_FOREACH_SAFE(info->inst_list, l, n, inst) {
-               width = instance_lb_width(inst);
-               height = instance_lb_height(inst);
-               size_type = livebox_service_size_type(width, height);
-               if (info->lb.size_list & size_type) {
+               width = instance_dbox_width(inst);
+               height = instance_dbox_height(inst);
+               size_type = dynamicbox_service_size_type(width, height);
+               if (info->dbox.size_list & size_type) {
                        if (instance_period(inst) == old_period) {
                                instance_reload_period(inst, package_period(info));
                        }
-                       instance_reload(inst, INSTANCE_DESTROY_UPGRADE);
+                       instance_reload(inst, DBOX_DESTROY_TYPE_UPGRADE);
                } else {
-                       instance_destroy(inst, INSTANCE_DESTROY_UNINSTALL);
+                       instance_destroy(inst, DBOX_DESTROY_TYPE_UNINSTALL);
                }
        }
 }
 
-static int io_install_cb(const char *pkgid, const char *lbid, int prime, void *data)
+static int io_install_cb(const char *pkgid, const char *dbox_id, int prime, void *data)
 {
        struct pkg_info *info;
 
-       info = package_find(lbid);
+       info = package_find(dbox_id);
        if (info) {
                /*!
                 * Already exists. skip to create this.
@@ -1326,11 +1316,11 @@ static int io_install_cb(const char *pkgid, const char *lbid, int prime, void *d
                return 0;
        }
 
-       info = package_create(pkgid, lbid);
+       info = package_create(pkgid, dbox_id);
        if (!info) {
-               ErrPrint("Failed to build an info %s\n", lbid);
+               ErrPrint("Failed to build an info %s\n", dbox_id);
        } else {
-               DbgPrint("Livebox %s is built\n", lbid);
+               DbgPrint("Dynamicbox %s is built\n", dbox_id);
        }
 
        return 0;
@@ -1348,7 +1338,7 @@ static int uninstall_cb(const char *pkgname, enum pkgmgr_status status, double v
 
        EINA_LIST_FOREACH_SAFE(s_info.pkg_list, l, n, info) {
                if (!strcmp(info->pkgid, pkgname)) {
-                       io_uninstall_cb(pkgname, info->lbid, -1, NULL);
+                       io_uninstall_cb(pkgname, info->dbox_id, -1, NULL);
                }
        }
 
@@ -1367,28 +1357,28 @@ static int update_cb(const char *pkgname, enum pkgmgr_status status, double valu
 
        EINA_LIST_FOREACH_SAFE(s_info.pkg_list, l, n, info) {
                if (!strcmp(info->pkgid, pkgname)) {
-                       DbgPrint("Update lbid: %s\n", info->lbid);
-                       if (io_is_exists(info->lbid) == 1) {
+                       DbgPrint("Update dbox_id: %s\n", info->dbox_id);
+                       if (io_is_exists(info->dbox_id) == 1) {
                                reload_package_info(info);
                        } else {
-                               io_uninstall_cb(pkgname, info->lbid, -1, NULL);
+                               io_uninstall_cb(pkgname, info->dbox_id, -1, NULL);
                        }
                }
        }
 
-       (void)io_update_livebox_package(pkgname, io_install_cb, NULL);
+       (void)io_update_dynamicbox_package(pkgname, io_install_cb, NULL);
        return 0;
 }
 
-static int crawling_liveboxes(const char *pkgid, const char *lbid, int prime, void *data)
+static int crawling_dynamicboxes(const char *pkgid, const char *dbox_id, int prime, void *data)
 {
-       if (package_find(lbid)) {
-               ErrPrint("Information of %s is already built\n", lbid);
+       if (package_find(dbox_id)) {
+               ErrPrint("Information of %s is already built\n", dbox_id);
        } else {
                struct pkg_info *info;
-               info = package_create(pkgid, lbid);
+               info = package_create(pkgid, dbox_id);
                if (info) {
-                       DbgPrint("[%s] information is built prime(%d)\n", lbid, prime);
+                       DbgPrint("[%s] information is built prime(%d)\n", dbox_id, prime);
                }
        }
 
@@ -1404,7 +1394,7 @@ HAPI int package_init(void)
        pkgmgr_add_event_callback(PKGMGR_EVENT_UNINSTALL, uninstall_cb, NULL);
        pkgmgr_add_event_callback(PKGMGR_EVENT_UPDATE, update_cb, NULL);
 
-       io_crawling_liveboxes(crawling_liveboxes, NULL);
+       io_crawling_dynamicboxes(crawling_dynamicboxes, NULL);
        return 0;
 }
 
@@ -1426,7 +1416,7 @@ HAPI int package_fini(void)
        EINA_LIST_FOREACH_SAFE(s_info.pkg_list, p_l, p_n, info) {
                EINA_LIST_FOREACH_SAFE(info->inst_list, i_l, i_n, inst) {
                        instance_state_reset(inst);
-                       instance_destroy(inst, INSTANCE_DESTROY_TERMINATE);
+                       instance_destroy(inst, DBOX_DESTROY_TYPE_TERMINATE);
                }
 
                package_destroy(info);
@@ -1446,7 +1436,7 @@ HAPI const char *package_find_by_secured_slave(struct slave_node *slave)
 
        EINA_LIST_FOREACH(s_info.pkg_list, l, info) {
                if (info->slave == slave) {
-                       return info->lbid;
+                       return info->dbox_id;
                }
        }
 
@@ -1455,7 +1445,7 @@ HAPI const char *package_find_by_secured_slave(struct slave_node *slave)
 
 HAPI const char * const package_name(const struct pkg_info *info)
 {
-       return info->lbid;
+       return info->dbox_id;
 }
 
 /*!
@@ -1510,12 +1500,12 @@ HAPI int package_alter_instances_to_client(struct client_node *client, enum alte
                                        if (!instance_has_client(inst, client)) {
                                                instance_unicast_created_event(inst, client);
                                                instance_add_client(inst, client);
-                                               DbgPrint("(Subscribed) Created package: %s\n", info->lbid);
+                                               DbgPrint("(Subscribed) Created package: %s\n", info->dbox_id);
                                        }
                                        break;
                                case ALTER_DESTROY:
                                        if (instance_has_client(inst, client)) {
-                                               instance_unicast_deleted_event(inst, client, LB_STATUS_SUCCESS);
+                                               instance_unicast_deleted_event(inst, client, DBOX_STATUS_ERROR_NONE);
                                                instance_del_client(inst, client);
                                        }
                                        break;
@@ -1577,7 +1567,7 @@ HAPI int package_faulted(struct pkg_info *pkg, int broadcast)
        slave = package_slave(pkg);
        if (!slave) {
                ErrPrint("Package has no slave?\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        /* Emulated fault routine */
@@ -1589,10 +1579,10 @@ HAPI int package_faulted(struct pkg_info *pkg, int broadcast)
        DbgPrint("package: %s (forucely faulted %s)\n", package_name(pkg), slave_name(slave));
        EINA_LIST_FOREACH_SAFE(pkg->inst_list, l, n, inst) {
                DbgPrint("Destroy instance %p\n", inst);
-               instance_destroy(inst, INSTANCE_DESTROY_FAULT);
+               instance_destroy(inst, DBOX_DESTROY_TYPE_FAULT);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index a7633bd..bf2b187 100644 (file)
@@ -22,8 +22,9 @@
 #include <Eina.h>
 #include <dlog.h>
 
-#include <livebox-service.h>
-#include <livebox-errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_conf.h>
 
 #include "util.h"
 #include "debug.h"
@@ -46,20 +47,20 @@ struct parser {
        int network;
        char *auto_launch;
        unsigned int size;
-       unsigned int pd_width;
-       unsigned int pd_height;
+       unsigned int gbar_width;
+       unsigned int gbar_height;
        char *group;
        int secured;
 
-       char *pd_path;
-       char *pd_group;
+       char *gbar_path;
+       char *gbar_group;
 
-       char *lb_path;
-       char *lb_group;
+       char *dbox_path;
+       char *dbox_group;
        int pinup;
-       int text_pd;
+       int text_gbar;
        int text_lb;
-       int buffer_pd;
+       int buffer_gbar;
        int buffer_lb;
 
        char *abi;
@@ -102,24 +103,24 @@ HAPI unsigned int parser_size(struct parser *handle)
        return handle->size;
 }
 
-HAPI const char *parser_lb_path(struct parser *handle)
+HAPI const char *parser_dbox_path(struct parser *handle)
 {
-       return handle->lb_path;
+       return handle->dbox_path;
 }
 
-HAPI const char *parser_lb_group(struct parser *handle)
+HAPI const char *parser_dbox_group(struct parser *handle)
 {
-       return handle->lb_group;
+       return handle->dbox_group;
 }
 
-HAPI const char *parser_pd_path(struct parser *handle)
+HAPI const char *parser_gbar_path(struct parser *handle)
 {
-       return handle->pd_path;
+       return handle->gbar_path;
 }
 
-HAPI const char *parser_pd_group(struct parser *handle)
+HAPI const char *parser_gbar_group(struct parser *handle)
 {
-       return handle->pd_group;
+       return handle->gbar_group;
 }
 
 HAPI const char *parser_group_str(struct parser *handle)
@@ -132,10 +133,10 @@ HAPI int parser_secured(struct parser *handle)
        return handle->secured;
 }
 
-HAPI void parser_get_pdsize(struct parser *handle, unsigned int *width, unsigned int *height)
+HAPI void parser_get_gbar_size(struct parser *handle, unsigned int *width, unsigned int *height)
 {
-       *width = handle->pd_width;
-       *height = handle->pd_height;
+       *width = handle->gbar_width;
+       *height = handle->gbar_height;
 }
 
 HAPI int parser_pinup(struct parser *handle)
@@ -143,24 +144,24 @@ HAPI int parser_pinup(struct parser *handle)
        return handle->pinup;
 }
 
-HAPI int parser_text_lb(struct parser *handle)
+HAPI int parser_text_dbox(struct parser *handle)
 {
        return handle->text_lb;
 }
 
-HAPI int parser_text_pd(struct parser *handle)
+HAPI int parser_text_gbar(struct parser *handle)
 {
-       return handle->text_pd;
+       return handle->text_gbar;
 }
 
-HAPI int parser_buffer_lb(struct parser *handle)
+HAPI int parser_buffer_dbox(struct parser *handle)
 {
        return handle->buffer_lb;
 }
 
-HAPI int parser_buffer_pd(struct parser *handle)
+HAPI int parser_buffer_gbar(struct parser *handle)
 {
-       return handle->buffer_pd;
+       return handle->buffer_gbar;
 }
 
 HAPI RETURN_TYPE parser_find(const char *pkgname)
@@ -171,14 +172,14 @@ HAPI RETURN_TYPE parser_find(const char *pkgname)
        int len;
        int ret;
 
-       len = strlen(pkgname) * 2 + strlen(CONF_PATH);
+       len = strlen(pkgname) * 2 + strlen(DYNAMICBOX_CONF_CONF_PATH);
 
        filename = malloc(len);
        if (!filename) {
                return (RETURN_TYPE)0;
        }
 
-       ret = snprintf(filename, len, CONF_PATH, pkgname, pkgname);
+       ret = snprintf(filename, len, DYNAMICBOX_CONF_CONF_PATH, pkgname, pkgname);
        if (ret < 0) {
                DbgFree(filename);
                return (RETURN_TYPE)0;
@@ -286,25 +287,25 @@ static inline int parse_size(const char *buffer, unsigned int *size)
                        break;
                case STOP:
                        if (w == 1 && h == 1) {
-                               *size |= LB_SIZE_TYPE_1x1;
+                               *size |= DBOX_SIZE_TYPE_1x1;
                        } else if (w == 2 && h == 1) {
-                               *size |= LB_SIZE_TYPE_2x1;
+                               *size |= DBOX_SIZE_TYPE_2x1;
                        } else if (w == 2 && h == 2) {
-                               *size |= LB_SIZE_TYPE_2x2;
+                               *size |= DBOX_SIZE_TYPE_2x2;
                        } else if (w == 4 && h == 1) {
-                               *size |= LB_SIZE_TYPE_4x1;
+                               *size |= DBOX_SIZE_TYPE_4x1;
                        } else if (w == 4 && h == 2) {
-                               *size |= LB_SIZE_TYPE_4x2;
+                               *size |= DBOX_SIZE_TYPE_4x2;
                        } else if (w == 4 && h == 3) {
-                               *size |= LB_SIZE_TYPE_4x3;
+                               *size |= DBOX_SIZE_TYPE_4x3;
                        } else if (w == 4 && h == 4) {
-                               *size |= LB_SIZE_TYPE_4x4;
+                               *size |= DBOX_SIZE_TYPE_4x4;
                        } else if (w == 21 && h == 21) {
-                               *size |= LB_SIZE_TYPE_EASY_1x1;
+                               *size |= DBOX_SIZE_TYPE_EASY_1x1;
                        } else if (w == 23 && h == 21) {
-                               *size |= LB_SIZE_TYPE_EASY_3x1;
+                               *size |= DBOX_SIZE_TYPE_EASY_3x1;
                        } else if (w == 23 && h == 23) {
-                               *size |= LB_SIZE_TYPE_EASY_3x3;
+                               *size |= DBOX_SIZE_TYPE_EASY_3x3;
                        } else {
                                ErrPrint("Invalid size type: %dx%d\n", w, h);
                        }
@@ -419,14 +420,14 @@ static void size_handler(struct parser *item, char *buffer)
        }
 }
 
-static void pd_size_handler(struct parser *item, char *buffer)
+static void gbar_size_handler(struct parser *item, char *buffer)
 {
-       if (sscanf(buffer, "%ux%u", &item->pd_width, &item->pd_height) != 2) {
+       if (sscanf(buffer, "%ux%u", &item->gbar_width, &item->gbar_height) != 2) {
                ErrPrint("parse pd size\n");
        }
 }
 
-static void text_lb_handler(struct parser *item, char *buffer)
+static void text_dbox_handler(struct parser *item, char *buffer)
 {
        if (!rtrim(buffer)) {
                return;
@@ -445,16 +446,16 @@ static void script_handler(struct parser *item, char *buffer)
        item->script = dup_rtrim(buffer);
 }
 
-static void buffer_pd_handler(struct parser *item, char *buffer)
+static void buffer_gbar_handler(struct parser *item, char *buffer)
 {
        if (!rtrim(buffer)) {
                return;
        }
 
-       item->buffer_pd = !!atoi(buffer);
+       item->buffer_gbar = !!atoi(buffer);
 }
 
-static void buffer_lb_handler(struct parser *item, char *buffer)
+static void buffer_dbox_handler(struct parser *item, char *buffer)
 {
        if (!rtrim(buffer)) {
                return;
@@ -463,13 +464,13 @@ static void buffer_lb_handler(struct parser *item, char *buffer)
        item->buffer_lb = !!atoi(buffer);
 }
 
-static void text_pd_handler(struct parser *item, char *buffer)
+static void text_gbar_handler(struct parser *item, char *buffer)
 {
        if (!rtrim(buffer)) {
                return;
        }
 
-       item->text_pd = !!atoi(buffer);
+       item->text_gbar = !!atoi(buffer);
 }
 
 static void pinup_handler(struct parser *item, char *buffer)
@@ -481,14 +482,14 @@ static void pinup_handler(struct parser *item, char *buffer)
        item->pinup = !!atoi(buffer);
 }
 
-static void lb_path_handler(struct parser *item, char *buffer)
+static void dbox_path_handler(struct parser *item, char *buffer)
 {
-       if (item->lb_path) {
-               DbgFree(item->lb_path);
+       if (item->dbox_path) {
+               DbgFree(item->dbox_path);
        }
 
-       item->lb_path = dup_rtrim(buffer);
-       if (!item->lb_path) {
+       item->dbox_path = dup_rtrim(buffer);
+       if (!item->dbox_path) {
                ErrPrint("Error: %s\n", strerror(errno));
        }
 }
@@ -514,38 +515,38 @@ static void secured_handler(struct parser *item, char *buffer)
        item->secured = !!atoi(buffer);
 }
 
-static void lb_group_handler(struct parser *item, char *buffer)
+static void dbox_group_handler(struct parser *item, char *buffer)
 {
-       if (item->lb_group) {
-               DbgFree(item->lb_group);
+       if (item->dbox_group) {
+               DbgFree(item->dbox_group);
        }
 
-       item->lb_group = dup_rtrim(buffer);
-       if (!item->lb_group) {
+       item->dbox_group = dup_rtrim(buffer);
+       if (!item->dbox_group) {
                ErrPrint("Error: %s\n", strerror(errno));
        }
 }
 
-static void pd_path_handler(struct parser *item, char *buffer)
+static void gbar_path_handler(struct parser *item, char *buffer)
 {
-       if (item->pd_path) {
-               DbgFree(item->pd_path);
+       if (item->gbar_path) {
+               DbgFree(item->gbar_path);
        }
 
-       item->pd_path = dup_rtrim(buffer);
-       if (!item->pd_path) {
+       item->gbar_path = dup_rtrim(buffer);
+       if (!item->gbar_path) {
                ErrPrint("Error: %s\n", strerror(errno));
        }
 }
 
-static void pd_group_handler(struct parser *item, char *buffer)
+static void gbar_group_handler(struct parser *item, char *buffer)
 {
-       if (item->pd_group) {
-               DbgFree(item->pd_group);
+       if (item->gbar_group) {
+               DbgFree(item->gbar_group);
        }
 
-       item->pd_group = dup_rtrim(buffer);
-       if (!item->pd_group) {
+       item->gbar_group = dup_rtrim(buffer);
+       if (!item->gbar_group) {
                ErrPrint("Error: %s\n", strerror(errno));
        }
 }
@@ -604,44 +605,44 @@ HAPI struct parser *parser_load(const char *pkgname)
                        .handler = secured_handler,
                },
                {
-                       .name = "livebox_path",
-                       .handler = lb_path_handler,
+                       .name = "dynamicbox_path",
+                       .handler = dbox_path_handler,
                },
                {
-                       .name = "livebox_group",
-                       .handler = lb_group_handler,
+                       .name = "dynamicbox_group",
+                       .handler = dbox_group_handler,
                },
                {
-                       .name = "pd_path",
-                       .handler = pd_path_handler,
+                       .name = "gbar_path",
+                       .handler = gbar_path_handler,
                },
                {
-                       .name = "pd_group",
-                       .handler = pd_group_handler,
+                       .name = "gbar_group",
+                       .handler = gbar_group_handler,
                },
                {
-                       .name = "pd_size",
-                       .handler = pd_size_handler,
+                       .name = "gbar_size",
+                       .handler = gbar_size_handler,
                },
                {
                        .name = "pinup",
                        .handler = pinup_handler,
                },
                {
-                       .name = "text_livebox",
-                       .handler = text_lb_handler,
+                       .name = "text_dynamicbox",
+                       .handler = text_dbox_handler,
                },
                {
-                       .name = "text_pd",
-                       .handler = text_pd_handler,
+                       .name = "text_gbar",
+                       .handler = text_gbar_handler,
                },
                {
-                       .name = "buffer_livebox",
-                       .handler = buffer_lb_handler,
+                       .name = "buffer_dynamicbox",
+                       .handler = buffer_dbox_handler,
                },
                {
-                       .name = "buffer_pd",
-                       .handler = buffer_pd_handler,
+                       .name = "buffer_gbar",
+                       .handler = buffer_gbar_handler,
                },
                {
                        .name = "script",
@@ -664,7 +665,7 @@ HAPI struct parser *parser_load(const char *pkgname)
        }
 
        /* live-, .conf */
-       len = strlen(CONF_PATH) + strlen(pkgname) * 2;
+       len = strlen(DYNAMICBOX_CONF_CONF_PATH) + strlen(pkgname) * 2;
        item->filename = malloc(len);
        if (!item->filename) {
                ErrPrint("Error: %s\n", strerror(errno));
@@ -672,7 +673,7 @@ HAPI struct parser *parser_load(const char *pkgname)
                return 0;
        }
 
-       ret = snprintf(item->filename, len, CONF_PATH, pkgname, pkgname);
+       ret = snprintf(item->filename, len, DYNAMICBOX_CONF_CONF_PATH, pkgname, pkgname);
        if (ret < 0) {
                ErrPrint("Error: %s\n", strerror(errno));
                DbgFree(item->filename);
@@ -680,10 +681,10 @@ HAPI struct parser *parser_load(const char *pkgname)
                return 0;
        }
 
-       item->lb_path = NULL;
-       item->lb_group = NULL;
-       item->pd_width = 0;
-       item->pd_height = 0;
+       item->dbox_path = NULL;
+       item->dbox_group = NULL;
+       item->gbar_width = 0;
+       item->gbar_height = 0;
        item->auto_launch = NULL;
        item->size = 0x00000001;
        item->group = NULL;
@@ -879,13 +880,13 @@ HAPI int parser_unload(struct parser *item)
        DbgFree(item->abi);
        DbgFree(item->script);
        DbgFree(item->group);
-       DbgFree(item->pd_group);
-       DbgFree(item->pd_path);
-       DbgFree(item->lb_group);
-       DbgFree(item->lb_path);
+       DbgFree(item->gbar_group);
+       DbgFree(item->gbar_path);
+       DbgFree(item->dbox_group);
+       DbgFree(item->dbox_path);
        DbgFree(item->filename);
        DbgFree(item);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index 92f30d8..5ad2672 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <dlog.h>
 #include <package-manager.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 
 #include <Ecore.h>
 #include "util.h"
@@ -203,14 +203,14 @@ static int start_cb(const char *pkgname, const char *val, void *data)
        item = calloc(1, sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->pkgname = strdup(pkgname);
        if (!item->pkgname) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(item);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->status = PKGMGR_STATUS_START;
@@ -229,13 +229,13 @@ static int start_cb(const char *pkgname, const char *val, void *data)
                DbgFree(item->pkgname);
                DbgFree(item);
                ErrPrint("Invalid val: %s\n", val);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        s_info.item_list = eina_list_append(s_info.item_list, item);
 
        invoke_callback(pkgname, item, 0.0f);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int icon_path_cb(const char *pkgname, const char *val, void *data)
@@ -246,7 +246,7 @@ static int icon_path_cb(const char *pkgname, const char *val, void *data)
 
        item = find_item(pkgname);
        if (!item) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        if (item->icon) {
@@ -256,10 +256,10 @@ static int icon_path_cb(const char *pkgname, const char *val, void *data)
        item->icon = strdup(val);
        if (!item->icon) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int command_cb(const char *pkgname, const char *val, void *data)
@@ -270,17 +270,17 @@ static int command_cb(const char *pkgname, const char *val, void *data)
 
        item = find_item(pkgname);
        if (!item) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        if (!is_valid_status(item, val)) {
                DbgPrint("Invalid status: %d, %s\n", item->type, val);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        item->status = PKGMGR_STATUS_COMMAND;
        invoke_callback(pkgname, item, 0.0f);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int error_cb(const char *pkgname, const char *val, void *data)
@@ -292,12 +292,12 @@ static int error_cb(const char *pkgname, const char *val, void *data)
 
        item = find_item(pkgname);
        if (!item) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        item->status = PKGMGR_STATUS_ERROR;
        invoke_callback(pkgname, item, 0.0f);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int change_pkgname_cb(const char *pkgname, const char *val, void *data)
@@ -309,18 +309,18 @@ static int change_pkgname_cb(const char *pkgname, const char *val, void *data)
 
        item = find_item(pkgname);
        if (!item) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        new_pkgname = strdup(val);
        if (!new_pkgname) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        DbgFree(item->pkgname);
        item->pkgname = new_pkgname;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int download_cb(const char *pkgname, const char *val, void *data)
@@ -334,7 +334,7 @@ static int download_cb(const char *pkgname, const char *val, void *data)
        item = find_item(pkgname);
        if (!item) {
                DbgPrint("ITEM is not started from the start_cb\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (item->type != PKGMGR_EVENT_DOWNLOAD) {
@@ -350,19 +350,19 @@ static int download_cb(const char *pkgname, const char *val, void *data)
                break;
        default:
                ErrPrint("Invalid state [%s, %s]\n", pkgname, val);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (val) {
                if (sscanf(val, "%lf", &value) != 1) {
-                       value = (double)LB_STATUS_ERROR_INVALID;
+                       value = (double)DBOX_STATUS_ERROR_INVALID_PARAMETER;
                }
        } else {
-               value = (double)LB_STATUS_ERROR_INVALID;
+               value = (double)DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        invoke_download_event_handler(pkgname, item->status, value);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int progress_cb(const char *pkgname, const char *val, void *data)
@@ -376,7 +376,7 @@ static int progress_cb(const char *pkgname, const char *val, void *data)
        item = find_item(pkgname);
        if (!item) {
                ErrPrint("ITEM is not started from the start_cb\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (item->status) {
@@ -387,19 +387,19 @@ static int progress_cb(const char *pkgname, const char *val, void *data)
                break;
        default:
                ErrPrint("Invalid state [%s, %s]\n", pkgname, val);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (val) {
                if (sscanf(val, "%lf", &value) != 1) {
-                       value = (double)LB_STATUS_ERROR_INVALID;
+                       value = (double)DBOX_STATUS_ERROR_INVALID_PARAMETER;
                }
        } else {
-               value = (double)LB_STATUS_ERROR_INVALID;
+               value = (double)DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        invoke_callback(pkgname, item, value);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static int end_cb(const char *pkgname, const char *val, void *data)
@@ -410,7 +410,7 @@ static int end_cb(const char *pkgname, const char *val, void *data)
 
        item = find_item(pkgname);
        if (!item) {
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        item->status = !strcasecmp(val, "ok") ? PKGMGR_STATUS_END : PKGMGR_STATUS_ERROR;
@@ -421,7 +421,7 @@ static int end_cb(const char *pkgname, const char *val, void *data)
        DbgFree(item->icon);
        DbgFree(item->pkgname);
        DbgFree(item);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static struct pkgmgr_handler {
@@ -456,25 +456,25 @@ static int pkgmgr_cb(int req_id, const char *type, const char *pkgname, const ch
                }
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int pkgmgr_init(void)
 {
        if (s_info.listen_pc) {
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        s_info.listen_pc = pkgmgr_client_new(PC_LISTENING);
        if (!s_info.listen_pc) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (pkgmgr_client_listen_status(s_info.listen_pc, pkgmgr_cb, NULL) != PKGMGR_R_OK) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int pkgmgr_fini(void)
@@ -483,11 +483,11 @@ HAPI int pkgmgr_fini(void)
        struct item *ctx;
 
        if (!s_info.listen_pc) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (pkgmgr_client_free(s_info.listen_pc) != PKGMGR_R_OK) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        s_info.listen_pc = NULL;
@@ -518,7 +518,7 @@ HAPI int pkgmgr_fini(void)
                DbgFree(ctx);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int pkgmgr_add_event_callback(enum pkgmgr_event_type type, int (*cb)(const char *pkgname, enum pkgmgr_status status, double value, void *data), void *data)
@@ -528,7 +528,7 @@ HAPI int pkgmgr_add_event_callback(enum pkgmgr_event_type type, int (*cb)(const
        item = calloc(1, sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->cb = cb;
@@ -552,10 +552,10 @@ HAPI int pkgmgr_add_event_callback(enum pkgmgr_event_type type, int (*cb)(const
                break;
        default:
                DbgFree(item);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void *pkgmgr_del_event_callback(enum pkgmgr_event_type type, int (*cb)(const char *pkgname, enum pkgmgr_status status, double value, void *data), void *data)
index 0d973f8..cf9494c 100644 (file)
@@ -32,7 +32,9 @@
 
 #include <dlog.h>
 #include <packet.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_conf.h>
 
 #include "slave_life.h"
 #include "slave_rpc.h"
@@ -76,10 +78,10 @@ int errno;
 
 static struct info {
        Eina_List *script_port_list;
-       enum buffer_type env_buf_type;
+       enum dynamicbox_fb_type env_buf_type;
 } s_info = {
        .script_port_list = NULL,
-       .env_buf_type = BUFFER_TYPE_FILE,
+       .env_buf_type = DBOX_FB_TYPE_FILE,
 };
 
 struct script_port {
@@ -174,10 +176,10 @@ static int load_all_ports(void)
        char *path;
        int pathlen;
 
-       dir = opendir(SCRIPT_PORT_PATH);
+       dir = opendir(DYNAMICBOX_CONF_SCRIPT_PORT_PATH);
        if (!dir) {
                ErrPrint("Error: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        while ((ent = readdir(dir))) {
@@ -185,17 +187,17 @@ static int load_all_ports(void)
                        continue;
                }
 
-               pathlen = strlen(ent->d_name) + strlen(SCRIPT_PORT_PATH) + 1;
+               pathlen = strlen(ent->d_name) + strlen(DYNAMICBOX_CONF_SCRIPT_PORT_PATH) + 1;
                path = malloc(pathlen);
                if (!path) {
                        ErrPrint("Heap: %s %d\n", strerror(errno), pathlen);
                        if (closedir(dir) < 0) {
                                ErrPrint("closedir: %s\n", strerror(errno));
                        }
-                       return LB_STATUS_ERROR_MEMORY;
+                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                }
 
-               snprintf(path, pathlen, "%s%s", SCRIPT_PORT_PATH, ent->d_name);
+               snprintf(path, pathlen, "%s%s", DYNAMICBOX_CONF_SCRIPT_PORT_PATH, ent->d_name);
 
                item = malloc(sizeof(*item));
                if (!item) {
@@ -204,7 +206,7 @@ static int load_all_ports(void)
                        if (closedir(dir) < 0) {
                                ErrPrint("closedir: %s\n", strerror(errno));
                        }
-                       return LB_STATUS_ERROR_MEMORY;
+                       return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                }
 
                DbgPrint("Open SCRIPT PORT: %s\n", path);
@@ -216,7 +218,7 @@ static int load_all_ports(void)
                        if (closedir(dir) < 0) {
                                ErrPrint("closedir: %s\n", strerror(errno));
                        }
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
 
                item->magic_id = dlsym(item->handle, "script_magic_id");
@@ -311,7 +313,7 @@ static int load_all_ports(void)
                        goto errout;
                }
 
-               if (item->init(SCALE_WIDTH_FACTOR, PREMULTIPLIED_COLOR) < 0) {
+               if (item->init(DYNAMICBOX_CONF_SCALE_WIDTH_FACTOR, DYNAMICBOX_CONF_PREMULTIPLIED_COLOR) < 0) {
                        ErrPrint("Failed to initialize script engine\n");
                        goto errout;
                }
@@ -323,7 +325,7 @@ static int load_all_ports(void)
                ErrPrint("closedir: %s\n", strerror(errno));
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 
 errout:
        ErrPrint("Error: %s\n", dlerror());
@@ -334,7 +336,7 @@ errout:
        if (closedir(dir) < 0) {
                ErrPrint("closedir: %s\n", strerror(errno));
        }
-       return LB_STATUS_ERROR_FAULT;
+       return DBOX_STATUS_ERROR_FAULT;
 }
 
 static inline struct script_port *find_port(const char *magic_id)
@@ -382,29 +384,29 @@ static int render_post_cb(void *_buffer_handle, void *data)
        if (instance_state(inst) != INST_ACTIVATED) {
                ErrPrint("Render post invoked but instance is not activated\n");
                PERF_MARK(__func__);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = instance_lb_script(inst);
+       info = instance_dbox_script(inst);
        if (info && info == data) {
                buffer_handler_flush(buffer_handle);
-               instance_lb_updated_by_instance(inst, NULL);
+               instance_dbox_updated_by_instance(inst, NULL, info->x, info->y, info->w, info->h);
                PERF_MARK("lb,update");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
-       info = instance_pd_script(inst);
+       info = instance_gbar_script(inst);
        if (info && info == data) {
                buffer_handler_flush(buffer_handle);
-               instance_pd_updated_by_instance(inst, NULL);
+               instance_gbar_updated_by_instance(inst, NULL, info->x, info->y, info->w, info->h);
                PERF_MARK("pd,update");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
 out:
        ErrPrint("Failed to sync\n");
        PERF_MARK(__func__);
-       return LB_STATUS_ERROR_FAULT;
+       return DBOX_STATUS_ERROR_FAULT;
 }
 
 /*!
@@ -422,18 +424,18 @@ EAPI int script_signal_emit(void *buffer_handle, const char *part, const char *s
 
        if (!buffer_handle) {
                ErrPrint("Invalid handle\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        info = buffer_handler_data(buffer_handle);
        if (!info) {
                ErrPrint("Invalid handle\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        inst = buffer_handler_instance(buffer_handle);
        if (!inst) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!signal || strlen(signal) == 0) {
@@ -467,7 +469,7 @@ static inline void flushing_cached_block(struct script_info *info)
                return;
        }
 
-       is_pd = instance_pd_script(inst) == info;
+       is_pd = instance_gbar_script(inst) == info;
 
        EINA_LIST_FREE(info->cached_blocks, block) {
                consuming_parsed_block(inst, is_pd, block);
@@ -480,17 +482,17 @@ HAPI int script_handler_load(struct script_info *info, int is_pd)
 
        if (!info || !info->port) {
                ErrPrint("Script handler is not created\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (info->loaded > 0) {
                info->loaded++;
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (info->port->load(info->port_data, NULL, render_post_cb, info) < 0) {
                ErrPrint("Unable to load the script\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        info->loaded = 1;
@@ -499,10 +501,10 @@ HAPI int script_handler_load(struct script_info *info, int is_pd)
        inst = buffer_handler_instance(info->buffer_handle);
        if (inst) {
                script_signal_emit(info->buffer_handle, instance_id(inst),
-                               is_pd ? "pd,show" : "lb,show", 0.0f, 0.0f, 0.0f, 0.0f);
+                               is_pd ? "gbar,show" : "dbox,show", 0.0f, 0.0f, 0.0f, 0.0f);
        }
        buffer_handler_flush(info->buffer_handle);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int script_handler_unload(struct script_info *info, int is_pd)
@@ -510,30 +512,30 @@ HAPI int script_handler_unload(struct script_info *info, int is_pd)
        struct inst_info *inst;
 
        if (!info || !info->port) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        info->loaded--;
        if (info->loaded > 0) {
-               return LB_STATUS_ERROR_BUSY;
+               return DBOX_STATUS_ERROR_BUSY;
        }
 
        if (info->loaded < 0) {
                info->loaded = 0;
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        inst = buffer_handler_instance(info->buffer_handle);
        if (inst) {
                script_signal_emit(info->buffer_handle, instance_id(inst),
-                               is_pd ? "pd,hide" : "lb,hide", 0.0f, 0.0f, 0.0f, 0.0f);
+                               is_pd ? "gbar,hide" : "dbox,hide", 0.0f, 0.0f, 0.0f, 0.0f);
        }
 
        if (info->port->unload(info->port_data) < 0) {
                ErrPrint("Failed to unload script object. but go ahead\n");
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI struct script_info *script_handler_create(struct inst_info *inst, const char *file, const char *option, int w, int h)
@@ -552,7 +554,7 @@ HAPI struct script_info *script_handler_create(struct inst_info *inst, const cha
                return NULL;
        }
 
-       info->buffer_handle = buffer_handler_create(inst, s_info.env_buf_type, w, h, DEFAULT_PIXELS);
+       info->buffer_handle = buffer_handler_create(inst, s_info.env_buf_type, w, h, DYNAMICBOX_CONF_DEFAULT_PIXELS);
        if (!info->buffer_handle) {
                /* buffer_handler_create will prints some log */
                DbgFree(info);
@@ -588,12 +590,12 @@ HAPI int script_handler_destroy(struct script_info *info)
 
        if (!info || !info->port) {
                ErrPrint("port is not valid\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (info->loaded != 0) {
                ErrPrint("Script handler is not unloaded\n");
-               return LB_STATUS_ERROR_BUSY;
+               return DBOX_STATUS_ERROR_BUSY;
        }
 
        ret = info->port->destroy(info->port_data);
@@ -608,7 +610,7 @@ HAPI int script_handler_destroy(struct script_info *info)
        }
 
        DbgFree(info);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int script_handler_is_loaded(struct script_info *info)
@@ -635,20 +637,20 @@ static int update_script_color(struct inst_info *inst, struct block *block, int
        if (!block || !block->part || !block->data) {
                ErrPrint("Block or part or data is not valid\n");
                PERF_MARK("color");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("color");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("color");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = info->port->update_color(info->port_data, block->id, block->part, block->data);
@@ -666,20 +668,20 @@ static int update_script_text(struct inst_info *inst, struct block *block, int i
        if (!block || !block->part || !block->data) {
                ErrPrint("Block or part or data is not valid\n");
                PERF_MARK("text");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("text");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("text");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        DbgPrint("[%s] %s (%s)\n", block->id, block->part, block->data);
@@ -699,20 +701,20 @@ static int update_script_image(struct inst_info *inst, struct block *block, int
        if (!block || !block->part) {
                ErrPrint("Block or part is not valid\n");
                PERF_MARK("image");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("image");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("image");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        DbgPrint("[%s] %s (%s)\n", block->id, block->part, block->data);
@@ -731,20 +733,20 @@ static int update_access(struct inst_info *inst, struct block *block, int is_pd)
        if (!block || !block->part) {
                ErrPrint("Block or block->part is NIL\n");
                PERF_MARK("access");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("access");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("access");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = info->port->update_access(info->port_data, block->id, block->part, block->data, block->option);
@@ -762,20 +764,20 @@ static int operate_access(struct inst_info *inst, struct block *block, int is_pd
        if (!block || !block->part) {
                ErrPrint("Block or block->part is NIL\n");
                PERF_MARK("operate_access");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("operate_access");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("operate_access");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = info->port->operate_access(info->port_data, block->id, block->part, block->data, block->option);
@@ -793,20 +795,20 @@ static int update_script_script(struct inst_info *inst, struct block *block, int
        if (!block || !block->part) {
                ErrPrint("Block or part is NIL\n");
                PERF_MARK("script");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("script");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("script");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = info->port->update_script(info->port_data, block->id, block->target, block->part, block->data, block->option);
@@ -824,20 +826,20 @@ static int update_script_signal(struct inst_info *inst, struct block *block, int
        if (!block) {
                ErrPrint("block is NIL\n");
                PERF_MARK("signal");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("signal");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("signal");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = info->port->update_signal(info->port_data, block->id, block->part, block->data);
@@ -856,26 +858,26 @@ static int update_script_drag(struct inst_info *inst, struct block *block, int i
        if (!block || !block->data || !block->part) {
                ErrPrint("block or block->data or block->part is NIL\n");
                PERF_MARK("drag");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("drag");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (sscanf(block->data, "%lfx%lf", &dx, &dy) != 2) {
                ErrPrint("Invalid format of data (DRAG data [%s])\n", block->data);
                PERF_MARK("drag");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("drag");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = info->port->update_drag(info->port_data, block->id, block->part, dx, dy);
@@ -897,10 +899,10 @@ static void update_size_for_script(struct script_info *info, struct inst_info *i
                (void)info->port->update_size(info->port_data, NULL, w, h);
        }
 
-       if (instance_lb_script(inst) == info) {
-               instance_set_lb_size(inst, w, h);
-       } else if (instance_pd_script(inst) == info) {
-               instance_set_pd_size(inst, w, h);
+       if (instance_dbox_script(inst) == info) {
+               instance_set_dbox_size(inst, w, h);
+       } else if (instance_gbar_script(inst) == info) {
+               instance_set_gbar_size(inst, w, h);
        } else {
                ErrPrint("Unknown script\n");
        }
@@ -915,20 +917,20 @@ HAPI int script_handler_resize(struct script_info *info, int w, int h)
        if (!info) {
                ErrPrint("info[%p] resize is ignored\n", info);
                PERF_MARK("resize");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        inst = buffer_handler_instance(info->buffer_handle);
        if (!inst) {
                ErrPrint("Instance is not valid\n");
                PERF_MARK("resize");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        update_size_for_script(info, inst, w, h);
 
        PERF_MARK("resize");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI const char *script_handler_buffer_id(struct script_info *info)
@@ -950,20 +952,20 @@ static int update_info(struct inst_info *inst, struct block *block, int is_pd)
        if (!block || !block->part || !block->data) {
                ErrPrint("block or block->part or block->data is NIL\n");
                PERF_MARK("info");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                PERF_MARK("info");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
                PERF_MARK("info");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!strcasecmp(block->part, INFO_SIZE)) {
@@ -972,7 +974,7 @@ static int update_info(struct inst_info *inst, struct block *block, int is_pd)
                if (sscanf(block->data, "%dx%d", &w, &h) != 2) {
                        ErrPrint("Invalid format for SIZE(%s)\n", block->data);
                        PERF_MARK("info");
-                       return LB_STATUS_ERROR_INVALID;
+                       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
                }
 
                if (!block->id) {
@@ -985,7 +987,7 @@ static int update_info(struct inst_info *inst, struct block *block, int is_pd)
        }
        PERF_MARK("info");
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline void consuming_parsed_block(struct inst_info *inst, int is_pd, struct block *block)
@@ -1005,7 +1007,7 @@ static inline void consuming_parsed_block(struct inst_info *inst, int is_pd, str
                NULL
        };
 
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (!info) {
                ErrPrint("info is NIL (%d, %s)\n", is_pd, instance_id(inst));
                goto free_out;
@@ -1029,13 +1031,13 @@ free_out:
 
 HAPI int script_init(void)
 {
-       if (!strcasecmp(PROVIDER_METHOD, "shm")) {
-               s_info.env_buf_type = BUFFER_TYPE_SHM;
-       } else if (!strcasecmp(PROVIDER_METHOD, "pixmap")) {
-               s_info.env_buf_type = BUFFER_TYPE_PIXMAP;
+       if (!strcasecmp(DYNAMICBOX_CONF_PROVIDER_METHOD, "shm")) {
+               s_info.env_buf_type = DBOX_FB_TYPE_SHM;
+       } else if (!strcasecmp(DYNAMICBOX_CONF_PROVIDER_METHOD, "pixmap")) {
+               s_info.env_buf_type = DBOX_FB_TYPE_PIXMAP;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int script_fini(void)
@@ -1058,7 +1060,7 @@ HAPI int script_fini(void)
 HAPI int script_handler_update_pointer(struct script_info *info, int x, int y, int down)
 {
        if (!info) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        info->x = x;
@@ -1070,18 +1072,18 @@ HAPI int script_handler_update_pointer(struct script_info *info, int x, int y, i
                info->down = 1;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int script_handler_update_keycode(struct script_info *info, unsigned int keycode)
 {
        if (!info) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        info->keycode = keycode;
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int script_handler_feed_event(struct script_info *info, int event, double timestamp)
@@ -1090,7 +1092,7 @@ HAPI int script_handler_feed_event(struct script_info *info, int event, double t
 
        if (!info->port) {
                ErrPrint("info->port is NIL\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ret = info->port->feed_event(info->port_data, event, info->x, info->y, info->down, info->keycode, timestamp);
@@ -1187,7 +1189,6 @@ static Eina_Bool apply_changes_cb(void *_data)
 }
 #endif
 
-
 HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename, int is_pd)
 {
        PERF_INIT();
@@ -1212,7 +1213,7 @@ HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename,
 
        filebuf = load_file(filename);
        if (!filebuf) {
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        fileptr = filebuf;
@@ -1454,7 +1455,7 @@ HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename,
                }
 
                PERF_MARK("parser");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        block = eina_list_data_get(eina_list_last(block_list));
@@ -1498,14 +1499,14 @@ HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename,
        /*!
         * Doesn't need to force to render the contents.
        struct script_info *info;
-       info = is_pd ? instance_pd_script(inst) : instance_lb_script(inst);
+       info = is_pd ? instance_gbar_script(inst) : instance_dbox_script(inst);
        if (info && info->ee) {
                ecore_evas_manual_render(info->ee);
        }
        */
 #endif
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index bc66eff..11166ab 100644 (file)
 
 #include <packet.h>
 #include <com-core_packet.h>
-#include <livebox-errno.h>
-#include <livebox-service.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_cmd_list.h>
+#include <dynamicbox_conf.h>
+#include <dynamicbox_script.h>
 
 #include "critical_log.h"
 #include "conf.h"
 #include "liveinfo.h"
 #include "io.h"
 #include "event.h"
-#include "provider_cmd_list.h"
 
-#define PD_OPEN_MONITOR_TAG "pd,open,monitor"
-#define PD_RESIZE_MONITOR_TAG "pd,resize,monitor"
-#define PD_CLOSE_MONITOR_TAG "pd,close,monitor"
+#define GBAR_OPEN_MONITOR_TAG "gbar,open,monitor"
+#define GBAR_RESIZE_MONITOR_TAG "gbar,resize,monitor"
+#define GBAR_CLOSE_MONITOR_TAG "gbar,close,monitor"
 
-#define LAZY_PD_OPEN_TAG "lazy,pd,open"
-#define LAZY_PD_CLOSE_TAG "lazy,pd,close"
+#define LAZY_GBAR_OPEN_TAG "lazy,gbar,open"
+#define LAZY_GBAR_CLOSE_TAG "lazy,gbar,close"
 
 #define ACCESS_TYPE_DOWN 0
 #define ACCESS_TYPE_MOVE 1
@@ -87,8 +89,8 @@ struct access_info {
 
 /* Share this with provider */
 enum target_type {
-       TYPE_LB,
-       TYPE_PD,
+       TYPE_DBOX,
+       TYPE_GBAR,
        TYPE_ERROR
 };
 
@@ -142,7 +144,7 @@ int send_delayed_key_status(struct inst_info *inst, int ret)
 
        cbdata = malloc(sizeof(*cbdata));
        if (!cbdata) {
-               ret = LB_STATUS_ERROR_MEMORY;
+               ret = DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        } else {
                cbdata->inst = instance_ref(inst);
                cbdata->status = ret;
@@ -150,9 +152,9 @@ int send_delayed_key_status(struct inst_info *inst, int ret)
                if (!ecore_timer_add(DELAY_TIME, lazy_key_status_cb, cbdata)) {
                        (void)instance_unref(cbdata->inst);
                        DbgFree(cbdata);
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                } else {
-                       ret = LB_STATUS_SUCCESS;
+                       ret = DBOX_STATUS_ERROR_NONE;
                }
        }
 
@@ -165,7 +167,7 @@ int send_delayed_access_status(struct inst_info *inst, int ret)
 
        cbdata = malloc(sizeof(*cbdata));
        if (!cbdata) {
-               ret = LB_STATUS_ERROR_MEMORY;
+               ret = DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        } else {
                cbdata->inst = instance_ref(inst);
                cbdata->status = ret;
@@ -173,32 +175,32 @@ int send_delayed_access_status(struct inst_info *inst, int ret)
                if (!ecore_timer_add(DELAY_TIME, lazy_access_status_cb, cbdata)) {
                        (void)instance_unref(cbdata->inst);
                        DbgFree(cbdata);
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                } else {
-                       ret = LB_STATUS_SUCCESS;
+                       ret = DBOX_STATUS_ERROR_NONE;
                }
        }
 
        return ret;
 }
 
-static int forward_lb_event_packet(const struct pkg_info *pkg, struct inst_info *inst, const struct packet *packet)
+static int forward_dbox_event_packet(const struct pkg_info *pkg, struct inst_info *inst, const struct packet *packet)
 {
        struct buffer_info *buffer;
        struct slave_node *slave;
        int ret;
 
-       buffer = instance_lb_buffer(inst);
+       buffer = instance_dbox_buffer(inst);
        if (!buffer) {
                ErrPrint("Instance[%s] has no buffer\n", instance_id(inst));
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
                ErrPrint("Package[%s] has no slave\n", package_name(pkg));
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -209,23 +211,23 @@ out:
        return ret;
 }
 
-static int forward_pd_event_packet(const struct pkg_info *pkg, struct inst_info *inst, const struct packet *packet)
+static int forward_gbar_event_packet(const struct pkg_info *pkg, struct inst_info *inst, const struct packet *packet)
 {
        struct buffer_info *buffer;
        struct slave_node *slave;
        int ret;
 
-       buffer = instance_pd_buffer(inst);
+       buffer = instance_gbar_buffer(inst);
        if (!buffer) {
                ErrPrint("Instance[%s] has no buffer\n", instance_id(inst));
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
                ErrPrint("Package[%s] has no slave\n", package_name(pkg));
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -236,24 +238,24 @@ out:
        return ret;
 }
 
-static int forward_pd_access_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, struct access_info *event)
+static int forward_gbar_access_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, struct access_info *event)
 {
        int ret;
        struct buffer_info *buffer;
        struct slave_node *slave;
        struct packet *p;
 
-       buffer = instance_pd_buffer(inst);
+       buffer = instance_gbar_buffer(inst);
        if (!buffer) {
                ErrPrint("Instance[%s] has no buffer\n", instance_id(inst));
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
                ErrPrint("Package[%s] has no slave\n", package_name(pkg));
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -264,24 +266,24 @@ out:
        return ret;
 }
 
-static int forward_lb_access_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, struct access_info *event)
+static int forward_dbox_access_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, struct access_info *event)
 {
        int ret;
        struct buffer_info *buffer;
        struct slave_node *slave;
        struct packet *p;
 
-       buffer = instance_lb_buffer(inst);
+       buffer = instance_dbox_buffer(inst);
        if (!buffer) {
                ErrPrint("Instance[%s] has no buffer\n", instance_id(inst));
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
                ErrPrint("Package[%s] has no slave\n", package_name(pkg));
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -292,24 +294,24 @@ out:
        return ret;
 }
 
-static int forward_pd_key_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, unsigned int keycode)
+static int forward_gbar_key_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, unsigned int keycode)
 {
        int ret;
        struct buffer_info *buffer;
        struct slave_node *slave;
        struct packet *p;
 
-       buffer = instance_lb_buffer(inst);
+       buffer = instance_dbox_buffer(inst);
        if (!buffer) {
                ErrPrint("Instance[%s] has no buffer\n", instance_id(inst));
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
                ErrPrint("Package[%s] has no slave\n", package_name(pkg));
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -320,24 +322,24 @@ out:
        return ret;
 }
 
-static int forward_lb_key_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, unsigned int keycode)
+static int forward_dbox_key_packet(const struct pkg_info *pkg, struct inst_info *inst, const char *command, double timestamp, unsigned int keycode)
 {
        int ret;
        struct buffer_info *buffer;
        struct slave_node *slave;
        struct packet *p;
 
-       buffer = instance_lb_buffer(inst);
+       buffer = instance_dbox_buffer(inst);
        if (!buffer) {
                ErrPrint("Instance[%s] has no buffer\n", instance_id(inst));
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
                ErrPrint("Package[%s] has no slave\n", package_name(pkg));
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -352,11 +354,11 @@ static int slave_fault_open_script_cb(struct slave_node *slave, void *data)
 {
        Ecore_Timer *timer;
 
-       (void)script_handler_unload(instance_pd_script(data), 1);
-       (void)instance_slave_close_pd(data, instance_pd_owner(data), LB_CLOSE_PD_FAULT);
-       (void)instance_client_pd_created(data, LB_STATUS_ERROR_FAULT);
+       (void)script_handler_unload(instance_gbar_script(data), 1);
+       (void)instance_slave_close_gbar(data, instance_gbar_owner(data), DBOX_CLOSE_GBAR_FAULT);
+       (void)instance_client_gbar_created(data, DBOX_STATUS_ERROR_FAULT);
 
-       timer = instance_del_data(data, LAZY_PD_OPEN_TAG);
+       timer = instance_del_data(data, LAZY_GBAR_OPEN_TAG);
        if (timer) {
                ecore_timer_del(timer);
        }
@@ -370,10 +372,10 @@ static int slave_fault_open_buffer_cb(struct slave_node *slave, void *data)
 {
        Ecore_Timer *timer;
 
-       (void)instance_slave_close_pd(data, instance_pd_owner(data), LB_CLOSE_PD_FAULT);
-       (void)instance_client_pd_created(data, LB_STATUS_ERROR_FAULT);
+       (void)instance_slave_close_gbar(data, instance_gbar_owner(data), DBOX_CLOSE_GBAR_FAULT);
+       (void)instance_client_gbar_created(data, DBOX_STATUS_ERROR_FAULT);
 
-       timer = instance_del_data(data, PD_OPEN_MONITOR_TAG);
+       timer = instance_del_data(data, GBAR_OPEN_MONITOR_TAG);
        if (timer) {
                ecore_timer_del(timer);
        }
@@ -387,9 +389,9 @@ static int slave_fault_close_script_cb(struct slave_node *slave, void *data)
 {
        Ecore_Timer *timer;
 
-       (void)instance_client_pd_destroyed(data, LB_STATUS_ERROR_FAULT);
+       (void)instance_client_gbar_destroyed(data, DBOX_STATUS_ERROR_FAULT);
 
-       timer = instance_del_data(data, LAZY_PD_CLOSE_TAG);
+       timer = instance_del_data(data, LAZY_GBAR_CLOSE_TAG);
        if (timer) {
                ecore_timer_del(timer);
        }
@@ -403,11 +405,11 @@ static int slave_fault_close_buffer_cb(struct slave_node *slave, void *data)
 {
        Ecore_Timer *timer;
 
-       (void)instance_client_pd_destroyed(data, LB_STATUS_ERROR_FAULT);
+       (void)instance_client_gbar_destroyed(data, DBOX_STATUS_ERROR_FAULT);
 
-       timer = instance_del_data(data, LAZY_PD_CLOSE_TAG);
+       timer = instance_del_data(data, LAZY_GBAR_CLOSE_TAG);
        if (!timer) {
-               timer = instance_del_data(data, PD_CLOSE_MONITOR_TAG);
+               timer = instance_del_data(data, GBAR_CLOSE_MONITOR_TAG);
        }
 
        if (timer) {
@@ -423,10 +425,10 @@ static int slave_fault_resize_buffer_cb(struct slave_node *slave, void *data)
 {
        Ecore_Timer *timer;
 
-       (void)instance_slave_close_pd(data, instance_pd_owner(data), LB_CLOSE_PD_FAULT);
-       (void)instance_client_pd_destroyed(data, LB_STATUS_ERROR_FAULT);
+       (void)instance_slave_close_gbar(data, instance_gbar_owner(data), DBOX_CLOSE_GBAR_FAULT);
+       (void)instance_client_gbar_destroyed(data, DBOX_STATUS_ERROR_FAULT);
 
-       timer = instance_del_data(data, PD_RESIZE_MONITOR_TAG);
+       timer = instance_del_data(data, GBAR_RESIZE_MONITOR_TAG);
        if (timer) {
                ecore_timer_del(timer);
        }
@@ -436,7 +438,7 @@ static int slave_fault_resize_buffer_cb(struct slave_node *slave, void *data)
        return -1; /* remove this handler */
 }
 
-static int key_event_lb_route_cb(enum event_state state, struct event_data *event_info, void *data)
+static int key_event_dbox_route_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct inst_info *inst = data;
        const struct pkg_info *pkg;
@@ -446,42 +448,42 @@ static int key_event_lb_route_cb(enum event_state state, struct event_data *even
 
        if (!inst) {
                DbgPrint("Instance is deleted.\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        pkg = instance_package(inst);
        if (!pkg) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (state) {
        case EVENT_STATE_ACTIVATE:
-               cmd = CMD_LB_KEY_DOWN;
+               cmd = CMD_DBOX_KEY_DOWN;
                break;
        case EVENT_STATE_ACTIVATED:
-               cmd = CMD_LB_KEY_DOWN;
+               cmd = CMD_DBOX_KEY_DOWN;
                break;
        case EVENT_STATE_DEACTIVATE:
-               cmd = CMD_LB_KEY_UP;
+               cmd = CMD_DBOX_KEY_UP;
                break;
        default:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        packet = packet_create_noack((const char *)&cmd, "ssdi", package_name(pkg), instance_id(inst), event_info->tv, event_info->keycode);
        if (!packet) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        return slave_rpc_request_only(slave, package_name(pkg), packet, 0);
 }
 
-static int mouse_event_lb_route_cb(enum event_state state, struct event_data *event_info, void *data)
+static int mouse_event_dbox_route_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct inst_info *inst = data;
        const struct pkg_info *pkg;
@@ -491,42 +493,42 @@ static int mouse_event_lb_route_cb(enum event_state state, struct event_data *ev
 
        if (!inst) {
                DbgPrint("Instance is deleted.\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        pkg = instance_package(inst);
        if (!pkg) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (state) {
        case EVENT_STATE_ACTIVATE:
-               cmd = CMD_LB_MOUSE_DOWN;
+               cmd = CMD_DBOX_MOUSE_DOWN;
                break;
        case EVENT_STATE_ACTIVATED:
-               cmd = CMD_LB_MOUSE_MOVE;
+               cmd = CMD_DBOX_MOUSE_MOVE;
                break;
        case EVENT_STATE_DEACTIVATE:
-               cmd = CMD_LB_MOUSE_UP;
+               cmd = CMD_DBOX_MOUSE_UP;
                break;
        default:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        packet = packet_create_noack((const char *)&cmd, "ssdii", package_name(pkg), instance_id(inst), event_info->tv, event_info->x, event_info->y);
        if (!packet) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        return slave_rpc_request_only(slave, package_name(pkg), packet, 0);
 }
 
-static int key_event_lb_consume_cb(enum event_state state, struct event_data *event_info, void *data)
+static int key_event_dbox_consume_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct script_info *script;
        struct inst_info *inst = data;
@@ -538,9 +540,9 @@ static int key_event_lb_consume_cb(enum event_state state, struct event_data *ev
                return 0;
        }
 
-       script = instance_lb_script(inst);
+       script = instance_dbox_script(inst);
        if (!script) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        timestamp = event_info->tv;
@@ -548,15 +550,15 @@ static int key_event_lb_consume_cb(enum event_state state, struct event_data *ev
        switch (state) {
        case EVENT_STATE_ACTIVATE:
                script_handler_update_keycode(script, event_info->keycode);
-               (void)script_handler_feed_event(script, LB_SCRIPT_KEY_DOWN, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_KEY_DOWN, timestamp);
                break;
        case EVENT_STATE_ACTIVATED:
                script_handler_update_keycode(script, event_info->keycode);
-               (void)script_handler_feed_event(script, LB_SCRIPT_KEY_DOWN, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_KEY_DOWN, timestamp);
                break;
        case EVENT_STATE_DEACTIVATE:
                script_handler_update_keycode(script, event_info->keycode);
-               (void)script_handler_feed_event(script, LB_SCRIPT_MOUSE_UP, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_UP, timestamp);
                break;
        default:
                ErrPrint("Unknown event\n");
@@ -566,7 +568,7 @@ static int key_event_lb_consume_cb(enum event_state state, struct event_data *ev
        return 0;
 }
 
-static int mouse_event_lb_consume_cb(enum event_state state, struct event_data *event_info, void *data)
+static int mouse_event_dbox_consume_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct script_info *script;
        struct inst_info *inst = data;
@@ -578,9 +580,9 @@ static int mouse_event_lb_consume_cb(enum event_state state, struct event_data *
                return 0;
        }
 
-       script = instance_lb_script(inst);
+       script = instance_dbox_script(inst);
        if (!script) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        timestamp = event_info->tv;
@@ -588,15 +590,15 @@ static int mouse_event_lb_consume_cb(enum event_state state, struct event_data *
        switch (state) {
        case EVENT_STATE_ACTIVATE:
                script_handler_update_pointer(script, event_info->x, event_info->y, 1);
-               (void)script_handler_feed_event(script, LB_SCRIPT_MOUSE_DOWN, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_DOWN, timestamp);
                break;
        case EVENT_STATE_ACTIVATED:
                script_handler_update_pointer(script, event_info->x, event_info->y, -1);
-               (void)script_handler_feed_event(script, LB_SCRIPT_MOUSE_MOVE, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_MOVE, timestamp);
                break;
        case EVENT_STATE_DEACTIVATE:
                script_handler_update_pointer(script, event_info->x, event_info->y, 0);
-               (void)script_handler_feed_event(script, LB_SCRIPT_MOUSE_UP, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_UP, timestamp);
                break;
        default:
                break;
@@ -605,7 +607,7 @@ static int mouse_event_lb_consume_cb(enum event_state state, struct event_data *
        return 0;
 }
 
-static int key_event_pd_route_cb(enum event_state state, struct event_data *event_info, void *data)
+static int key_event_gbar_route_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct inst_info *inst = data;
        const struct pkg_info *pkg;
@@ -615,42 +617,42 @@ static int key_event_pd_route_cb(enum event_state state, struct event_data *even
 
        if (!inst) {
                DbgPrint("Instance is deleted.\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        pkg = instance_package(inst);
        if (!pkg) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (state) {
        case EVENT_STATE_ACTIVATE:
-               cmd = CMD_PD_KEY_DOWN;
+               cmd = CMD_GBAR_KEY_DOWN;
                break;
        case EVENT_STATE_ACTIVATED:
-               cmd = CMD_PD_KEY_DOWN;
+               cmd = CMD_GBAR_KEY_DOWN;
                break;
        case EVENT_STATE_DEACTIVATE:
-               cmd = CMD_PD_KEY_UP;
+               cmd = CMD_GBAR_KEY_UP;
                break;
        default:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        packet = packet_create_noack((const char *)&cmd, "ssdi", package_name(pkg), instance_id(inst), event_info->tv, event_info->keycode);
        if (!packet) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        return slave_rpc_request_only(slave, package_name(pkg), packet, 0);
 }
 
-static int mouse_event_pd_route_cb(enum event_state state, struct event_data *event_info, void *data)
+static int mouse_event_gbar_route_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct inst_info *inst = data;
        const struct pkg_info *pkg;
@@ -660,42 +662,42 @@ static int mouse_event_pd_route_cb(enum event_state state, struct event_data *ev
 
        if (!inst) {
                DbgPrint("Instance is deleted.\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        pkg = instance_package(inst);
        if (!pkg) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (state) {
        case EVENT_STATE_ACTIVATE:
-               cmd = CMD_PD_MOUSE_DOWN;
+               cmd = CMD_GBAR_MOUSE_DOWN;
                break;
        case EVENT_STATE_ACTIVATED:
-               cmd = CMD_PD_MOUSE_MOVE;
+               cmd = CMD_GBAR_MOUSE_MOVE;
                break;
        case EVENT_STATE_DEACTIVATE:
-               cmd = CMD_PD_MOUSE_UP;
+               cmd = CMD_GBAR_MOUSE_UP;
                break;
        default:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        packet = packet_create_noack((const char *)&cmd, "ssdii", package_name(pkg), instance_id(inst), event_info->tv, event_info->x, event_info->y);
        if (!packet) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        return slave_rpc_request_only(slave, package_name(pkg), packet, 0);
 }
 
-static int key_event_pd_consume_cb(enum event_state state, struct event_data *event_info, void *data)
+static int key_event_gbar_consume_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct script_info *script;
        struct inst_info *inst = data;
@@ -707,9 +709,9 @@ static int key_event_pd_consume_cb(enum event_state state, struct event_data *ev
                return 0;
        }
 
-       script = instance_pd_script(inst);
+       script = instance_gbar_script(inst);
        if (!script) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        timestamp = event_info->tv;
@@ -717,15 +719,15 @@ static int key_event_pd_consume_cb(enum event_state state, struct event_data *ev
        switch (state) {
        case EVENT_STATE_ACTIVATE:
                script_handler_update_keycode(script, event_info->keycode);
-               (void)script_handler_feed_event(script, LB_SCRIPT_KEY_DOWN, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_KEY_DOWN, timestamp);
                break;
        case EVENT_STATE_ACTIVATED:
                script_handler_update_keycode(script, event_info->keycode);
-               (void)script_handler_feed_event(script, LB_SCRIPT_KEY_DOWN, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_KEY_DOWN, timestamp);
                break;
        case EVENT_STATE_DEACTIVATE:
                script_handler_update_keycode(script, event_info->keycode);
-               (void)script_handler_feed_event(script, LB_SCRIPT_KEY_UP, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_KEY_UP, timestamp);
                break;
        default:
                ErrPrint("Unknown event\n");
@@ -735,7 +737,7 @@ static int key_event_pd_consume_cb(enum event_state state, struct event_data *ev
        return 0;
 }
 
-static int mouse_event_pd_consume_cb(enum event_state state, struct event_data *event_info, void *data)
+static int mouse_event_gbar_consume_cb(enum event_state state, struct event_data *event_info, void *data)
 {
        struct script_info *script;
        struct inst_info *inst = data;
@@ -747,9 +749,9 @@ static int mouse_event_pd_consume_cb(enum event_state state, struct event_data *
                return 0;
        }
 
-       script = instance_pd_script(inst);
+       script = instance_gbar_script(inst);
        if (!script) {
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        timestamp = event_info->tv;
@@ -757,15 +759,15 @@ static int mouse_event_pd_consume_cb(enum event_state state, struct event_data *
        switch (state) {
        case EVENT_STATE_ACTIVATE:
                script_handler_update_pointer(script, event_info->x, event_info->y, 1);
-               (void)script_handler_feed_event(script, LB_SCRIPT_MOUSE_DOWN, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_DOWN, timestamp);
                break;
        case EVENT_STATE_ACTIVATED:
                script_handler_update_pointer(script, event_info->x, event_info->y, -1);
-               (void)script_handler_feed_event(script, LB_SCRIPT_MOUSE_MOVE, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_MOVE, timestamp);
                break;
        case EVENT_STATE_DEACTIVATE:
                script_handler_update_pointer(script, event_info->x, event_info->y, 0);
-               (void)script_handler_feed_event(script, LB_SCRIPT_MOUSE_UP, timestamp);
+               (void)script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_UP, timestamp);
                break;
        default:
                break;
@@ -784,13 +786,13 @@ static struct packet *client_acquire(pid_t pid, int handle, const struct packet
        client = client_find_by_rpc_handle(handle);
        if (client) {
                ErrPrint("Client is already exists %d\n", pid);
-               ret = LB_STATUS_ERROR_EXIST;
+               ret = DBOX_STATUS_ERROR_EXIST;
                goto out;
        }
 
        if (packet_get(packet, "ds", &timestamp, &direct_addr) != 2) {
                ErrPrint("Invalid arguemnt\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -802,11 +804,11 @@ static struct packet *client_acquire(pid_t pid, int handle, const struct packet
        client = client_create(pid, handle, direct_addr);
        if (!client) {
                ErrPrint("Failed to create a new client for %d\n", pid);
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
        }
 
 out:
-       result = packet_create_reply(packet, "i", ret);
+       result = packet_create_reply(packet, "ii", ret, DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT);
        if (!result) {
                ErrPrint("Failed to create a packet\n");
        }
@@ -823,7 +825,7 @@ static struct packet *cilent_release(pid_t pid, int handle, const struct packet
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
@@ -847,18 +849,18 @@ static int validate_request(const char *pkgname, const char *id, struct inst_inf
        inst = package_find_instance_by_id(pkgname, id);
        if (!inst) {
                ErrPrint("Instance is not exists (%s)\n", id);
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        pkg = instance_package(inst);
        if (!pkg) {
                ErrPrint("System error - instance has no package?\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (package_is_fault(pkg)) {
                ErrPrint("Faulted package: %s\n", pkgname);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (out_inst) {
@@ -869,7 +871,7 @@ static int validate_request(const char *pkgname, const char *id, struct inst_inf
                *out_pkg = pkg;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /*!< pid, pkgname, filename, event, timestamp, x, y, ret */
@@ -900,10 +902,10 @@ static struct packet *client_clicked(pid_t pid, int handle, const struct packet
        /*!
         * \NOTE:
         * Trust the package name which are sent by the client.
-        * The package has to be a livebox package name.
+        * The package has to be a dynamicbox package name.
         */
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                (void)instance_clicked(inst, event, timestamp, x, y);
        }
 
@@ -925,19 +927,19 @@ static struct packet *client_update_mode(pid_t pid, int handle, const struct pac
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = packet_get(packet, "ssi", &pkgname, &id, &active_update);
        if (ret != 3) {
                ErrPrint("Invalid argument\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                /*!
                 * \note
                 * Send change update mode request to a slave
@@ -973,24 +975,24 @@ static struct packet *client_text_signal(pid_t pid, int handle, const struct pac
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssssdddd", &pkgname, &id, &emission, &source, &sx, &sy, &ex, &ey);
        if (ret != 8) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        /*!
         * \NOTE:
         * Trust the package name which are sent by the client.
-        * The package has to be a livebox package name.
+        * The package has to be a dynamicbox package name.
         */
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                ret = instance_text_signal_emit(inst, emission, source, sx, sy, ex, ey);
        }
 
@@ -1013,7 +1015,7 @@ static Eina_Bool lazy_delete_cb(void *data)
         * So check it again
         */
        if (instance_has_client(item->inst, item->client)) {
-               (void)instance_unicast_deleted_event(item->inst, item->client, LB_STATUS_SUCCESS);
+               (void)instance_unicast_deleted_event(item->inst, item->client, DBOX_STATUS_ERROR_NONE);
                (void)instance_del_client(item->inst, item->client);
        }
 
@@ -1038,32 +1040,32 @@ static struct packet *client_delete(pid_t pid, int handle, const struct packet *
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssid", &pkgname, &id, &type, &timestamp);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
        /*!
         * \note
-        * Below two types must has to be sync'd with livebox-viewer
+        * Below two types must has to be sync'd with dynamicbox-viewer
         *
-        * LB_DELETE_PERMANENTLY = 0x01,
-        * LB_DELETE_TEMPORARY = 0x02,
+        * DBOX_DELETE_PERMANENTLY = 0x01,
+        * DBOX_DELETE_TEMPORARY = 0x02,
         *
         */
 
        /*!
         * \NOTE:
         * Trust the package name which are sent by the client.
-        * The package has to be a livebox package name.
+        * The package has to be a dynamicbox package name.
         */
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                DbgPrint("Failed to find by id(%s), try to find it using timestamp(%lf)\n", id, timestamp);
                inst = package_find_instance_by_timestamp(pkgname, timestamp);
                if (!inst) {
@@ -1079,7 +1081,7 @@ static struct packet *client_delete(pid_t pid, int handle, const struct packet *
 
        if (package_is_fault(pkg)) {
                DbgPrint("Faulted package. will be deleted soon: %s\n", id);
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
@@ -1090,7 +1092,7 @@ static struct packet *client_delete(pid_t pid, int handle, const struct packet *
                        item = malloc(sizeof(*item));
                        if (!item) {
                                ErrPrint("Heap: %s\n", strerror(errno));
-                               ret = LB_STATUS_ERROR_MEMORY;
+                               ret = DBOX_STATUS_ERROR_OUT_OF_MEMORY;
                        } else {
                                /*!
                                 * \NOTE:
@@ -1109,22 +1111,22 @@ static struct packet *client_delete(pid_t pid, int handle, const struct packet *
                                        (void)client_unref(client);
                                        (void)instance_unref(inst);
                                        DbgFree(item);
-                                       ret = LB_STATUS_ERROR_FAULT;
+                                       ret = DBOX_STATUS_ERROR_FAULT;
                                } else {
-                                       ret = LB_STATUS_SUCCESS;
+                                       ret = DBOX_STATUS_ERROR_NONE;
                                }
                        }
                } else {
                        ErrPrint("Client has no permission\n");
-                       ret = LB_STATUS_ERROR_PERMISSION;
+                       ret = DBOX_STATUS_ERROR_PERMISSION_DENIED;
                }
        } else {
                switch (type) {
-               case LB_DELETE_PERMANENTLY:
-                       ret = instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
+               case DBOX_DELETE_PERMANENTLY:
+                       ret = instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
                        break;
-               case LB_DELETE_TEMPORARY:
-                       ret = instance_destroy(inst, INSTANCE_DESTROY_TEMPORARY);
+               case DBOX_DELETE_TEMPORARY:
+                       ret = instance_destroy(inst, DBOX_DESTROY_TYPE_TEMPORARY);
                        break;
                default:
                        break;
@@ -1154,14 +1156,14 @@ static struct packet *client_resize(pid_t pid, int handle, const struct packet *
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssii", &pkgname, &id, &w, &h);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -1170,15 +1172,15 @@ static struct packet *client_resize(pid_t pid, int handle, const struct packet *
        /*!
         * \NOTE:
         * Trust the package name which are sent by the client.
-        * The package has to be a livebox package name.
+        * The package has to be a dynamicbox package name.
         */
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
        if (instance_client(inst) != client) {
-               ret = LB_STATUS_ERROR_PERMISSION;
+               ret = DBOX_STATUS_ERROR_PERMISSION_DENIED;
        } else {
                ret = instance_resize(inst, w, h);
        }
@@ -1212,32 +1214,32 @@ static struct packet *client_new(pid_t pid, int handle, const struct packet *pac
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "dssssdii", &timestamp, &pkgname, &content, &cluster, &category, &period, &width, &height);
        if (ret != 8) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        DbgPrint("pid[%d] period[%lf] pkgname[%s] content[%s] cluster[%s] category[%s] period[%lf]\n",
                                                pid, timestamp, pkgname, content, cluster, category, period);
 
-       lbid = package_lb_pkgname(pkgname);
+       lbid = package_dbox_pkgname(pkgname);
        if (!lbid) {
-               ErrPrint("This %s has no livebox package\n", pkgname);
-               ret = LB_STATUS_ERROR_INVALID;
+               ErrPrint("This %s has no dynamicbox package\n", pkgname);
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
-       mainappid = livebox_service_mainappid(lbid);
+       mainappid = dynamicbox_service_mainappid(lbid);
        if (!package_is_enabled(mainappid)) {
                DbgFree(mainappid);
                DbgFree(lbid);
-               ret = LB_STATUS_ERROR_DISABLED;
+               ret = DBOX_STATUS_ERROR_DISABLED;
                goto out;
        }
        DbgFree(mainappid);
@@ -1245,11 +1247,11 @@ static struct packet *client_new(pid_t pid, int handle, const struct packet *pac
        info = package_find(lbid);
        if (!info) {
                char *pkgid;
-               pkgid = livebox_service_appid(lbid);
+               pkgid = dynamicbox_service_package_id(lbid);
                if (!pkgid) {
                        DbgFree(mainappid);
                        DbgFree(lbid);
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
@@ -1258,17 +1260,17 @@ static struct packet *client_new(pid_t pid, int handle, const struct packet *pac
        }
 
        if (!info) {
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
        } else if (package_is_fault(info)) {
-               ret = LB_STATUS_ERROR_FAULT;
-       } else if (util_free_space(IMAGE_PATH) <= MINIMUM_SPACE) {
+               ret = DBOX_STATUS_ERROR_FAULT;
+       } else if (util_free_space(DYNAMICBOX_CONF_IMAGE_PATH) <= DYNAMICBOX_CONF_MINIMUM_SPACE) {
                ErrPrint("Not enough space\n");
-               ret = LB_STATUS_ERROR_NO_SPACE;
+               ret = DBOX_STATUS_ERROR_NO_SPACE;
        } else {
                struct inst_info *inst;
 
-               if (period > 0.0f && period < MINIMUM_PERIOD) {
-                       period = MINIMUM_PERIOD;
+               if (period > 0.0f && period < DYNAMICBOX_CONF_MINIMUM_PERIOD) {
+                       period = DYNAMICBOX_CONF_MINIMUM_PERIOD;
                }
 
                inst = instance_create(client, timestamp, lbid, content, cluster, category, period, width, height);
@@ -1276,7 +1278,7 @@ static struct packet *client_new(pid_t pid, int handle, const struct packet *pac
                 * \note
                 * Using the "inst" without validate its value is at my disposal. ;)
                 */
-               ret = inst ? 0 : LB_STATUS_ERROR_FAULT;
+               ret = inst ? 0 : DBOX_STATUS_ERROR_FAULT;
        }
 
        DbgFree(lbid);
@@ -1295,36 +1297,36 @@ static struct packet *client_change_visibility(pid_t pid, int handle, const stru
        struct client_node *client;
        const char *pkgname;
        const char *id;
-       enum livebox_visible_state state;
+       enum dynamicbox_visible_state state;
        int ret;
        struct inst_info *inst;
 
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssi", &pkgname, &id, (int *)&state);
        if (ret != 3) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        /*!
         * \NOTE:
         * Trust the package name which are sent by the client.
-        * The package has to be a livebox package name.
+        * The package has to be a dynamicbox package name.
         */
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
        if (instance_client(inst) != client) {
-               ret = LB_STATUS_ERROR_PERMISSION;
+               ret = DBOX_STATUS_ERROR_PERMISSION_DENIED;
        } else {
                ret = instance_set_visible_state(inst, state);
        }
@@ -1347,14 +1349,14 @@ static struct packet *client_set_period(pid_t pid, int handle, const struct pack
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssd", &pkgname, &id, &period);
        if (ret != 3) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -1363,15 +1365,15 @@ static struct packet *client_set_period(pid_t pid, int handle, const struct pack
        /*!
         * \NOTE:
         * Trust the package name which are sent by the client.
-        * The package has to be a livebox package name.
+        * The package has to be a dynamicbox package name.
         */
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
        if (instance_client(inst) != client) {
-               ret = LB_STATUS_ERROR_PERMISSION;
+               ret = DBOX_STATUS_ERROR_PERMISSION_DENIED;
        } else {
                ret = instance_set_period(inst, period);
        }
@@ -1399,14 +1401,14 @@ static struct packet *client_change_group(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssss", &pkgname, &id, &cluster, &category);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -1415,15 +1417,15 @@ static struct packet *client_change_group(pid_t pid, int handle, const struct pa
        /*!
         * \NOTE:
         * Trust the package name which are sent by the client.
-        * The package has to be a livebox package name.
+        * The package has to be a dynamicbox package name.
         */
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
        if (instance_client(inst) != client) {
-               ret = LB_STATUS_ERROR_PERMISSION;
+               ret = DBOX_STATUS_ERROR_PERMISSION_DENIED;
        } else {
                ret = instance_change_group(inst, cluster, category);
        }
@@ -1437,7 +1439,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_mouse_enter(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_enter(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -1452,39 +1454,39 @@ static struct packet *client_pd_mouse_enter(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_IN, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_IN, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1492,7 +1494,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_leave(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_leave(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -1507,39 +1509,39 @@ static struct packet *client_pd_mouse_leave(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_OUT, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_OUT, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1547,7 +1549,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_down(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, id, width, height, timestamp, x, y, ret */
+static struct packet *client_gbar_mouse_down(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, id, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -1562,39 +1564,39 @@ static struct packet *client_pd_mouse_down(pid_t pid, int handle, const struct p
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, 1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_DOWN, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_DOWN, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1602,7 +1604,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_up(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_gbar_mouse_up(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -1617,39 +1619,39 @@ static struct packet *client_pd_mouse_up(pid_t pid, int handle, const struct pac
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, 0);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_UP, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_UP, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1657,7 +1659,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_move(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_gbar_mouse_move(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -1672,39 +1674,39 @@ static struct packet *client_pd_mouse_move(pid_t pid, int handle, const struct p
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_MOVE, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_MOVE, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1712,7 +1714,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_move(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_dbox_mouse_move(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -1727,39 +1729,39 @@ static struct packet *client_lb_mouse_move(pid_t pid, int handle, const struct p
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_MOVE, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_MOVE, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1786,7 +1788,7 @@ static int inst_del_cb(struct inst_info *inst, void *data)
 }
 
 
-static struct packet *client_pd_key_set(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_key_set(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -1801,39 +1803,39 @@ static struct packet *client_pd_key_set(pid_t pid, int handle, const struct pack
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = event_activate(0, 0, key_event_pd_route_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_pd_route_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_pd_route_cb);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = event_activate(0, 0, key_event_gbar_route_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_gbar_route_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_gbar_route_cb);
                        }
                }
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
-               ret = event_activate(0, 0, key_event_pd_consume_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_pd_consume_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_pd_consume_cb);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
+               ret = event_activate(0, 0, key_event_gbar_consume_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_gbar_consume_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_gbar_consume_cb);
                        }
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1845,7 +1847,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_key_unset(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_key_unset(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -1860,41 +1862,41 @@ static struct packet *client_pd_key_unset(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = event_deactivate(key_event_pd_route_cb, inst);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = event_deactivate(key_event_gbar_route_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_pd_route_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_gbar_route_cb);
                }
                */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
-               ret = event_deactivate(key_event_pd_consume_cb, inst);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
+               ret = event_deactivate(key_event_gbar_consume_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_pd_consume_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_gbar_consume_cb);
                }
                */
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1906,7 +1908,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_key_set(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_key_set(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -1921,39 +1923,39 @@ static struct packet *client_lb_key_set(pid_t pid, int handle, const struct pack
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = event_activate(0, 0, key_event_lb_route_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_lb_route_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_lb_route_cb);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = event_activate(0, 0, key_event_dbox_route_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_dbox_route_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_dbox_route_cb);
                        }
                }
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
-               ret = event_activate(0, 0, key_event_lb_consume_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_lb_consume_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_lb_consume_cb);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
+               ret = event_activate(0, 0, key_event_dbox_consume_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_dbox_consume_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_dbox_consume_cb);
                        }
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -1965,7 +1967,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_key_unset(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_key_unset(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -1980,41 +1982,41 @@ static struct packet *client_lb_key_unset(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = event_deactivate(key_event_lb_route_cb, inst);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = event_deactivate(key_event_dbox_route_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_lb_route_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_dbox_route_cb);
                }
                */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
-               ret = event_deactivate(key_event_lb_consume_cb, inst);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
+               ret = event_deactivate(key_event_dbox_consume_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_lb_consume_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, key_event_dbox_consume_cb);
                }
                */
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2026,7 +2028,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_mouse_set(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_mouse_set(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2041,45 +2043,45 @@ static struct packet *client_lb_mouse_set(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = event_activate(x, y, mouse_event_lb_route_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_lb_route_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_lb_route_cb);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = event_activate(x, y, mouse_event_dbox_route_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_dbox_route_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_dbox_route_cb);
                        }
                }
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
-               ret = event_activate(x, y, mouse_event_lb_consume_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_lb_consume_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_lb_consume_cb);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
+               ret = event_activate(x, y, mouse_event_dbox_consume_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_dbox_consume_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_dbox_consume_cb);
                        }
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_unset(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_mouse_unset(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2094,47 +2096,47 @@ static struct packet *client_lb_mouse_unset(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = event_deactivate(mouse_event_lb_route_cb, inst);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = event_deactivate(mouse_event_dbox_route_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_lb_route_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_dbox_route_cb);
                }
                */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
-               ret = event_deactivate(mouse_event_lb_consume_cb, inst);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
+               ret = event_deactivate(mouse_event_dbox_consume_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_lb_consume_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_dbox_consume_cb);
                }
                */
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_set(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_set(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2149,46 +2151,46 @@ static struct packet *client_pd_mouse_set(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = event_activate(x, y, mouse_event_pd_route_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_pd_route_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_pd_route_cb);
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = event_activate(x, y, mouse_event_gbar_route_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_gbar_route_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_gbar_route_cb);
                        }
                }
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
-               ret = event_activate(x, y, mouse_event_pd_consume_cb, inst);
-               if (ret == LB_STATUS_SUCCESS) {
-                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_pd_consume_cb) <= 0) {
-                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_pd_consume_cb);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
+               ret = event_activate(x, y, mouse_event_gbar_consume_cb, inst);
+               if (ret == DBOX_STATUS_ERROR_NONE) {
+                       if (instance_event_callback_is_added(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_gbar_consume_cb) <= 0) {
+                               instance_event_callback_add(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_gbar_consume_cb);
                        }
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_on_scroll(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_mouse_on_scroll(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2203,39 +2205,39 @@ static struct packet *client_lb_mouse_on_scroll(pid_t pid, int handle, const str
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_ON_SCROLL, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_ON_SCROLL, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2243,7 +2245,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_off_scroll(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_mouse_off_scroll(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2258,39 +2260,39 @@ static struct packet *client_lb_mouse_off_scroll(pid_t pid, int handle, const st
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_OFF_SCROLL, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_OFF_SCROLL, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2298,7 +2300,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_on_hold(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_mouse_on_hold(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2313,39 +2315,39 @@ static struct packet *client_lb_mouse_on_hold(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_ON_HOLD, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_ON_HOLD, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2353,7 +2355,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_off_hold(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_mouse_off_hold(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2368,39 +2370,39 @@ static struct packet *client_lb_mouse_off_hold(pid_t pid, int handle, const stru
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_OFF_HOLD, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_OFF_HOLD, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2408,7 +2410,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_on_scroll(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_on_scroll(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2423,39 +2425,39 @@ static struct packet *client_pd_mouse_on_scroll(pid_t pid, int handle, const str
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_ON_SCROLL, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_ON_SCROLL, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2463,7 +2465,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_off_scroll(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_off_scroll(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2478,39 +2480,39 @@ static struct packet *client_pd_mouse_off_scroll(pid_t pid, int handle, const st
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_OFF_SCROLL, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_OFF_SCROLL, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2518,7 +2520,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_on_hold(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_on_hold(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2533,39 +2535,39 @@ static struct packet *client_pd_mouse_on_hold(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_ON_HOLD, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_ON_HOLD, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2573,7 +2575,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_off_hold(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_off_hold(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2588,39 +2590,39 @@ static struct packet *client_pd_mouse_off_hold(pid_t pid, int handle, const stru
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_event_packet(pkg, inst, packet);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_event_packet(pkg, inst, packet);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_OFF_HOLD, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_OFF_HOLD, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2628,7 +2630,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_mouse_unset(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_mouse_unset(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -2643,47 +2645,47 @@ static struct packet *client_pd_mouse_unset(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = event_deactivate(mouse_event_pd_route_cb, inst);
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = event_deactivate(mouse_event_gbar_route_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_pd_route_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_gbar_route_cb);
                }
                */
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
-               ret = event_deactivate(mouse_event_pd_consume_cb, inst);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
+               ret = event_deactivate(mouse_event_gbar_consume_cb, inst);
                /*
                 * This delete callback will be removed when the instance will be destroyed.
                if (ret == 0) {
-                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_pd_consume_cb);
+                       instance_event_callback_del(inst, INSTANCE_EVENT_DESTROY, inst_del_cb, mouse_event_gbar_consume_cb);
                }
                */
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_enter(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_dbox_mouse_enter(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -2698,39 +2700,39 @@ static struct packet *client_lb_mouse_enter(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_IN, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_IN, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2738,7 +2740,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_leave(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_dbox_mouse_leave(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -2753,39 +2755,39 @@ static struct packet *client_lb_mouse_leave(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, -1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_OUT, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_OUT, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2793,7 +2795,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_down(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_dbox_mouse_down(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -2808,39 +2810,39 @@ static struct packet *client_lb_mouse_down(pid_t pid, int handle, const struct p
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, 1);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_DOWN, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_DOWN, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2848,7 +2850,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_lb_mouse_up(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_dbox_mouse_up(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct client_node *client;
        const char *pkgname;
@@ -2863,39 +2865,39 @@ static struct packet *client_lb_mouse_up(pid_t pid, int handle, const struct pac
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdii", &pkgname, &id, &timestamp, &x, &y);
        if (ret != 5) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_event_packet(pkg, inst, packet);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_event_packet(pkg, inst, packet);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, x, y, 0);
-               script_handler_feed_event(script, LB_SCRIPT_MOUSE_UP, timestamp);
+               script_handler_feed_event(script, DBOX_SCRIPT_MOUSE_UP, timestamp);
                ret = 0;
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2903,7 +2905,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_access_action(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_action(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -2918,41 +2920,41 @@ static struct packet *client_pd_access_action(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_ACTION, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_ACTION, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -2964,7 +2966,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_scroll(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_scroll(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -2979,41 +2981,41 @@ static struct packet *client_pd_access_scroll(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_SCROLL, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_SCROLL, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3025,7 +3027,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_value_change(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_value_change(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3040,41 +3042,41 @@ static struct packet *client_pd_access_value_change(pid_t pid, int handle, const
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_VALUE_CHANGE, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_VALUE_CHANGE, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3086,7 +3088,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_mouse(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_mouse(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3101,41 +3103,41 @@ static struct packet *client_pd_access_mouse(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_MOUSE, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_MOUSE, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3147,7 +3149,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_back(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_back(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3162,41 +3164,41 @@ static struct packet *client_pd_access_back(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_BACK, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_BACK, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3208,7 +3210,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_over(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_over(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3223,41 +3225,41 @@ static struct packet *client_pd_access_over(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_OVER, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_OVER, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3269,7 +3271,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_read(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_read(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3284,41 +3286,41 @@ static struct packet *client_pd_access_read(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_READ, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_READ, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3330,7 +3332,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_enable(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_enable(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3345,35 +3347,35 @@ static struct packet *client_pd_access_enable(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
                int type;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
-               type = (event.type == 0) ? LB_SCRIPT_ACCESS_DISABLE : LB_SCRIPT_ACCESS_ENABLE;
+               type = (event.type == 0) ? DBOX_SCRIPT_ACCESS_DISABLE : DBOX_SCRIPT_ACCESS_ENABLE;
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
                ret = script_handler_feed_event(script, type, timestamp);
@@ -3382,7 +3384,7 @@ static struct packet *client_pd_access_enable(pid_t pid, int handle, const struc
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3394,7 +3396,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_hl(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_hl(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3409,49 +3411,49 @@ static struct packet *client_pd_access_hl(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
                int type;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                switch (event.type) {
                case ACCESS_TYPE_CUR:
-                       type = LB_SCRIPT_ACCESS_HIGHLIGHT;
+                       type = DBOX_SCRIPT_ACCESS_HIGHLIGHT;
                        break;
                case ACCESS_TYPE_NEXT:
-                       type = LB_SCRIPT_ACCESS_HIGHLIGHT_NEXT;
+                       type = DBOX_SCRIPT_ACCESS_HIGHLIGHT_NEXT;
                        break;
                case ACCESS_TYPE_PREV:
-                       type = LB_SCRIPT_ACCESS_HIGHLIGHT_PREV;
+                       type = DBOX_SCRIPT_ACCESS_HIGHLIGHT_PREV;
                        break;
                case ACCESS_TYPE_OFF:
-                       type = LB_SCRIPT_ACCESS_UNHIGHLIGHT;
+                       type = DBOX_SCRIPT_ACCESS_UNHIGHLIGHT;
                        break;
                default:
-                       ret = LB_STATUS_ERROR_INVALID;
+                       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                        goto out;
                }
 
@@ -3462,7 +3464,7 @@ static struct packet *client_pd_access_hl(pid_t pid, int handle, const struct pa
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3474,7 +3476,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_access_activate(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_access_activate(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3489,41 +3491,41 @@ static struct packet *client_pd_access_activate(pid_t pid, int handle, const str
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_ACTIVATE, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_ACTIVATE, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3535,7 +3537,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_key_focus_in(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_key_focus_in(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -3550,41 +3552,41 @@ static struct packet *client_pd_key_focus_in(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_FOCUS_IN, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_FOCUS_IN, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3596,7 +3598,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_key_focus_out(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_key_focus_out(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -3611,41 +3613,41 @@ static struct packet *client_pd_key_focus_out(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_FOCUS_OUT, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_FOCUS_OUT, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3657,7 +3659,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_key_down(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_key_down(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -3672,41 +3674,41 @@ static struct packet *client_pd_key_down(pid_t pid, int handle, const struct pac
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_DOWN, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_DOWN, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3727,18 +3729,18 @@ static struct packet *client_pause_request(pid_t pid, int handle, const struct p
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is paused - manually reported\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "d", &timestamp);
        if (ret != 1) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
-       if (USE_XMONITOR) {
+       if (DYNAMICBOX_CONF_USE_XMONITOR) {
                DbgPrint("XMONITOR enabled. ignore client paused request\n");
        } else {
                xmonitor_pause(client);
@@ -3766,7 +3768,7 @@ static struct packet *client_resume_request(pid_t pid, int handle, const struct
                goto out;
        }
 
-       if (USE_XMONITOR) {
+       if (DYNAMICBOX_CONF_USE_XMONITOR) {
                DbgPrint("XMONITOR enabled. ignore client resumed request\n");
        } else {
                xmonitor_resume(client);
@@ -3776,7 +3778,7 @@ out:
        return NULL;
 }
 
-static struct packet *client_pd_key_up(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_key_up(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -3791,41 +3793,41 @@ static struct packet *client_pd_key_up(pid_t pid, int handle, const struct packe
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Invalid parameter\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               ret = forward_pd_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               ret = forward_gbar_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_pd_script(inst);
+               script = instance_gbar_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_UP, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_UP, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3837,7 +3839,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_hl(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_hl(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3852,49 +3854,49 @@ static struct packet *client_lb_access_hl(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
                int type;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                switch (event.type) {
                case ACCESS_TYPE_CUR:
-                       type = LB_SCRIPT_ACCESS_HIGHLIGHT;
+                       type = DBOX_SCRIPT_ACCESS_HIGHLIGHT;
                        break;
                case ACCESS_TYPE_NEXT:
-                       type = LB_SCRIPT_ACCESS_HIGHLIGHT_NEXT;
+                       type = DBOX_SCRIPT_ACCESS_HIGHLIGHT_NEXT;
                        break;
                case ACCESS_TYPE_PREV:
-                       type = LB_SCRIPT_ACCESS_HIGHLIGHT_PREV;
+                       type = DBOX_SCRIPT_ACCESS_HIGHLIGHT_PREV;
                        break;
                case ACCESS_TYPE_OFF:
-                       type = LB_SCRIPT_ACCESS_UNHIGHLIGHT;
+                       type = DBOX_SCRIPT_ACCESS_UNHIGHLIGHT;
                        break;
                default:
-                       ret = LB_STATUS_ERROR_INVALID;
+                       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                        goto out;
                }
 
@@ -3905,7 +3907,7 @@ static struct packet *client_lb_access_hl(pid_t pid, int handle, const struct pa
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3917,7 +3919,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_action(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_action(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3932,47 +3934,47 @@ static struct packet *client_lb_access_action(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_ACTION, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_ACTION, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -3984,7 +3986,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_scroll(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_scroll(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -3999,47 +4001,47 @@ static struct packet *client_lb_access_scroll(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_SCROLL, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_SCROLL, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4051,7 +4053,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_value_change(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_value_change(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -4066,47 +4068,47 @@ static struct packet *client_lb_access_value_change(pid_t pid, int handle, const
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_VALUE_CHANGE, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_VALUE_CHANGE, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4118,7 +4120,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_mouse(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_mouse(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -4133,47 +4135,47 @@ static struct packet *client_lb_access_mouse(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_MOUSE, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_MOUSE, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4185,7 +4187,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_back(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_back(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -4200,47 +4202,47 @@ static struct packet *client_lb_access_back(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_BACK, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_BACK, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4252,7 +4254,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_over(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_over(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -4267,47 +4269,47 @@ static struct packet *client_lb_access_over(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_OVER, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_OVER, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4319,7 +4321,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_read(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_read(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -4334,47 +4336,47 @@ static struct packet *client_lb_access_read(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_READ, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_READ, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4386,7 +4388,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_enable(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_enable(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -4401,41 +4403,41 @@ static struct packet *client_lb_access_enable(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exist\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
                /*!
                 * Enen if it fails to send packet,
                 * The packet will be unref'd
                 * So we don't need to check the ret value.
                 */
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
                int type;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
-               type = (event.type == 0) ? LB_SCRIPT_ACCESS_DISABLE : LB_SCRIPT_ACCESS_ENABLE;
+               type = (event.type == 0) ? DBOX_SCRIPT_ACCESS_DISABLE : DBOX_SCRIPT_ACCESS_ENABLE;
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
                ret = script_handler_feed_event(script, type, timestamp);
@@ -4444,7 +4446,7 @@ static struct packet *client_lb_access_enable(pid_t pid, int handle, const struc
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4456,7 +4458,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_access_activate(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_access_activate(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
        struct client_node *client;
@@ -4471,42 +4473,42 @@ static struct packet *client_lb_access_activate(pid_t pid, int handle, const str
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdiii", &pkgname, &id, &timestamp, &event.x, &event.y, &event.type);
        if (ret != 6) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_access_packet(pkg, inst, packet_command(packet), timestamp, &event);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
                        ErrPrint("Instance has no script\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_pointer(script, event.x, event.y, event.type);
-               ret = script_handler_feed_event(script, LB_SCRIPT_ACCESS_ACTIVATE, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_ACCESS_ACTIVATE, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_access_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4518,7 +4520,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_key_down(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_key_down(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -4533,41 +4535,41 @@ static struct packet *client_lb_key_down(pid_t pid, int handle, const struct pac
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_DOWN, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_DOWN, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4579,7 +4581,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_key_focus_in(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_key_focus_in(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -4594,41 +4596,41 @@ static struct packet *client_lb_key_focus_in(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_FOCUS_IN, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_FOCUS_IN, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4640,7 +4642,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_key_focus_out(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_key_focus_out(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -4655,41 +4657,41 @@ static struct packet *client_lb_key_focus_out(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_FOCUS_OUT, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_FOCUS_OUT, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4701,7 +4703,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_key_up(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_key_up(pid_t pid, int handle, const struct packet *packet)
 {
        struct client_node *client;
        const char *pkgname;
@@ -4716,41 +4718,41 @@ static struct packet *client_lb_key_up(pid_t pid, int handle, const struct packe
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdi", &pkgname, &id, &timestamp, &keycode);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = forward_lb_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
-       } else if (package_lb_type(pkg) == LB_TYPE_SCRIPT) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = forward_dbox_key_packet(pkg, inst, packet_command(packet), timestamp, keycode);
+       } else if (package_dbox_type(pkg) == DBOX_TYPE_SCRIPT) {
                struct script_info *script;
 
-               script = instance_lb_script(inst);
+               script = instance_dbox_script(inst);
                if (!script) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                script_handler_update_keycode(script, keycode);
-               ret = script_handler_feed_event(script, LB_SCRIPT_KEY_UP, timestamp);
+               ret = script_handler_feed_event(script, DBOX_SCRIPT_KEY_UP, timestamp);
                if (ret >= 0) {
                        ret = send_delayed_key_status(inst, ret);
                }
        } else {
                ErrPrint("Unsupported package\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -4769,7 +4771,8 @@ static int release_pixmap_cb(struct client_node *client, void *canvas)
        return -1; /* Delete this callback */
 }
 
-static struct packet *client_lb_acquire_pixmap(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+
+static struct packet *client_dbox_acquire_xpixmap(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct packet *result;
        const char *pkgname;
@@ -4780,41 +4783,110 @@ static struct packet *client_lb_acquire_pixmap(pid_t pid, int handle, const stru
        int pixmap = 0;
        void *buf_ptr;
        struct buffer_info *buffer;
+       int idx;
 
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               goto out;
+       }
+
+       ret = packet_get(packet, "ssi", &pkgname, &id, &idx);
+       if (ret != 3) {
+               ErrPrint("Parameter is not matched\n");
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               goto out;
+       }
+
+       if (idx >= DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT || idx < 0) {
+               DbgPrint("Index is not valid: %d\n", idx);
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               goto out;
+       }
+
+       ret = validate_request(pkgname, id, &inst, NULL);
+       if (ret != DBOX_STATUS_ERROR_NONE) {
+               goto out;
+       }
+
+       buffer = instance_dbox_extra_buffer(inst, idx);
+       if (!buffer) {
+               ErrPrint("Extra buffer for %d is not available\n", idx);
+               goto out;
+       }
+
+       buf_ptr = buffer_handler_pixmap_ref(buffer);
+       if (!buf_ptr) {
+               ErrPrint("Failed to ref pixmap\n");
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
+               goto out;
+       }
+
+       ret = client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, release_pixmap_cb, buf_ptr);
+       if (ret < 0) {
+               ErrPrint("Failed to add a new client deactivate callback\n");
+               buffer_handler_pixmap_unref(buf_ptr);
+       } else {
+               pixmap = buffer_handler_pixmap(buffer);
+               ret = DBOX_STATUS_ERROR_NONE;
+       }
+
+out:
+       result = packet_create_reply(packet, "ii", pixmap, ret);
+       if (!result) {
+               ErrPrint("Failed to create a reply packet\n");
+       }
+
+       return result;
+}
+
+static struct packet *client_dbox_acquire_pixmap(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+{
+       struct packet *result;
+       const char *pkgname;
+       const char *id;
+       struct client_node *client;
+       struct inst_info *inst;
+       int ret;
+       int pixmap = 0;
+       void *buf_ptr;
+       struct buffer_info *buffer;
+
+       client = client_find_by_rpc_handle(handle);
+       if (!client) {
+               ErrPrint("Client %d is not exists\n", pid);
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = packet_get(packet, "ss", &pkgname, &id);
        if (ret != 2) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       buffer = instance_lb_buffer(inst);
+       buffer = instance_dbox_buffer(inst);
        if (!buffer) {
                struct script_info *script_info;
 
-               script_info = instance_lb_script(inst);
+               script_info = instance_dbox_script(inst);
                if (!script_info) {
-                       ErrPrint("Unable to get LB buffer: %s\n", id);
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ErrPrint("Unable to get DBOX buffer: %s\n", id);
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                buffer = script_handler_buffer_info(script_info);
                if (!buffer) {
                        ErrPrint("Unable to get buffer_info: %s\n", id);
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
        }
@@ -4822,7 +4894,7 @@ static struct packet *client_lb_acquire_pixmap(pid_t pid, int handle, const stru
        buf_ptr = buffer_handler_pixmap_ref(buffer);
        if (!buf_ptr) {
                ErrPrint("Failed to ref pixmap\n");
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
@@ -4832,7 +4904,7 @@ static struct packet *client_lb_acquire_pixmap(pid_t pid, int handle, const stru
                buffer_handler_pixmap_unref(buf_ptr);
        } else {
                pixmap = buffer_handler_pixmap(buffer);
-               ret = LB_STATUS_SUCCESS;
+               ret = DBOX_STATUS_ERROR_NONE;
        }
 
 out:
@@ -4844,7 +4916,7 @@ out:
        return result;
 }
 
-static struct packet *client_lb_release_pixmap(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_dbox_release_pixmap(pid_t pid, int handle, const struct packet *packet)
 {
        const char *pkgname;
        const char *id;
@@ -4866,7 +4938,7 @@ static struct packet *client_lb_release_pixmap(pid_t pid, int handle, const stru
        }
 
        ret = validate_request(pkgname, id, NULL, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                DbgPrint("It seems that the instance is already deleted: %s\n", id);
        }
 
@@ -4881,11 +4953,81 @@ static struct packet *client_lb_release_pixmap(pid_t pid, int handle, const stru
        }
 
 out:
-       /*! \note No reply packet */
+       /**
+        * @note No reply packet
+        */
        return NULL;
 }
 
-static struct packet *client_pd_acquire_pixmap(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+static struct packet *client_gbar_acquire_xpixmap(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+{
+       struct packet *result;
+       const char *pkgname;
+       const char *id;
+       struct client_node *client;
+       struct inst_info *inst;
+       int ret;
+       int pixmap = 0;
+       void *buf_ptr;
+       struct buffer_info *buffer;
+       int idx;
+
+       client = client_find_by_rpc_handle(handle);
+       if (!client) {
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               ErrPrint("Client %d is not exists\n", pid);
+               goto out;
+       }
+
+       ret = packet_get(packet, "ssi", &pkgname, &id, &idx);
+       if (ret != 3) {
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               ErrPrint("Parameter is not matched\n");
+               goto out;
+       }
+
+       if (idx >= DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT || idx < 0) {
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               goto out;
+       }
+
+       ret = validate_request(pkgname, id, &inst, NULL);
+       if (ret != DBOX_STATUS_ERROR_NONE) {
+               goto out;
+       }
+
+       buffer = instance_gbar_extra_buffer(inst, idx);
+       if (!buffer) {
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
+               goto out;
+       }
+
+       buf_ptr = buffer_handler_pixmap_ref(buffer);
+       if (!buf_ptr) {
+               ErrPrint("Failed to ref pixmap\n");
+               ret = DBOX_STATUS_ERROR_FAULT;
+               goto out;
+       }
+
+       ret = client_event_callback_add(client, CLIENT_EVENT_DEACTIVATE, release_pixmap_cb, buf_ptr);
+       if (ret < 0) {
+               ErrPrint("Failed to add a new client deactivate callback\n");
+               buffer_handler_pixmap_unref(buf_ptr);
+       } else {
+               pixmap = buffer_handler_pixmap(buffer);
+               ret = DBOX_STATUS_ERROR_NONE;
+       }
+
+out:
+       result = packet_create_reply(packet, "ii", pixmap, ret);
+       if (!result) {
+               ErrPrint("Failed to create a reply packet\n");
+       }
+
+       return result;
+}
+
+static struct packet *client_gbar_acquire_pixmap(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
 {
        struct packet *result;
        const char *pkgname;
@@ -4899,43 +5041,43 @@ static struct packet *client_pd_acquire_pixmap(pid_t pid, int handle, const stru
 
        client = client_find_by_rpc_handle(handle);
        if (!client) {
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                ErrPrint("Client %d is not exists\n", pid);
                goto out;
        }
 
        ret = packet_get(packet, "ss", &pkgname, &id);
        if (ret != 2) {
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                ErrPrint("Parameter is not matched\n");
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (instance_get_data(inst, PD_RESIZE_MONITOR_TAG)) {
-               ret = LB_STATUS_ERROR_BUSY;
+       if (instance_get_data(inst, GBAR_RESIZE_MONITOR_TAG)) {
+               ret = DBOX_STATUS_ERROR_BUSY;
                goto out;
        }
 
-       buffer = instance_pd_buffer(inst);
+       buffer = instance_gbar_buffer(inst);
        if (!buffer) {
                struct script_info *script_info;
 
-               script_info = instance_pd_script(inst);
+               script_info = instance_gbar_script(inst);
                if (!script_info) {
-                       ErrPrint("Unable to get LB buffer: %s\n", id);
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ErrPrint("Unable to get DBOX buffer: %s\n", id);
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
 
                buffer = script_handler_buffer_info(script_info);
                if (!buffer) {
                        ErrPrint("Unable to get buffer_info: %s\n", id);
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                        goto out;
                }
        }
@@ -4943,7 +5085,7 @@ static struct packet *client_pd_acquire_pixmap(pid_t pid, int handle, const stru
        buf_ptr = buffer_handler_pixmap_ref(buffer);
        if (!buf_ptr) {
                ErrPrint("Failed to ref pixmap\n");
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                goto out;
        }
 
@@ -4953,7 +5095,7 @@ static struct packet *client_pd_acquire_pixmap(pid_t pid, int handle, const stru
                buffer_handler_pixmap_unref(buf_ptr);
        } else {
                pixmap = buffer_handler_pixmap(buffer);
-               ret = LB_STATUS_SUCCESS;
+               ret = DBOX_STATUS_ERROR_NONE;
        }
 
 out:
@@ -4965,7 +5107,7 @@ out:
        return result;
 }
 
-static struct packet *client_pd_release_pixmap(pid_t pid, int handle, const struct packet *packet)
+static struct packet *client_gbar_release_pixmap(pid_t pid, int handle, const struct packet *packet)
 {
        const char *pkgname;
        const char *id;
@@ -4987,7 +5129,7 @@ static struct packet *client_pd_release_pixmap(pid_t pid, int handle, const stru
        }
 
        ret = validate_request(pkgname, id, NULL, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                DbgPrint("It seems that the instance is already deleted: %s\n", id);
        }
 
@@ -5019,7 +5161,7 @@ static struct packet *client_pinup_changed(pid_t pid, int handle, const struct p
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                pinup = 0;
                goto out;
        }
@@ -5027,13 +5169,13 @@ static struct packet *client_pinup_changed(pid_t pid, int handle, const struct p
        ret = packet_get(packet, "ssi", &pkgname, &id, &pinup);
        if (ret != 3) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                pinup = 0;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                ret = instance_set_pinup(inst, pinup);
        }
 
@@ -5046,11 +5188,11 @@ out:
        return result;
 }
 
-static Eina_Bool lazy_pd_created_cb(void *inst)
+static Eina_Bool lazy_gbar_created_cb(void *inst)
 {
        struct pkg_info *pkg;
 
-       if (!instance_del_data(inst, LAZY_PD_OPEN_TAG)) {
+       if (!instance_del_data(inst, LAZY_GBAR_OPEN_TAG)) {
                ErrPrint("lazy,pd,open is already deleted.\n");
                return ECORE_CALLBACK_CANCEL;
        }
@@ -5067,25 +5209,25 @@ static Eina_Bool lazy_pd_created_cb(void *inst)
 
        /*!
         * After unref instance first,
-        * if the instance is not destroyed, try to notify the created PD event to the client.
+        * if the instance is not destroyed, try to notify the created GBAR event to the client.
         */
        if (instance_unref(inst)) {
                int ret;
-               ret = instance_client_pd_created(inst, LB_STATUS_SUCCESS);
+               ret = instance_client_gbar_created(inst, DBOX_STATUS_ERROR_NONE);
                if (ret < 0) {
-                       DbgPrint("Send PD Create event (%d) to client\n", ret);
+                       DbgPrint("Send GBAR Create event (%d) to client\n", ret);
                }
        }
 
        return ECORE_CALLBACK_CANCEL;
 }
 
-static Eina_Bool lazy_pd_destroyed_cb(void *inst)
+static Eina_Bool lazy_gbar_destroyed_cb(void *inst)
 {
        struct pkg_info *pkg;
        struct slave_node *slave;
 
-       if (!instance_del_data(inst, LAZY_PD_CLOSE_TAG)) {
+       if (!instance_del_data(inst, LAZY_GBAR_CLOSE_TAG)) {
                ErrPrint("lazy,pd,close is already deleted.\n");
                return ECORE_CALLBACK_CANCEL;
        }
@@ -5094,10 +5236,10 @@ static Eina_Bool lazy_pd_destroyed_cb(void *inst)
        if (pkg) {
                slave = package_slave(pkg);
                if (slave) {
-                       if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+                       if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                                DbgPrint("Delete script type close callback\n");
                                (void)slave_event_callback_del(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_close_script_cb, inst);
-                       } else if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
+                       } else if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
                                DbgPrint("Delete buffer type close callback\n");
                                (void)slave_event_callback_del(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_close_buffer_cb, inst);
                        }
@@ -5110,16 +5252,16 @@ static Eina_Bool lazy_pd_destroyed_cb(void *inst)
                /*!
                 * If the instance is not deleted, we should send pd-destroy event from here.
                 */
-               ret = instance_client_pd_destroyed(inst, LB_STATUS_SUCCESS);
+               ret = instance_client_gbar_destroyed(inst, DBOX_STATUS_ERROR_NONE);
                if (ret < 0) {
-                       ErrPrint("Failed sending PD Destroy event (%d)\n", ret);
+                       ErrPrint("Failed sending GBAR Destroy event (%d)\n", ret);
                }
        }
 
        return ECORE_CALLBACK_CANCEL;
 }
 
-static struct packet *client_pd_move(pid_t pid, int handle, const struct packet *packet) /* pkgname, id, x, y */
+static struct packet *client_gbar_move(pid_t pid, int handle, const struct packet *packet) /* pkgname, id, x, y */
 {
        struct client_node *client;
        struct inst_info *inst;
@@ -5133,44 +5275,44 @@ static struct packet *client_pd_move(pid_t pid, int handle, const struct packet
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdd", &pkgname, &id, &x, &y);
        if (ret != 4) {
                ErrPrint("Parameter is not correct\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               instance_slave_set_pd_pos(inst, x, y);
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               instance_slave_set_gbar_pos(inst, x, y);
                ret = instance_signal_emit(inst, "pd,move", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                int ix;
                int iy;
 
-               instance_slave_set_pd_pos(inst, x, y);
-               ix = x * instance_pd_width(inst);
-               iy = y * instance_pd_height(inst);
-               script_handler_update_pointer(instance_pd_script(inst), ix, iy, 0);
+               instance_slave_set_gbar_pos(inst, x, y);
+               ix = x * instance_gbar_width(inst);
+               iy = y * instance_gbar_height(inst);
+               script_handler_update_pointer(instance_gbar_script(inst), ix, iy, 0);
                ret = instance_signal_emit(inst, "pd,move", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
        } else {
-               ErrPrint("Invalid PD type\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ErrPrint("Invalid GBAR type\n");
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 out:
-       DbgPrint("Update PD position: %d\n", ret);
+       DbgPrint("Update GBAR position: %d\n", ret);
        return NULL;
 }
 
-static Eina_Bool pd_open_monitor_cb(void *inst)
+static Eina_Bool gbar_open_monitor_cb(void *inst)
 {
        struct pkg_info *pkg;
 
@@ -5184,15 +5326,15 @@ static Eina_Bool pd_open_monitor_cb(void *inst)
                }
        }
 
-       (void)instance_slave_close_pd(inst, instance_pd_owner(inst), LB_CLOSE_PD_TIMEOUT);
-       (void)instance_client_pd_created(inst, LB_STATUS_ERROR_TIMEOUT);
-       (void)instance_del_data(inst, PD_OPEN_MONITOR_TAG);
+       (void)instance_slave_close_gbar(inst, instance_gbar_owner(inst), DBOX_CLOSE_GBAR_TIMEOUT);
+       (void)instance_client_gbar_created(inst, DBOX_STATUS_ERROR_TIMEOUT);
+       (void)instance_del_data(inst, GBAR_OPEN_MONITOR_TAG);
        (void)instance_unref(inst);
-       ErrPrint("PD Open request is timed-out (%lf)\n", PD_REQUEST_TIMEOUT);
+       ErrPrint("GBAR Open request is timed-out (%lf)\n", DYNAMICBOX_CONF_GBAR_REQUEST_TIMEOUT);
        return ECORE_CALLBACK_CANCEL;
 }
 
-static Eina_Bool pd_close_monitor_cb(void *inst)
+static Eina_Bool gbar_close_monitor_cb(void *inst)
 {
        struct pkg_info *pkg;
 
@@ -5206,14 +5348,14 @@ static Eina_Bool pd_close_monitor_cb(void *inst)
                }
        }
 
-       (void)instance_client_pd_destroyed(inst, LB_STATUS_ERROR_TIMEOUT);
-       (void)instance_del_data(inst, PD_CLOSE_MONITOR_TAG);
+       (void)instance_client_gbar_destroyed(inst, DBOX_STATUS_ERROR_TIMEOUT);
+       (void)instance_del_data(inst, GBAR_CLOSE_MONITOR_TAG);
        (void)instance_unref(inst);
-       ErrPrint("PD Close request is not processed in %lf seconds\n", PD_REQUEST_TIMEOUT);
+       ErrPrint("GBAR Close request is not processed in %lf seconds\n", DYNAMICBOX_CONF_GBAR_REQUEST_TIMEOUT);
        return ECORE_CALLBACK_CANCEL;
 }
 
-static Eina_Bool pd_resize_monitor_cb(void *inst)
+static Eina_Bool gbar_resize_monitor_cb(void *inst)
 {
        struct pkg_info *pkg;
 
@@ -5226,15 +5368,15 @@ static Eina_Bool pd_resize_monitor_cb(void *inst)
                }
        }
 
-       (void)instance_slave_close_pd(inst, instance_pd_owner(inst), LB_CLOSE_PD_TIMEOUT);
-       (void)instance_client_pd_destroyed(inst, LB_STATUS_ERROR_TIMEOUT);
-       (void)instance_del_data(inst, PD_RESIZE_MONITOR_TAG);
+       (void)instance_slave_close_gbar(inst, instance_gbar_owner(inst), DBOX_CLOSE_GBAR_TIMEOUT);
+       (void)instance_client_gbar_destroyed(inst, DBOX_STATUS_ERROR_TIMEOUT);
+       (void)instance_del_data(inst, GBAR_RESIZE_MONITOR_TAG);
        (void)instance_unref(inst);
-       ErrPrint("PD Resize request is not processed in %lf seconds\n", PD_REQUEST_TIMEOUT);
+       ErrPrint("GBAR Resize request is not processed in %lf seconds\n", DYNAMICBOX_CONF_GBAR_REQUEST_TIMEOUT);
        return ECORE_CALLBACK_CANCEL;
 }
 
-static struct packet *client_create_pd(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, ret */
+static struct packet *client_create_gbar(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, ret */
 {
        struct client_node *client;
        struct packet *result;
@@ -5243,7 +5385,7 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
        int ret;
        struct inst_info *inst = NULL;
        const struct pkg_info *pkg = NULL;
-       Ecore_Timer *pd_monitor;
+       Ecore_Timer *gbar_monitor;
        double x;
        double y;
 
@@ -5252,76 +5394,76 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ssdd", &pkgname, &id, &x, &y);
        if (ret != 4) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       if (instance_pd_owner(inst)) {
-               ErrPrint("PD is already owned\n");
-               ret = LB_STATUS_ERROR_ALREADY;
-       } else if (package_pd_type(instance_package(inst)) == PD_TYPE_BUFFER) {
-               pd_monitor = instance_get_data(inst, LAZY_PD_CLOSE_TAG);
-               if (pd_monitor) {
-                       ecore_timer_del(pd_monitor);
+       if (instance_gbar_owner(inst)) {
+               ErrPrint("GBAR is already owned\n");
+               ret = DBOX_STATUS_ERROR_ALREADY;
+       } else if (package_gbar_type(instance_package(inst)) == GBAR_TYPE_BUFFER) {
+               gbar_monitor = instance_get_data(inst, LAZY_GBAR_CLOSE_TAG);
+               if (gbar_monitor) {
+                       ecore_timer_del(gbar_monitor);
                        /* This timer attribute will be deleted */
-                       lazy_pd_destroyed_cb(inst);
+                       lazy_gbar_destroyed_cb(inst);
                }
                
-               if (instance_get_data(inst, PD_OPEN_MONITOR_TAG)) {
-                       DbgPrint("PD Open request is already processed\n");
-                       ret = LB_STATUS_ERROR_ALREADY;
+               if (instance_get_data(inst, GBAR_OPEN_MONITOR_TAG)) {
+                       DbgPrint("GBAR Open request is already processed\n");
+                       ret = DBOX_STATUS_ERROR_ALREADY;
                        goto out;
                }
 
-               if (instance_get_data(inst, PD_CLOSE_MONITOR_TAG)) {
-                       DbgPrint("PD Close request is already in process\n");
-                       ret = LB_STATUS_ERROR_BUSY;
+               if (instance_get_data(inst, GBAR_CLOSE_MONITOR_TAG)) {
+                       DbgPrint("GBAR Close request is already in process\n");
+                       ret = DBOX_STATUS_ERROR_BUSY;
                        goto out;
                }
 
-               if (instance_get_data(inst, PD_RESIZE_MONITOR_TAG)) {
-                       DbgPrint("PD resize request is already in process\n");
-                       ret = LB_STATUS_ERROR_BUSY;
+               if (instance_get_data(inst, GBAR_RESIZE_MONITOR_TAG)) {
+                       DbgPrint("GBAR resize request is already in process\n");
+                       ret = DBOX_STATUS_ERROR_BUSY;
                        goto out;
                }
 
-               instance_slave_set_pd_pos(inst, x, y);
+               instance_slave_set_gbar_pos(inst, x, y);
                /*!
                 * \note
                 * Send request to the slave.
                 * The SLAVE must has to repsonse this via "release_buffer" method.
                 */
-               ret = instance_slave_open_pd(inst, client);
-               if (ret == (int)LB_STATUS_SUCCESS) {
-                       ret = instance_signal_emit(inst, "pd,show", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
-                       if (ret != LB_STATUS_SUCCESS) {
+               ret = instance_slave_open_gbar(inst, client);
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
+                       ret = instance_signal_emit(inst, "gbar,show", instance_id(inst), 0.0, 0.0, 0.0, 0.0, x, y, 0);
+                       if (ret != DBOX_STATUS_ERROR_NONE) {
                                int tmp_ret;
 
-                               tmp_ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_FAULT);
+                               tmp_ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_FAULT);
                                if (tmp_ret < 0) {
-                                       ErrPrint("Unable to send script event for openning PD [%s], %d\n", pkgname, tmp_ret);
+                                       ErrPrint("Unable to send script event for openning GBAR [%s], %d\n", pkgname, tmp_ret);
                                }
                        } else {
-                               pd_monitor = ecore_timer_add(PD_REQUEST_TIMEOUT, pd_open_monitor_cb, instance_ref(inst));
-                               if (!pd_monitor) {
+                               gbar_monitor = ecore_timer_add(DYNAMICBOX_CONF_GBAR_REQUEST_TIMEOUT, gbar_open_monitor_cb, instance_ref(inst));
+                               if (!gbar_monitor) {
                                        (void)instance_unref(inst);
-                                       ErrPrint("Failed to create a timer for PD Open monitor\n");
+                                       ErrPrint("Failed to create a timer for GBAR Open monitor\n");
                                } else {
                                        struct slave_node *slave;
 
-                                       (void)instance_set_data(inst, PD_OPEN_MONITOR_TAG, pd_monitor);
+                                       (void)instance_set_data(inst, GBAR_OPEN_MONITOR_TAG, gbar_monitor);
 
                                        slave = package_slave(pkg);
                                        if (!slave) {
@@ -5329,32 +5471,32 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
                                                goto out;
                                        }
 
-                                       if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_open_buffer_cb, inst) != LB_STATUS_SUCCESS) {
+                                       if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_open_buffer_cb, inst) != DBOX_STATUS_ERROR_NONE) {
                                                ErrPrint("Failed to add fault handler: %s\n");
                                        }
                                }
                        }
                } else {
-                       ErrPrint("Unable to send request for openning PD [%s]\n", pkgname);
+                       ErrPrint("Unable to send request for openning GBAR [%s]\n", pkgname);
                }
 
                /*!
                 * \note
-                * PD craeted event will be send by the acquire_buffer function.
+                * GBAR craeted event will be send by the acquire_buffer function.
                 * Because the slave will make request the acquire_buffer to
-                * render the PD
+                * render the GBAR
                 *
-                * instance_client_pd_created(inst);
+                * instance_client_gbar_created(inst);
                 */
-       } else if (package_pd_type(instance_package(inst)) == PD_TYPE_SCRIPT) {
+       } else if (package_gbar_type(instance_package(inst)) == GBAR_TYPE_SCRIPT) {
                int ix;
                int iy;
 
-               pd_monitor = instance_get_data(inst, LAZY_PD_CLOSE_TAG);
-               if (pd_monitor) {
-                       ecore_timer_del(pd_monitor);
+               gbar_monitor = instance_get_data(inst, LAZY_GBAR_CLOSE_TAG);
+               if (gbar_monitor) {
+                       ecore_timer_del(gbar_monitor);
                        /* lazy,pd,close will be deleted */
-                       lazy_pd_destroyed_cb(inst);
+                       lazy_gbar_destroyed_cb(inst);
                }
 
                /*!
@@ -5363,24 +5505,24 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
                 * we ignore this for this moment, so we have to handle this error later.
                 *
                 * if ret is less than 0, the slave has some problem.
-                * but the script mode doesn't need slave for rendering default view of PD
+                * but the script mode doesn't need slave for rendering default view of GBAR
                 * so we can hanle it later.
                 */
-               instance_slave_set_pd_pos(inst, x, y);
-               ix = x * instance_pd_width(inst);
-               iy = y * instance_pd_height(inst);
+               instance_slave_set_gbar_pos(inst, x, y);
+               ix = x * instance_gbar_width(inst);
+               iy = y * instance_gbar_height(inst);
 
-               script_handler_update_pointer(instance_pd_script(inst), ix, iy, 0);
+               script_handler_update_pointer(instance_gbar_script(inst), ix, iy, 0);
 
-               ret = instance_slave_open_pd(inst, client);
-               if (ret == (int)LB_STATUS_SUCCESS) {
-                       ret = script_handler_load(instance_pd_script(inst), 1);
+               ret = instance_slave_open_gbar(inst, client);
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
+                       ret = script_handler_load(instance_gbar_script(inst), 1);
 
                        /*!
                         * \note
-                        * Send the PD created event to the clients,
+                        * Send the GBAR created event to the clients,
                         */
-                       if (ret == (int)LB_STATUS_SUCCESS) {
+                       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
 
                                /*!
                                 * \note
@@ -5394,7 +5536,7 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
                                 * \note
                                 * At here, we don't need to rememeber the timer object.
                                 * Even if the timer callback is called, after the instance is destroyed.
-                                * lazy_pd_created_cb will decrease the instance refcnt first.
+                                * lazy_gbar_created_cb will decrease the instance refcnt first.
                                 * At that time, if the instance is released, the timer callback will do nothing.
                                 *
                                 * 13-05-28
@@ -5402,13 +5544,13 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
                                 * But I just add it to the tagged-data of the instance.
                                 * Just reserve for future-use.
                                 */
-                               pd_monitor = ecore_timer_add(DELAY_TIME, lazy_pd_created_cb, inst);
-                               if (!pd_monitor) {
-                                       ret = script_handler_unload(instance_pd_script(inst), 1);
+                               gbar_monitor = ecore_timer_add(DELAY_TIME, lazy_gbar_created_cb, inst);
+                               if (!gbar_monitor) {
+                                       ret = script_handler_unload(instance_gbar_script(inst), 1);
                                        ErrPrint("Unload script: %d\n", ret);
 
-                                       ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_NORMAL);
-                                       ErrPrint("Close PD %d\n", ret);
+                                       ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_NORMAL);
+                                       ErrPrint("Close GBAR %d\n", ret);
 
                                        inst = instance_unref(inst);
                                        if (!inst) {
@@ -5417,11 +5559,11 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
 
                                        ErrPrint("Instance: %s\n", pkgname);
 
-                                       ret = LB_STATUS_ERROR_FAULT;
+                                       ret = DBOX_STATUS_ERROR_FAULT;
                                } else {
                                        struct slave_node *slave;
 
-                                       (void)instance_set_data(inst, LAZY_PD_OPEN_TAG, pd_monitor);
+                                       (void)instance_set_data(inst, LAZY_GBAR_OPEN_TAG, gbar_monitor);
 
                                        slave = package_slave(pkg);
                                        if (!slave) {
@@ -5429,23 +5571,23 @@ static struct packet *client_create_pd(pid_t pid, int handle, const struct packe
                                                goto out;
                                        }
 
-                                       if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_open_script_cb, inst) != LB_STATUS_SUCCESS) {
+                                       if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_open_script_cb, inst) != DBOX_STATUS_ERROR_NONE) {
                                                ErrPrint("Failed to add fault callback: %s\n", pkgname);
                                        }
                                }
                        } else {
                                int tmp_ret;
-                               tmp_ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_FAULT);
+                               tmp_ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_FAULT);
                                if (tmp_ret < 0) {
                                        ErrPrint("Unable to load script: %d, (close: %d)\n", ret, tmp_ret);
                                }
                        }
                } else {
-                       ErrPrint("Unable open PD(%s): %d\n", pkgname, ret);
+                       ErrPrint("Unable open GBAR(%s): %d\n", pkgname, ret);
                }
        } else {
-               ErrPrint("Invalid PD TYPE\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ErrPrint("Invalid GBAR TYPE\n");
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -5457,7 +5599,7 @@ out:
        return result;
 }
 
-static struct packet *client_destroy_pd(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, ret */
+static struct packet *client_destroy_gbar(pid_t pid, int handle, const struct packet *packet) /* pid, pkgname, filename, ret */
 {
        struct client_node *client;
        struct packet *result;
@@ -5466,7 +5608,7 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
        int ret;
        struct inst_info *inst = NULL;
        const struct pkg_info *pkg = NULL;
-       Ecore_Timer *pd_monitor;
+       Ecore_Timer *gbar_monitor;
        struct slave_node *slave;
 
        DbgPrint("PERF_DBOX\n");
@@ -5474,41 +5616,41 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ss", &pkgname, &id);
        if (ret != 2) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
        slave = package_slave(pkg);
        if (!slave) {
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
-       if (instance_pd_owner(inst) != client) {
-               if (instance_pd_owner(inst) == NULL) {
-                       ErrPrint("PD looks already closed\n");
-                       ret = LB_STATUS_ERROR_ALREADY;
+       if (instance_gbar_owner(inst) != client) {
+               if (instance_gbar_owner(inst) == NULL) {
+                       ErrPrint("GBAR looks already closed\n");
+                       ret = DBOX_STATUS_ERROR_ALREADY;
                } else {
-                       ErrPrint("PD owner mimatched\n");
-                       ret = LB_STATUS_ERROR_PERMISSION;
+                       ErrPrint("GBAR owner mimatched\n");
+                       ret = DBOX_STATUS_ERROR_PERMISSION_DENIED;
                }
-       } else if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               DbgPrint("Buffer type PD\n");
-               pd_monitor = instance_del_data(inst, PD_OPEN_MONITOR_TAG);
-               if (pd_monitor) {
-                       ErrPrint("PD Open request is found. cancel it [%s]\n", pkgname);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               DbgPrint("Buffer type GBAR\n");
+               gbar_monitor = instance_del_data(inst, GBAR_OPEN_MONITOR_TAG);
+               if (gbar_monitor) {
+                       ErrPrint("GBAR Open request is found. cancel it [%s]\n", pkgname);
 
                        if (slave_event_callback_del(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_open_buffer_cb, inst) < 0) {
                                DbgPrint("Failed to delete a deactivate callback\n");
@@ -5522,45 +5664,45 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
                         * The client will permanently waiting destroyed event.
                         * Because they understand that the destroy request is successfully processed.
                         */
-                       ret = instance_client_pd_created(inst, LB_STATUS_ERROR_CANCEL);
+                       ret = instance_client_gbar_created(inst, DBOX_STATUS_ERROR_CANCEL);
                        if (ret < 0) {
-                               ErrPrint("PD client create event: %d\n", ret);
+                               ErrPrint("GBAR client create event: %d\n", ret);
                        }
 
-                       ret = instance_client_pd_destroyed(inst, LB_STATUS_SUCCESS);
+                       ret = instance_client_gbar_destroyed(inst, DBOX_STATUS_ERROR_NONE);
                        if (ret < 0) {
-                               ErrPrint("PD client destroy event: %d\n", ret);
+                               ErrPrint("GBAR client destroy event: %d\n", ret);
                        }
 
-                       ret = instance_signal_emit(inst, "pd,hide", instance_id(inst), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
+                       ret = instance_signal_emit(inst, "gbar,hide", instance_id(inst), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
                        if (ret < 0) {
-                               ErrPrint("PD close signal emit failed: %d\n", ret);
+                               ErrPrint("GBAR close signal emit failed: %d\n", ret);
                        }
 
-                       ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_NORMAL);
+                       ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_NORMAL);
                        if (ret < 0) {
-                               ErrPrint("PD close request failed: %d\n", ret);
+                               ErrPrint("GBAR close request failed: %d\n", ret);
                        }
 
-                       ecore_timer_del(pd_monitor);
+                       ecore_timer_del(gbar_monitor);
                        inst = instance_unref(inst);
                        if (!inst) {
                                DbgPrint("Instance is deleted\n");
                        }
-               } else if (instance_get_data(inst, LAZY_PD_CLOSE_TAG) || instance_get_data(inst, PD_CLOSE_MONITOR_TAG)) {
+               } else if (instance_get_data(inst, LAZY_GBAR_CLOSE_TAG) || instance_get_data(inst, GBAR_CLOSE_MONITOR_TAG)) {
                        DbgPrint("Close monitor is already fired\n");
-                       ret = LB_STATUS_ERROR_ALREADY;
+                       ret = DBOX_STATUS_ERROR_ALREADY;
                } else {
                        int resize_aborted = 0;
 
-                       pd_monitor = instance_del_data(inst, PD_RESIZE_MONITOR_TAG);
-                       if (pd_monitor) {
-                               ErrPrint("PD Resize request is found. clear it [%s]\n", pkgname);
+                       gbar_monitor = instance_del_data(inst, GBAR_RESIZE_MONITOR_TAG);
+                       if (gbar_monitor) {
+                               ErrPrint("GBAR Resize request is found. clear it [%s]\n", pkgname);
                                if (slave_event_callback_del(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_resize_buffer_cb, inst) < 0) {
                                        DbgPrint("Failed to delete a deactivate callback\n");
                                }
 
-                               ecore_timer_del(pd_monitor);
+                               ecore_timer_del(gbar_monitor);
 
                                inst = instance_unref(inst);
                                if (!inst) {
@@ -5571,17 +5713,17 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
                                resize_aborted = 1;
                        }
 
-                       ret = instance_signal_emit(inst, "pd,hide", instance_id(inst), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
+                       ret = instance_signal_emit(inst, "gbar,hide", instance_id(inst), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0);
                        if (ret < 0) {
-                               ErrPrint("PD close signal emit failed: %d\n", ret);
+                               ErrPrint("GBAR close signal emit failed: %d\n", ret);
                        }
 
-                       ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_NORMAL);
+                       ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_NORMAL);
                        if (ret < 0) {
-                               ErrPrint("PD close request failed: %d\n", ret);
+                               ErrPrint("GBAR close request failed: %d\n", ret);
                        } else if (resize_aborted) {
-                               pd_monitor = ecore_timer_add(DELAY_TIME, lazy_pd_destroyed_cb, instance_ref(inst));
-                               if (!pd_monitor) {
+                               gbar_monitor = ecore_timer_add(DELAY_TIME, lazy_gbar_destroyed_cb, instance_ref(inst));
+                               if (!gbar_monitor) {
                                        ErrPrint("Failed to create a timer: %s\n", pkgname);
                                        inst = instance_unref(inst);
                                        if (!inst) {
@@ -5589,22 +5731,22 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
                                        }
                                } else {
                                        DbgPrint("Resize is aborted\n");
-                                       (void)instance_set_data(inst, LAZY_PD_CLOSE_TAG, pd_monitor);
+                                       (void)instance_set_data(inst, LAZY_GBAR_CLOSE_TAG, gbar_monitor);
                                        if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_close_buffer_cb, inst) < 0) {
                                                ErrPrint("Failed to add a slave event callback\n");
                                        }
                                }
                        } else {
-                               pd_monitor = ecore_timer_add(PD_REQUEST_TIMEOUT, pd_close_monitor_cb, instance_ref(inst));
-                               if (!pd_monitor) {
+                               gbar_monitor = ecore_timer_add(DYNAMICBOX_CONF_GBAR_REQUEST_TIMEOUT, gbar_close_monitor_cb, instance_ref(inst));
+                               if (!gbar_monitor) {
                                        ErrPrint("Failed to add pd close monitor\n");
                                        inst = instance_unref(inst);
                                        if (!inst) {
-                                               ErrPrint("Instance is deleted while closing PD\n");
+                                               ErrPrint("Instance is deleted while closing GBAR\n");
                                        }
                                } else {
                                        DbgPrint("Add close monitor\n");
-                                       (void)instance_set_data(inst, PD_CLOSE_MONITOR_TAG, pd_monitor);
+                                       (void)instance_set_data(inst, GBAR_CLOSE_MONITOR_TAG, gbar_monitor);
                                        if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_close_buffer_cb, inst) < 0) {
                                                ErrPrint("Failed to add SLAVE EVENT callback\n");
                                        }
@@ -5614,22 +5756,22 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
                        /*!
                         * \note
                         * release_buffer will be called by the slave after this routine.
-                        * It will send the "pd_destroyed" event to the client
+                        * It will send the "gbar_destroyed" event to the client
                         *
-                        * instance_client_pd_destroyed(inst, LB_STATUS_SUCCESS);
+                        * instance_client_gbar_destroyed(inst, DBOX_STATUS_ERROR_NONE);
                         *
-                        * Or the "pd_close_monitor_cb" or "lazy_pd_destroyed_cb" will be called.
+                        * Or the "gbar_close_monitor_cb" or "lazy_gbar_destroyed_cb" will be called.
                         */
                }
-       } else if (package_pd_type(pkg) == PD_TYPE_SCRIPT) {
-               DbgPrint("Script TYPE PD\n");
-               pd_monitor = instance_get_data(inst, LAZY_PD_OPEN_TAG);
-               if (pd_monitor) {
-                       ecore_timer_del(pd_monitor);
-                       (void)lazy_pd_created_cb(inst);
+       } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
+               DbgPrint("Script TYPE GBAR\n");
+               gbar_monitor = instance_get_data(inst, LAZY_GBAR_OPEN_TAG);
+               if (gbar_monitor) {
+                       ecore_timer_del(gbar_monitor);
+                       (void)lazy_gbar_created_cb(inst);
                }
 
-               ret = script_handler_unload(instance_pd_script(inst), 1);
+               ret = script_handler_unload(instance_gbar_script(inst), 1);
                if (ret < 0) {
                        ErrPrint("Unable to unload the script: %s, %d\n", pkgname, ret);
                }
@@ -5639,16 +5781,16 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
                 * Send request to the slave.
                 * The SLAVE must has to repsonse this via "release_buffer" method.
                 */
-               ret = instance_slave_close_pd(inst, client, LB_CLOSE_PD_NORMAL);
+               ret = instance_slave_close_gbar(inst, client, DBOX_CLOSE_GBAR_NORMAL);
                if (ret < 0) {
-                       ErrPrint("Unable to close the PD: %s, %d\n", pkgname, ret);
+                       ErrPrint("Unable to close the GBAR: %s, %d\n", pkgname, ret);
                }
 
                /*!
                 * \note
-                * Send the destroyed PD event to the client
+                * Send the destroyed GBAR event to the client
                 */
-               if (ret == (int)LB_STATUS_SUCCESS) {
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                        /*!
                         * \note
                         * 13-05-28
@@ -5656,24 +5798,24 @@ static struct packet *client_destroy_pd(pid_t pid, int handle, const struct pack
                         * But I just add it to the tagged-data of the instance.
                         * Just reserve for future-use.
                         */
-                       DbgPrint("Add lazy PD destroy timer\n");
-                       pd_monitor = ecore_timer_add(DELAY_TIME, lazy_pd_destroyed_cb, instance_ref(inst));
-                       if (!pd_monitor) {
+                       DbgPrint("Add lazy GBAR destroy timer\n");
+                       gbar_monitor = ecore_timer_add(DELAY_TIME, lazy_gbar_destroyed_cb, instance_ref(inst));
+                       if (!gbar_monitor) {
                                ErrPrint("Failed to create a timer: %s\n", pkgname);
                                inst = instance_unref(inst);
                                if (!inst) {
                                        DbgPrint("instance is deleted\n");
                                }
                        } else {
-                               (void)instance_set_data(inst, LAZY_PD_CLOSE_TAG, pd_monitor);
+                               (void)instance_set_data(inst, LAZY_GBAR_CLOSE_TAG, gbar_monitor);
                                if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_close_script_cb, inst) < 0) {
                                        ErrPrint("Failed to add a event callback for slave\n");
                                }
                        }
                }
        } else {
-               ErrPrint("Invalid PD TYPE\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ErrPrint("Invalid GBAR TYPE\n");
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
 out:
@@ -5696,7 +5838,7 @@ static struct packet *client_activate_package(pid_t pid, int handle, const struc
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                pkgname = "";
                goto out;
        }
@@ -5704,7 +5846,7 @@ static struct packet *client_activate_package(pid_t pid, int handle, const struc
        ret = packet_get(packet, "s", &pkgname);
        if (ret != 1) {
                ErrPrint("Parameter is not matched\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                pkgname = "";
                goto out;
        }
@@ -5713,18 +5855,18 @@ static struct packet *client_activate_package(pid_t pid, int handle, const struc
 
        /*!
         * \NOTE:
-        * Validate the livebox package name.
+        * Validate the dynamicbox package name.
         */
-       if (!package_is_lb_pkgname(pkgname)) {
-               ErrPrint("%s is not a valid livebox package\n", pkgname);
+       if (!package_is_dbox_pkgname(pkgname)) {
+               ErrPrint("%s is not a valid dynamicbox package\n", pkgname);
                pkgname = "";
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        info = package_find(pkgname);
        if (!info) {
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
        } else {
                ret = package_clear_fault(info);
        }
@@ -5748,19 +5890,19 @@ static struct packet *client_subscribed(pid_t pid, int handle, const struct pack
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ss", &cluster, &category);
        if (ret != 2) {
                ErrPrint("Invalid argument\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        DbgPrint("[%d] cluster[%s] category[%s]\n", pid, cluster, category);
-       if (!strlen(cluster) || !strcasecmp(cluster, DEFAULT_CLUSTER)) {
+       if (!strlen(cluster) || !strcasecmp(cluster, DYNAMICBOX_CONF_DEFAULT_CLUSTER)) {
                ErrPrint("Invalid cluster name\n");
                goto out;
        }
@@ -5789,29 +5931,29 @@ static struct packet *client_delete_cluster(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "s", &cluster);
        if (ret != 1) {
                ErrPrint("Invalid parameters\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        DbgPrint("pid[%d] cluster[%s]\n", pid, cluster);
 
-       if (!strlen(cluster) || !strcasecmp(cluster, DEFAULT_CLUSTER)) {
+       if (!strlen(cluster) || !strcasecmp(cluster, DYNAMICBOX_CONF_DEFAULT_CLUSTER)) {
                ErrPrint("Invalid cluster: %s\n", cluster);
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        /*!
         * \todo
         */
-       ret = LB_STATUS_ERROR_NOT_IMPLEMENTED;
+       ret = DBOX_STATUS_ERROR_NOT_IMPLEMENTED;
 
 out:
        result = packet_create_reply(packet, "i", ret);
@@ -5839,7 +5981,7 @@ static inline int update_pkg_cb(struct category *category, const char *pkgname,
        slave_rpc_request_update(pkgname, "", c_name, s_name, NULL, force);
 
        /* Just try to create a new package */
-       if (util_free_space(IMAGE_PATH) > MINIMUM_SPACE) {
+       if (util_free_space(DYNAMICBOX_CONF_IMAGE_PATH) > DYNAMICBOX_CONF_MINIMUM_SPACE) {
                double timestamp;
                struct inst_info *inst;
 
@@ -5850,7 +5992,7 @@ static inline int update_pkg_cb(struct category *category, const char *pkgname,
                 * Because this callback is called by the requests of clients.
                 * It means. some clients wants to handle this instances ;)
                 */
-               inst = instance_create(NULL, timestamp, pkgname, "", c_name, s_name, DEFAULT_PERIOD, 0, 0);
+               inst = instance_create(NULL, timestamp, pkgname, "", c_name, s_name, DYNAMICBOX_CONF_DEFAULT_PERIOD, 0, 0);
                if (!inst) {
                        ErrPrint("Failed to create a new instance\n");
                }
@@ -5881,7 +6023,7 @@ static struct packet *client_update(pid_t pid, int handle, const struct packet *
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
@@ -5924,7 +6066,7 @@ static struct packet *client_refresh_group(pid_t pid, int handle, const struct p
 
        DbgPrint("[%d] cluster[%s] category[%s]\n", pid, cluster_id, category_id);
 
-       if (!strlen(cluster_id) || !strcasecmp(cluster_id, DEFAULT_CLUSTER)) {
+       if (!strlen(cluster_id) || !strcasecmp(cluster_id, DYNAMICBOX_CONF_DEFAULT_CLUSTER)) {
                ErrPrint("Invalid cluster name: %s\n", cluster_id);
                goto out;
        }
@@ -5962,28 +6104,28 @@ static struct packet *client_delete_category(pid_t pid, int handle, const struct
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ss", &cluster, &category);
        if (ret != 2) {
                ErrPrint("Invalid paramenters\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        DbgPrint("pid[%d] cluster[%s] category[%s]\n", pid, cluster, category);
-       if (!strlen(cluster) || !strcasecmp(cluster, DEFAULT_CLUSTER)) {
+       if (!strlen(cluster) || !strcasecmp(cluster, DYNAMICBOX_CONF_DEFAULT_CLUSTER)) {
                ErrPrint("Invalid cluster: %s\n", cluster);
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        /*!
         * \todo
         */
-       ret = LB_STATUS_ERROR_NOT_IMPLEMENTED;
+       ret = DBOX_STATUS_ERROR_NOT_IMPLEMENTED;
 
 out:
        result = packet_create_reply(packet, "i", ret);
@@ -6004,20 +6146,20 @@ static struct packet *client_unsubscribed(pid_t pid, int handle, const struct pa
        client = client_find_by_rpc_handle(handle);
        if (!client) {
                ErrPrint("Client %d is not exists\n", pid);
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        ret = packet_get(packet, "ss", &cluster, &category);
        if (ret != 2) {
                ErrPrint("Invalid argument\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        DbgPrint("[%d] cluster[%s] category[%s]\n", pid, cluster, category);
 
-       if (!strlen(cluster) || !strcasecmp(cluster, DEFAULT_CLUSTER)) {
+       if (!strlen(cluster) || !strcasecmp(cluster, DYNAMICBOX_CONF_DEFAULT_CLUSTER)) {
                ErrPrint("Invalid cluster name: %s\n", cluster);
                goto out;
        }
@@ -6057,7 +6199,7 @@ static struct packet *slave_hello(pid_t pid, int handle, const struct packet *pa
        }
 
        if (!slave) {
-               if (DEBUG_MODE) {
+               if (DYNAMICBOX_CONF_DEBUG_MODE || g_conf.debug_mode) {
                        char pkgname[pathconf("/", _PC_PATH_MAX)];
                        const char *abi;
 
@@ -6072,7 +6214,7 @@ static struct packet *slave_hello(pid_t pid, int handle, const struct packet *pa
                        if (!slave) {
                                abi = abi_find_by_pkgname(pkgname);
                                if (!abi) {
-                                       abi = DEFAULT_ABI;
+                                       abi = DYNAMICBOX_CONF_DEFAULT_ABI;
                                        DbgPrint("Slave pkgname is invalid, ABI is replaced with '%s'(default)\n", abi);
                                }
 
@@ -6088,7 +6230,7 @@ static struct packet *slave_hello(pid_t pid, int handle, const struct packet *pa
                                abi = slave_abi(slave);
                                if (!abi) {
                                        ErrPrint("ABI is not valid: %s\n", slavename);
-                                       abi = DEFAULT_ABI;
+                                       abi = DYNAMICBOX_CONF_DEFAULT_ABI;
                                }
                        }
 
@@ -6205,7 +6347,7 @@ out:
        return NULL;
 }
 
-static struct packet *slave_lb_update_begin(pid_t pid, int handle, const struct packet *packet)
+static struct packet *slave_dbox_update_begin(pid_t pid, int handle, const struct packet *packet)
 {
        struct slave_node *slave;
        struct inst_info *inst;
@@ -6230,7 +6372,7 @@ static struct packet *slave_lb_update_begin(pid_t pid, int handle, const struct
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
@@ -6239,9 +6381,9 @@ static struct packet *slave_lb_update_begin(pid_t pid, int handle, const struct
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = instance_lb_update_begin(inst, priority, content, title);
-               if (ret == (int)LB_STATUS_SUCCESS) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = instance_dbox_update_begin(inst, priority, content, title);
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                        slave_freeze_ttl(slave);
                }
        } else {
@@ -6252,7 +6394,7 @@ out:
        return NULL;
 }
 
-static struct packet *slave_lb_update_end(pid_t pid, int handle, const struct packet *packet)
+static struct packet *slave_dbox_update_end(pid_t pid, int handle, const struct packet *packet)
 {
        struct slave_node *slave;
        struct inst_info *inst;
@@ -6274,7 +6416,7 @@ static struct packet *slave_lb_update_end(pid_t pid, int handle, const struct pa
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
@@ -6283,9 +6425,9 @@ static struct packet *slave_lb_update_end(pid_t pid, int handle, const struct pa
                goto out;
        }
 
-       if (package_lb_type(pkg) == LB_TYPE_BUFFER) {
-               ret = instance_lb_update_end(inst);
-               if (ret == (int)LB_STATUS_SUCCESS) {
+       if (package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               ret = instance_dbox_update_end(inst);
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                        slave_thaw_ttl(slave);
                }
        } else {
@@ -6296,7 +6438,7 @@ out:
        return NULL;
 }
 
-static struct packet *slave_pd_update_begin(pid_t pid, int handle, const struct packet *packet)
+static struct packet *slave_gbar_update_begin(pid_t pid, int handle, const struct packet *packet)
 {
        struct slave_node *slave;
        const struct pkg_info *pkg;
@@ -6318,7 +6460,7 @@ static struct packet *slave_pd_update_begin(pid_t pid, int handle, const struct
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
@@ -6327,8 +6469,8 @@ static struct packet *slave_pd_update_begin(pid_t pid, int handle, const struct
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               (void)instance_pd_update_begin(inst);
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               (void)instance_gbar_update_begin(inst);
        } else {
                ErrPrint("Invalid request[%s]\n", id);
        }
@@ -6359,7 +6501,7 @@ static struct packet *slave_key_status(pid_t pid, int handle, const struct packe
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                if (instance_state(inst) == INST_DESTROYED) {
                        ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
                } else {
@@ -6393,7 +6535,7 @@ static struct packet *slave_access_status(pid_t pid, int handle, const struct pa
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                if (instance_state(inst) == INST_DESTROYED) {
                        ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
                } else {
@@ -6405,7 +6547,7 @@ out:
        return NULL;
 }
 
-static struct packet *slave_close_pd(pid_t pid, int handle, const struct packet *packet)
+static struct packet *slave_close_gbar(pid_t pid, int handle, const struct packet *packet)
 {
        struct slave_node *slave;
        struct inst_info *inst;
@@ -6427,7 +6569,7 @@ static struct packet *slave_close_pd(pid_t pid, int handle, const struct packet
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                if (instance_state(inst) == INST_DESTROYED) {
                        ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
                } else {
@@ -6439,7 +6581,7 @@ out:
        return NULL;
 }
 
-static struct packet *slave_pd_update_end(pid_t pid, int handle, const struct packet *packet)
+static struct packet *slave_gbar_update_end(pid_t pid, int handle, const struct packet *packet)
 {
        struct slave_node *slave;
        const struct pkg_info *pkg;
@@ -6461,7 +6603,7 @@ static struct packet *slave_pd_update_end(pid_t pid, int handle, const struct pa
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
@@ -6470,8 +6612,8 @@ static struct packet *slave_pd_update_end(pid_t pid, int handle, const struct pa
                goto out;
        }
 
-       if (package_pd_type(pkg) == PD_TYPE_BUFFER) {
-               (void)instance_pd_update_end(inst);
+       if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               (void)instance_gbar_update_end(inst);
        } else {
                ErrPrint("Invalid request[%s]\n", id);
        }
@@ -6560,13 +6702,13 @@ static struct packet *slave_extra_info(pid_t pid, int handle, const struct packe
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                if (instance_state(inst) == INST_DESTROYED) {
                        ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
                        goto out;
                }
 
-               instance_set_lb_info(inst, priority, content_info, title);
+               instance_set_dbox_info(inst, priority, content_info, title);
                instance_set_alt_info(inst, icon, name);
                instance_extra_info_updated_by_instance(inst);
                slave_give_more_ttl(slave);
@@ -6584,6 +6726,8 @@ static struct packet *slave_updated(pid_t pid, int handle, const struct packet *
        const char *id;
        int w;
        int h;
+       int x;
+       int y;
        int ret;
        struct inst_info *inst;
 
@@ -6593,22 +6737,22 @@ static struct packet *slave_updated(pid_t pid, int handle, const struct packet *
                goto out;
        }
 
-       ret = packet_get(packet, "sssii", &pkgname, &id, &safe_filename, &w, &h);
-       if (ret != 5) {
+       ret = packet_get(packet, "sssiiii", &pkgname, &id, &safe_filename, &x, &y, &w, &h);
+       if (ret != 7) {
                ErrPrint("Parameter is not matched\n");
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                if (instance_state(inst) == INST_DESTROYED) {
                        ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
                        goto out;
                }
 
-               switch (package_lb_type(instance_package(inst))) {
-               case LB_TYPE_SCRIPT:
-                       script_handler_resize(instance_lb_script(inst), w, h);
+               switch (package_dbox_type(instance_package(inst))) {
+               case DBOX_TYPE_SCRIPT:
+                       script_handler_resize(instance_dbox_script(inst), w, h);
                        if (safe_filename) {
                                (void)script_handler_parse_desc(inst, safe_filename, 0);
                        } else {
@@ -6620,14 +6764,13 @@ static struct packet *slave_updated(pid_t pid, int handle, const struct packet *
                                ErrPrint("unlink: %s - %s\n", strerror(errno), safe_filename);
                        }
                        break;
-               case LB_TYPE_BUFFER:
+               case DBOX_TYPE_BUFFER:
                default:
                        /*!
                         * \check
                         * text format (inst)
                         */
-                       instance_set_lb_size(inst, w, h);
-                       instance_lb_updated_by_instance(inst, safe_filename);
+                       instance_dbox_updated_by_instance(inst, safe_filename, x, y, w, h);
                        break;
                }
 
@@ -6660,7 +6803,7 @@ static struct packet *slave_hold_scroll(pid_t pid, int handle, const struct pack
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                if (instance_state(inst) == INST_DESTROYED) {
                        ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
                } else {
@@ -6672,12 +6815,57 @@ out:
        return NULL;
 }
 
+static struct packet *slave_extra_updated(pid_t pid, int handle, const struct packet *packet)
+{
+       struct slave_node *slave;
+       const char *pkgname;
+       const char *id;
+       int idx;
+       int x;
+       int y;
+       int w;
+       int h;
+       int ret;
+       int is_gbar;
+       struct inst_info *inst;
+
+       slave = slave_find_by_pid(pid);
+       if (!slave) {
+               ErrPrint("Slave %d is not exists\n", pid);
+               goto out;
+       }
+
+       ret = packet_get(packet, "ssiiiiii", &pkgname, &id, &is_gbar, &idx, &x, &y, &w, &h);
+       if (ret != 8) {
+               ErrPrint("Parameter is not matched\n");
+               goto out;
+       }
+
+       ret = validate_request(pkgname, id, &inst, NULL);
+       if (ret != DBOX_STATUS_ERROR_NONE) {
+               goto out;
+       }
+
+       if (instance_state(inst) == INST_DESTROYED) {
+               ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+               goto out;
+       }
+
+       (void)instance_extra_updated_by_instance(inst, is_gbar, idx, x, y, w, h);
+out:
+       return NULL;
+}
+
 static struct packet *slave_desc_updated(pid_t pid, int handle, const struct packet *packet) /* slave_name, pkgname, filename, decsfile, ret */
 {
        struct slave_node *slave;
        const char *pkgname;
        const char *id;
        const char *descfile;
+       int x;
+       int y;
+       int w;
+       int h;
        int ret;
        struct inst_info *inst;
 
@@ -6687,14 +6875,14 @@ static struct packet *slave_desc_updated(pid_t pid, int handle, const struct pac
                goto out;
        }
 
-       ret = packet_get(packet, "sss", &pkgname, &id, &descfile);
-       if (ret != 3) {
+       ret = packet_get(packet, "sssiiii", &pkgname, &id, &descfile, &x, &y, &w, &h);
+       if (ret != 7) {
                ErrPrint("Parameter is not matched\n");
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
@@ -6703,17 +6891,17 @@ static struct packet *slave_desc_updated(pid_t pid, int handle, const struct pac
                goto out;
        }
 
-       switch (package_pd_type(instance_package(inst))) {
-       case PD_TYPE_SCRIPT:
+       switch (package_gbar_type(instance_package(inst))) {
+       case GBAR_TYPE_SCRIPT:
                DbgPrint("%s updated (%s)\n", instance_id(inst), descfile);
-               if (script_handler_is_loaded(instance_pd_script(inst))) {
+               if (script_handler_is_loaded(instance_gbar_script(inst))) {
                        (void)script_handler_parse_desc(inst, descfile, 1);
                }
                break;
-       case PD_TYPE_TEXT:
-               instance_set_pd_size(inst, 0, 0);
-       case PD_TYPE_BUFFER:
-               instance_pd_updated(pkgname, id, descfile);
+       case GBAR_TYPE_TEXT:
+               instance_set_gbar_size(inst, 0, 0);
+       case GBAR_TYPE_BUFFER:
+               instance_gbar_updated(pkgname, id, descfile, x, y, w, h);
                break;
        default:
                DbgPrint("Ignore updated DESC(%s)\n", pkgname);
@@ -6745,8 +6933,8 @@ static struct packet *slave_deleted(pid_t pid, int handle, const struct packet *
        }
 
        ret = validate_request(pkgname, id, &inst, NULL);
-       if (ret == (int)LB_STATUS_SUCCESS) {
-               ret = instance_destroyed(inst, LB_STATUS_SUCCESS);
+       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
+               ret = instance_destroyed(inst, DBOX_STATUS_ERROR_NONE);
        }
 
 out:
@@ -6774,7 +6962,7 @@ static struct packet *slave_acquire_buffer(pid_t pid, int handle, const struct p
        if (!slave) {
                ErrPrint("Failed to find a slave\n");
                id = "";
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
@@ -6782,38 +6970,38 @@ static struct packet *slave_acquire_buffer(pid_t pid, int handle, const struct p
        if (ret != 6) {
                ErrPrint("Invalid argument\n");
                id = "";
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
        id = "";
 
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       ret = LB_STATUS_ERROR_INVALID;
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
 
        if (instance_state(inst) == INST_DESTROYED) {
                ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
                goto out;
        }
 
-       if (target == TYPE_LB && package_lb_type(pkg) == LB_TYPE_BUFFER) {
+       if (target == TYPE_DBOX && package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
                struct buffer_info *info;
 
-               info = instance_lb_buffer(inst);
+               info = instance_dbox_buffer(inst);
                if (!info) {
-                       if (!instance_create_lb_buffer(inst, pixel_size)) {
-                               ErrPrint("Failed to create a LB buffer\n");
-                               ret = LB_STATUS_ERROR_FAULT;
+                       if (!instance_create_dbox_buffer(inst, pixel_size)) {
+                               ErrPrint("Failed to create a DBOX buffer\n");
+                               ret = DBOX_STATUS_ERROR_FAULT;
                                goto out;
                        }
 
-                       info = instance_lb_buffer(inst);
+                       info = instance_dbox_buffer(inst);
                        if (!info) {
-                               ErrPrint("LB buffer is not valid\n");
+                               ErrPrint("DBOX buffer is not valid\n");
                                /*!
                                 * \NOTE
                                 * ret value should not be changed.
@@ -6825,22 +7013,22 @@ static struct packet *slave_acquire_buffer(pid_t pid, int handle, const struct p
                ret = buffer_handler_resize(info, w, h);
                ret = buffer_handler_load(info);
                if (ret == 0) {
-                       instance_set_lb_size(inst, w, h);
-                       instance_set_lb_info(inst, PRIORITY_NO_CHANGE, CONTENT_NO_CHANGE, TITLE_NO_CHANGE);
+                       instance_set_dbox_size(inst, w, h);
+                       instance_set_dbox_info(inst, DYNAMICBOX_CONF_PRIORITY_NO_CHANGE, DYNAMICBOX_CONF_CONTENT_NO_CHANGE, DYNAMICBOX_CONF_TITLE_NO_CHANGE);
                        id = buffer_handler_id(info);
                } else {
                        ErrPrint("Failed to load a buffer(%d)\n", ret);
                }
-       } else if (target == TYPE_PD && package_pd_type(pkg) == PD_TYPE_BUFFER) {
+       } else if (target == TYPE_GBAR && package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
                struct buffer_info *info;
-               Ecore_Timer *pd_monitor;
+               Ecore_Timer *gbar_monitor;
                int is_resize;
 
                is_resize = 0;
-               pd_monitor = instance_del_data(inst, PD_OPEN_MONITOR_TAG);
-               if (!pd_monitor) {
-                       pd_monitor = instance_del_data(inst, PD_RESIZE_MONITOR_TAG);
-                       is_resize = !!pd_monitor;
+               gbar_monitor = instance_del_data(inst, GBAR_OPEN_MONITOR_TAG);
+               if (!gbar_monitor) {
+                       gbar_monitor = instance_del_data(inst, GBAR_RESIZE_MONITOR_TAG);
+                       is_resize = !!gbar_monitor;
                        if (!is_resize) {
                                /* Invalid request. Reject this */
                                ErrPrint("Invalid request\n");
@@ -6852,30 +7040,30 @@ static struct packet *slave_acquire_buffer(pid_t pid, int handle, const struct p
                        slave_event_callback_del(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_open_buffer_cb, inst);
                }
 
-               ecore_timer_del(pd_monitor);
+               ecore_timer_del(gbar_monitor);
                inst = instance_unref(inst);
                if (!inst) {
                        ErrPrint("Instance refcnt is ZERO: %s\n", pkgname);
                        goto out;
                }
 
-               info = instance_pd_buffer(inst);
+               info = instance_gbar_buffer(inst);
                if (!info) {
-                       if (!instance_create_pd_buffer(inst, pixel_size)) {
-                               ErrPrint("Failed to create a PD buffer\n");
-                               ret = LB_STATUS_ERROR_FAULT;
-                               instance_client_pd_created(inst, ret);
+                       if (!instance_create_gbar_buffer(inst, pixel_size)) {
+                               ErrPrint("Failed to create a GBAR buffer\n");
+                               ret = DBOX_STATUS_ERROR_FAULT;
+                               instance_client_gbar_created(inst, ret);
                                goto out;
                        }
 
-                       info = instance_pd_buffer(inst);
+                       info = instance_gbar_buffer(inst);
                        if (!info) {
-                               ErrPrint("PD buffer is not valid\n");
+                               ErrPrint("GBAR buffer is not valid\n");
                                /*!
                                 * \NOTE
                                 * ret value should not be changed.
                                 */
-                               instance_client_pd_created(inst, ret);
+                               instance_client_gbar_created(inst, ret);
                                goto out;
                        }
                }
@@ -6883,24 +7071,151 @@ static struct packet *slave_acquire_buffer(pid_t pid, int handle, const struct p
                ret = buffer_handler_resize(info, w, h);
                ret = buffer_handler_load(info);
                if (ret == 0) {
-                       instance_set_pd_size(inst, w, h);
+                       instance_set_gbar_size(inst, w, h);
                        id = buffer_handler_id(info);
                } else {
                        ErrPrint("Failed to load a buffer (%d)\n", ret);
                }
 
                /*!
-                * Send the PD created event to the client
+                * Send the GBAR created event to the client
                 */
                if (!is_resize) {
-                       instance_client_pd_created(inst, ret);
+                       instance_client_gbar_created(inst, ret);
                }
        }
 
 out:
        result = packet_create_reply(packet, "is", ret, id);
        if (!result) {
-               ErrPrint("Failed to create a packet\n");
+               ErrPrint("Failed to create a reply packet\n");
+       }
+
+       return result;
+}
+
+static struct packet *slave_acquire_extra_buffer(pid_t pid, int handle, const struct packet *packet)
+{
+       struct slave_node *slave;
+       struct inst_info *inst;
+       struct packet *result;
+       const struct pkg_info *pkg;
+       const char *pkgname;
+       const char *id;
+       int pixel_size;
+       int target;
+       int idx;
+       int ret;
+       int w;
+       int h;
+
+       slave = slave_find_by_pid(pid);
+       if (!slave) {
+               ErrPrint("Slave %d is not exists\n", pid);
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
+               id = "";
+               goto out;
+       }
+
+       ret = packet_get(packet, "issiiii", &target, &pkgname, &id, &w, &h, &pixel_size, &idx);
+       if (ret != 7) {
+               ErrPrint("Invalid parameters\n");
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               id = "";
+               goto out;
+       }
+
+       ret = validate_request(pkgname, id, &inst, &pkg);
+       id = "";
+
+       if (ret != DBOX_STATUS_ERROR_NONE) {
+               goto out;
+       }
+
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+
+       if (instance_state(inst) == INST_DESTROYED) {
+               ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
+               goto out;
+       }
+
+       if (target == TYPE_DBOX && package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               struct buffer_info *info;
+
+               info = instance_dbox_extra_buffer(inst, idx);
+               if (!info) {
+                       if (!instance_create_dbox_extra_buffer(inst, pixel_size, idx)) {
+                               ErrPrint("Failed to create a DBOX buffer\n");
+                               ret = DBOX_STATUS_ERROR_FAULT;
+                               goto out;
+                       }
+
+                       info = instance_dbox_extra_buffer(inst, idx);
+                       if (!info) {
+                               ErrPrint("DBOX extra buffer is not valid\n");
+                               /*!
+                                * \NOTE
+                                * ret value should not be changed.
+                                */
+                               goto out;
+                       }
+               }
+
+               ret = buffer_handler_resize(info, w, h);
+               ret = buffer_handler_load(info);
+               if (ret == 0) {
+                       /**
+                        * @todo
+                        * Send the extra buffer info to the viewer.
+                        * Then the viewer will try to acquire extra pixmap(aka, resource id) information
+                        */
+                       id = buffer_handler_id(info);
+                       DbgPrint("Extra buffer is loaded: %s\n", id);
+                       (void)instance_client_dbox_extra_buffer_created(inst, idx);
+               } else {
+                       ErrPrint("Failed to load a buffer(%d)\n", ret);
+               }
+       } else if (target == TYPE_GBAR && package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               struct buffer_info *info;
+
+               info = instance_gbar_extra_buffer(inst, idx);
+               if (!info) {
+                       if (!instance_create_gbar_extra_buffer(inst, pixel_size, idx)) {
+                               ErrPrint("Failed to create a GBAR buffer\n");
+                               ret = DBOX_STATUS_ERROR_FAULT;
+                               goto out;
+                       }
+
+                       info = instance_gbar_extra_buffer(inst, idx);
+                       if (!info) {
+                               ErrPrint("GBAR buffer is not valid\n");
+                               /*!
+                                * \NOTE
+                                * ret value should not be changed.
+                                */
+                               goto out;
+                       }
+               }
+
+               ret = buffer_handler_resize(info, w, h);
+               ret = buffer_handler_load(info);
+               if (ret == 0) {
+                       id = buffer_handler_id(info);
+                       /**
+                        * @todo
+                        * Send the extra buffer acquired event to the viewer
+                        */
+                       DbgPrint("Extra buffer is loaded: %s\n", id);
+                       (void)instance_client_gbar_extra_buffer_created(inst, idx);
+               } else {
+                       ErrPrint("Failed to load a buffer (%d)\n", ret);
+               }
+       }
+
+out:
+       result = packet_create_reply(packet, "is", ret, id);
+       if (!result) {
+               ErrPrint("Failed to create a reply packet\n");
        }
 
        return result;
@@ -6922,7 +7237,7 @@ static struct packet *slave_resize_buffer(pid_t pid, int handle, const struct pa
        slave = slave_find_by_pid(pid);
        if (!slave) {
                ErrPrint("Failed to find a slave\n");
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                id = "";
                goto out;
        }
@@ -6930,18 +7245,19 @@ static struct packet *slave_resize_buffer(pid_t pid, int handle, const struct pa
        ret = packet_get(packet, "issii", &type, &pkgname, &id, &w, &h);
        if (ret != 5) {
                ErrPrint("Invalid argument\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                id = "";
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
        id = "";
-       if (ret != LB_STATUS_SUCCESS) {
+
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       ret = LB_STATUS_ERROR_INVALID;
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
        /*!
         * \note
         * Reset "id", It will be re-used from here
@@ -6952,10 +7268,10 @@ static struct packet *slave_resize_buffer(pid_t pid, int handle, const struct pa
                goto out;
        }
 
-       if (type == TYPE_LB && package_lb_type(pkg) == LB_TYPE_BUFFER) {
+       if (type == TYPE_DBOX && package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
                struct buffer_info *info;
 
-               info = instance_lb_buffer(inst);
+               info = instance_dbox_buffer(inst);
                if (!info) {
                        goto out;
                }
@@ -6965,15 +7281,15 @@ static struct packet *slave_resize_buffer(pid_t pid, int handle, const struct pa
                 * \note
                 * id is resued for newly assigned ID
                 */
-               if (ret == (int)LB_STATUS_SUCCESS) {
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                        id = buffer_handler_id(info);
-                       instance_set_lb_size(inst, w, h);
-                       instance_set_lb_info(inst, PRIORITY_NO_CHANGE, CONTENT_NO_CHANGE, TITLE_NO_CHANGE);
+                       instance_set_dbox_size(inst, w, h);
+                       instance_set_dbox_info(inst, DYNAMICBOX_CONF_PRIORITY_NO_CHANGE, DYNAMICBOX_CONF_CONTENT_NO_CHANGE, DYNAMICBOX_CONF_TITLE_NO_CHANGE);
                }
-       } else if (type == TYPE_PD && package_pd_type(pkg) == PD_TYPE_BUFFER) {
+       } else if (type == TYPE_GBAR && package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
                struct buffer_info *info;
 
-               info = instance_pd_buffer(inst);
+               info = instance_gbar_buffer(inst);
                if (!info) {
                        goto out;
                }
@@ -6983,9 +7299,9 @@ static struct packet *slave_resize_buffer(pid_t pid, int handle, const struct pa
                 * \note
                 * id is resued for newly assigned ID
                 */
-               if (ret == (int)LB_STATUS_SUCCESS) {
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                        id = buffer_handler_id(info);
-                       instance_set_pd_size(inst, w, h);
+                       instance_set_gbar_size(inst, w, h);
                }
        }
 
@@ -7012,108 +7328,108 @@ static struct packet *slave_release_buffer(pid_t pid, int handle, const struct p
        slave = slave_find_by_pid(pid);
        if (!slave) {
                ErrPrint("Failed to find a slave\n");
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                goto out;
        }
 
        if (packet_get(packet, "iss", &type, &pkgname, &id) != 3) {
                ErrPrint("Inavlid argument\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        ret = validate_request(pkgname, id, &inst, &pkg);
-       if (ret != LB_STATUS_SUCCESS) {
+       if (ret != DBOX_STATUS_ERROR_NONE) {
                goto out;
        }
 
-       ret = LB_STATUS_ERROR_INVALID;
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
 
-       if (type == TYPE_LB && package_lb_type(pkg) == LB_TYPE_BUFFER) {
+       if (type == TYPE_DBOX && package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
                struct buffer_info *info;
 
-               info = instance_lb_buffer(inst);
+               info = instance_dbox_buffer(inst);
                ret = buffer_handler_unload(info);
-       } else if (type == TYPE_PD && package_pd_type(pkg) == PD_TYPE_BUFFER) {
+       } else if (type == TYPE_GBAR && package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
                struct buffer_info *info;
-               Ecore_Timer *pd_monitor;
+               Ecore_Timer *gbar_monitor;
 
-               pd_monitor = instance_del_data(inst, PD_CLOSE_MONITOR_TAG);
-               if (!pd_monitor && !package_is_fault(pkg)) {
+               gbar_monitor = instance_del_data(inst, GBAR_CLOSE_MONITOR_TAG);
+               if (!gbar_monitor && !package_is_fault(pkg)) {
                        ErrPrint("Slave requests to release a buffer\n");
-                       /*!
-                        * \note
+                       /**
+                        * @note
                         * In this case just keep going to release buffer,
-                        * Even if a user(client) doesn't wants to destroy the PD.
+                        * Even if a user(client) doesn't wants to destroy the GBAR.
                         *
-                        * If the slave tries to destroy PD buffer, it should be
+                        * If the slave tries to destroy GBAR buffer, it should be
                         * released and reported to the client about its status.
                         *
                         * Even if the pd is destroyed by timeout handler,
-                        * instance_client_pd_destroyed function will be ignored
+                        * instance_client_gbar_destroyed function will be ignored
                         * by pd.need_to_send_close_event flag.
-                        * which will be checked by instance_client_pd_destroyed function.
+                        * which will be checked by instance_client_gbar_destroyed function.
                         */
 
-                       /*!
-                        * \note
+                       /**
+                        * @note
                         * provider can try to resize the buffer size.
                         * in that case, it will release the buffer first.
-                        * Then even though the client doesn't request to close the PD,
+                        * Then even though the client doesn't request to close the GBAR,
                         * the provider can release it.
                         * If we send the close event to the client,
-                        * The client will not able to allocate PD again.
+                        * The client will not able to allocate GBAR again.
                         * In this case, add the pd,monitor again. from here.
                         * to wait the re-allocate buffer.
                         * If the client doesn't request buffer reallocation,
-                        * Treat it as a fault. and close the PD.
+                        * Treat it as a fault. and close the GBAR.
                         */
-                       info = instance_pd_buffer(inst);
+                       info = instance_gbar_buffer(inst);
                        ret = buffer_handler_unload(info);
 
-                       if (ret == (int)LB_STATUS_SUCCESS) {
-                               pd_monitor = ecore_timer_add(PD_REQUEST_TIMEOUT, pd_resize_monitor_cb, instance_ref(inst));
-                               if (!pd_monitor) {
-                                       ErrPrint("Failed to create a timer for PD Open monitor\n");
+                       if (ret == (int)DBOX_STATUS_ERROR_NONE) {
+                               gbar_monitor = ecore_timer_add(DYNAMICBOX_CONF_GBAR_REQUEST_TIMEOUT, gbar_resize_monitor_cb, instance_ref(inst));
+                               if (!gbar_monitor) {
+                                       ErrPrint("Failed to create a timer for GBAR Open monitor\n");
                                        inst = instance_unref(inst);
                                        if (!inst) {
                                                DbgPrint("Instance is deleted\n");
                                        }
                                } else {
-                                       (void)instance_set_data(inst, PD_RESIZE_MONITOR_TAG, pd_monitor);
-                                       if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_resize_buffer_cb, inst) != LB_STATUS_SUCCESS) {
+                                       (void)instance_set_data(inst, GBAR_RESIZE_MONITOR_TAG, gbar_monitor);
+                                       if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_resize_buffer_cb, inst) != DBOX_STATUS_ERROR_NONE) {
                                                ErrPrint("Failed to add event handler: %s\n", pkgname);
                                        }
                                }
                        }
                } else {
-                       if (pd_monitor) {
-                               /*!
-                                * \note
-                                * If the instance has pd_monitor, the pd close requested from client via client_destroy_pd.
+                       if (gbar_monitor) {
+                               /**
+                                * @note
+                                * If the instance has gbar_monitor, the pd close requested from client via client_destroy_gbar.
                                 */
                                slave_event_callback_del(slave, SLAVE_EVENT_DEACTIVATE, slave_fault_close_buffer_cb, inst);
-                               ecore_timer_del(pd_monitor);
+                               ecore_timer_del(gbar_monitor);
 
                                inst = instance_unref(inst);
                                if (!inst) {
                                        ErrPrint("Instance is released: %s\n", pkgname);
-                                       ret = LB_STATUS_ERROR_FAULT;
+                                       ret = DBOX_STATUS_ERROR_FAULT;
                                        goto out;
                                }
                        } /* else {
-                               \note
+                               @note
                                This case means that the package is faulted so the service provider tries to release the buffer
                        */
 
-                       info = instance_pd_buffer(inst);
+                       info = instance_gbar_buffer(inst);
                        ret = buffer_handler_unload(info);
 
-                       /*!
-                        * \note
-                        * Send the PD destroyed event to the client
+                       /**
+                        * @note
+                        * Send the GBAR destroyed event to the client
                         */
-                       instance_client_pd_destroyed(inst, ret);
+                       instance_client_gbar_destroyed(inst, ret);
                }
        }
 
@@ -7126,6 +7442,60 @@ out:
        return result;
 }
 
+static struct packet *slave_release_extra_buffer(pid_t pid, int handle, const struct packet *packet)
+{
+       struct slave_node *slave;
+       struct packet *result;
+       const char *id;
+       struct buffer_info *info = NULL;
+       int ret;
+       int idx;
+       int type;
+       const char *pkgname;
+       struct inst_info *inst;
+       const struct pkg_info *pkg;
+
+       slave = slave_find_by_pid(pid);
+       if (!slave) {
+               ErrPrint("Slave %d is not exists\n", pid);
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
+               goto out;
+       }
+
+       if (packet_get(packet, "issi", &type, &pkgname, &id, &idx) != 4) {
+               ErrPrint("Inavlid argument\n");
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+               goto out;
+       }
+
+       ret = validate_request(pkgname, id, &inst, &pkg);
+       if (ret != DBOX_STATUS_ERROR_NONE) {
+               goto out;
+       }
+
+       ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
+
+       if (type == TYPE_DBOX && package_dbox_type(pkg) == DBOX_TYPE_BUFFER) {
+               info = instance_dbox_extra_buffer(inst, idx);
+               (void)instance_client_dbox_extra_buffer_destroyed(inst, idx);
+       } else if (type == TYPE_GBAR && package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
+               info = instance_gbar_extra_buffer(inst, idx);
+               (void)instance_client_gbar_extra_buffer_destroyed(inst, idx);
+       }
+
+       if (info) {
+               ret = buffer_handler_unload(info);
+       }
+
+out:
+       result = packet_create_reply(packet, "i", ret);
+       if (!result) {
+               ErrPrint("Failed to create a reply packet\n");
+       }
+
+       return result;
+}
+
 static struct packet *service_instance_count(pid_t pid, int handle, const struct packet *packet)
 {
        struct packet *result;
@@ -7144,7 +7514,7 @@ static struct packet *service_instance_count(pid_t pid, int handle, const struct
        ret = packet_get(packet, "sssd", &pkgname, &cluster, &category, &timestamp);
        if (ret != 4) {
                ErrPrint("Invalid packet\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -7197,7 +7567,7 @@ static struct packet *service_change_period(pid_t pid, int handle, const struct
        ret = packet_get(packet, "ssd", &pkgname, &id, &period);
        if (ret != 3) {
                ErrPrint("Invalid packet\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -7206,9 +7576,9 @@ static struct packet *service_change_period(pid_t pid, int handle, const struct
 
                pkg = package_find(pkgname);
                if (!pkg) {
-                       ret = LB_STATUS_ERROR_NOT_EXIST;
+                       ret = DBOX_STATUS_ERROR_NOT_EXIST;
                } else if (package_is_fault(pkg)) {
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                } else {
                        Eina_List *inst_list;
                        Eina_List *l;
@@ -7223,10 +7593,10 @@ static struct packet *service_change_period(pid_t pid, int handle, const struct
                }
        } else {
                ret = validate_request(pkgname, id, &inst, NULL);
-               if (ret == (int)LB_STATUS_SUCCESS) {
+               if (ret == (int)DBOX_STATUS_ERROR_NONE) {
                        if (instance_state(inst) == INST_DESTROYED) {
                                ErrPrint("Package[%s] instance is already destroyed\n", pkgname);
-                               ret = LB_STATUS_ERROR_INVALID;
+                               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                                goto out;
                        }
 
@@ -7261,33 +7631,33 @@ static struct packet *service_update(pid_t pid, int handle, const struct packet
        ret = packet_get(packet, "sssssi", &pkgname, &id, &cluster, &category, &content, &force);
        if (ret != 6) {
                ErrPrint("Invalid Packet\n");
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
-       lbid = package_lb_pkgname(pkgname);
+       lbid = package_dbox_pkgname(pkgname);
        if (!lbid) {
                ErrPrint("Invalid package %s\n", pkgname);
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
        pkg = package_find(lbid);
        if (!pkg) {
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                DbgFree(lbid);
                goto out;
        }
 
        if (package_is_fault(pkg)) {
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                DbgFree(lbid);
                goto out;
        }
 
        inst_list = package_instance_list(pkg);
        if (!eina_list_count(inst_list)) {
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                DbgFree(lbid);
                goto out;
        }
@@ -7296,15 +7666,15 @@ static struct packet *service_update(pid_t pid, int handle, const struct packet
                Eina_List *l;
                struct inst_info *inst;
 
-               ret = LB_STATUS_ERROR_NOT_EXIST;
+               ret = DBOX_STATUS_ERROR_NOT_EXIST;
                EINA_LIST_FOREACH(inst_list, l, inst) {
                        if (!strcmp(instance_id(inst), id)) {
-                               ret = LB_STATUS_SUCCESS;
+                               ret = DBOX_STATUS_ERROR_NONE;
                                break;
                        }
                }
 
-               if (ret == (int)LB_STATUS_ERROR_NOT_EXIST) {
+               if (ret == (int)DBOX_STATUS_ERROR_NOT_EXIST) {
                        DbgFree(lbid);
                        goto out;
                }
@@ -7316,7 +7686,7 @@ static struct packet *service_update(pid_t pid, int handle, const struct packet
         */
        slave_rpc_request_update(lbid, id, cluster, category, content, force);
        DbgFree(lbid);
-       ret = LB_STATUS_SUCCESS;
+       ret = DBOX_STATUS_ERROR_NONE;
 
 out:
        result = packet_create_reply(packet, "i", ret);
@@ -7340,7 +7710,7 @@ static struct packet *liveinfo_hello(pid_t pid, int handle, const struct packet
        if (packet_get(packet, "d", &timestamp) != 1) {
                ErrPrint("Invalid packet\n");
                fifo_name = "";
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -7348,7 +7718,7 @@ static struct packet *liveinfo_hello(pid_t pid, int handle, const struct packet
        if (!info) {
                ErrPrint("Failed to create a liveinfo object\n");
                fifo_name = "";
-               ret = LB_STATUS_ERROR_INVALID;
+               ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
                goto out;
        }
 
@@ -7422,14 +7792,14 @@ out:
        return NULL;
 }
 
-static inline const char *visible_state_string(enum livebox_visible_state state)
+static inline const char *visible_state_string(enum dynamicbox_visible_state state)
 {
        switch (state) {
-       case LB_SHOW:
+       case DBOX_SHOW:
                return "Show";
-       case LB_HIDE:
+       case DBOX_HIDE:
                return "Hide";
-       case LB_HIDE_WITH_PAUSE:
+       case DBOX_HIDE_WITH_PAUSE:
                return "Paused";
        default:
                break;
@@ -7461,7 +7831,7 @@ static Eina_Bool inst_list_cb(void *info)
                return ECORE_CALLBACK_CANCEL;
        }
 
-       if (!package_is_lb_pkgname(pkgname)) {
+       if (!package_is_dbox_pkgname(pkgname)) {
                ErrPrint("Invalid package name\n");
                free(pkgname);
                goto close_out;
@@ -7478,13 +7848,13 @@ static Eina_Bool inst_list_cb(void *info)
        EINA_LIST_FOREACH(inst_list, l, inst) {
                fprintf(fp, "%s %s %s %s %lf %s %d %d\n",
                        instance_id(inst),
-                       buffer_handler_id(instance_lb_buffer(inst)),
+                       buffer_handler_id(instance_dbox_buffer(inst)),
                        instance_cluster(inst),
                        instance_category(inst),
                        instance_period(inst),
                        visible_state_string(instance_visible_state(inst)),
-                       instance_lb_width(inst),
-                       instance_lb_height(inst));
+                       instance_dbox_width(inst),
+                       instance_dbox_height(inst));
        }
 
 close_out:
@@ -7686,7 +8056,7 @@ static struct packet *liveinfo_pkg_ctrl(pid_t pid, int handle, const struct pack
                if (!inst) {
                        liveinfo_set_data(info, (void *)ENOENT);
                } else {
-                       (void)instance_destroy(inst, INSTANCE_DESTROY_DEFAULT);
+                       (void)instance_destroy(inst, DBOX_DESTROY_TYPE_DEFAULT);
                        liveinfo_set_data(info, (void *)0);
                }
 
@@ -7737,7 +8107,7 @@ static struct packet *liveinfo_master_ctrl(pid_t pid, int handle, const struct p
        char *cmd;
        char *var;
        char *val;
-       int ret = LB_STATUS_ERROR_INVALID;
+       int ret = DBOX_STATUS_ERROR_INVALID_PARAMETER;
 
        if (packet_get(packet, "sss", &cmd, &var, &val) != 3) {
                ErrPrint("Invalid argument\n");
@@ -7773,31 +8143,31 @@ out:
 
 static struct method s_info_table[] = {
        {
-               .cmd = "liveinfo_hello",
+               .cmd = CMD_STR_INFO_HELLO,
                .handler = liveinfo_hello,
        },
        {
-               .cmd = "slave_list",
+               .cmd = CMD_STR_INFO_SLAVE_LIST,
                .handler = liveinfo_slave_list,
        },
        {
-               .cmd = "pkg_list",
+               .cmd = CMD_STR_INFO_PKG_LIST,
                .handler = liveinfo_pkg_list,
        },
        {
-               .cmd = "inst_list",
+               .cmd = CMD_STR_INFO_INST_LIST,
                .handler = liveinfo_inst_list,
        },
        {
-               .cmd = "slave_ctrl",
+               .cmd = CMD_STR_INFO_SLAVE_CTRL,
                .handler = liveinfo_slave_ctrl,
        },
        {
-               .cmd = "pkg_ctrl",
+               .cmd = CMD_STR_INFO_PKG_CTRL,
                .handler = liveinfo_pkg_ctrl,
        },
        {
-               .cmd = "master_ctrl",
+               .cmd = CMD_STR_INFO_MASTER_CTRL,
                .handler = liveinfo_master_ctrl,
        },
        {
@@ -7808,339 +8178,347 @@ static struct method s_info_table[] = {
 
 static struct method s_client_table[] = {
        {
-               .cmd = "pd_mouse_move",
-               .handler = client_pd_mouse_move, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_GBAR_MOUSE_MOVE,
+               .handler = client_gbar_mouse_move, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "lb_mouse_move",
-               .handler = client_lb_mouse_move, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_DBOX_MOUSE_MOVE,
+               .handler = client_dbox_mouse_move, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "pd_mouse_down",
-               .handler = client_pd_mouse_down, /* pid, pkgname, id, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_GBAR_MOUSE_DOWN,
+               .handler = client_gbar_mouse_down, /* pid, pkgname, id, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "pd_mouse_up",
-               .handler = client_pd_mouse_up, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_GBAR_MOUSE_UP,
+               .handler = client_gbar_mouse_up, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "lb_mouse_down",
-               .handler = client_lb_mouse_down, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_DBOX_MOUSE_DOWN,
+               .handler = client_dbox_mouse_down, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "lb_mouse_up",
-               .handler = client_lb_mouse_up, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_DBOX_MOUSE_UP,
+               .handler = client_dbox_mouse_up, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "pd_mouse_enter",
-               .handler = client_pd_mouse_enter, /* pid, pkgname, id, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_GBAR_MOUSE_ENTER,
+               .handler = client_gbar_mouse_enter, /* pid, pkgname, id, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "pd_mouse_leave",
-               .handler = client_pd_mouse_leave, /* pid, pkgname, id, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_GBAR_MOUSE_LEAVE,
+               .handler = client_gbar_mouse_leave, /* pid, pkgname, id, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "lb_mouse_enter",
-               .handler = client_lb_mouse_enter, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_DBOX_MOUSE_ENTER,
+               .handler = client_dbox_mouse_enter, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "lb_mouse_leave",
-               .handler = client_lb_mouse_leave, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
+               .cmd = CMD_STR_DBOX_MOUSE_LEAVE,
+               .handler = client_dbox_mouse_leave, /* pid, pkgname, filename, width, height, timestamp, x, y, ret */
        },
        {
-               .cmd = "lb_mouse_on_scroll",
-               .handler = client_lb_mouse_on_scroll,
+               .cmd = CMD_STR_DBOX_MOUSE_ON_SCROLL,
+               .handler = client_dbox_mouse_on_scroll,
        },
        {
-               .cmd = "lb_mouse_off_scroll",
-               .handler = client_lb_mouse_off_scroll,
+               .cmd = CMD_STR_DBOX_MOUSE_OFF_SCROLL,
+               .handler = client_dbox_mouse_off_scroll,
        },
        {
-               .cmd = "pd_mouse_on_scroll",
-               .handler = client_pd_mouse_on_scroll,
+               .cmd = CMD_STR_GBAR_MOUSE_ON_SCROLL,
+               .handler = client_gbar_mouse_on_scroll,
        },
        {
-               .cmd = "pd_mouse_off_scroll",
-               .handler = client_pd_mouse_off_scroll,
+               .cmd = CMD_STR_GBAR_MOUSE_OFF_SCROLL,
+               .handler = client_gbar_mouse_off_scroll,
        },
        {
-               .cmd = "lb_mouse_on_hold",
-               .handler = client_lb_mouse_on_hold,
+               .cmd = CMD_STR_DBOX_MOUSE_ON_HOLD,
+               .handler = client_dbox_mouse_on_hold,
        },
        {
-               .cmd = "lb_mouse_off_hold",
-               .handler = client_lb_mouse_off_hold,
+               .cmd = CMD_STR_DBOX_MOUSE_OFF_HOLD,
+               .handler = client_dbox_mouse_off_hold,
        },
        {
-               .cmd = "pd_mouse_on_hold",
-               .handler = client_pd_mouse_on_hold,
+               .cmd = CMD_STR_GBAR_MOUSE_ON_HOLD,
+               .handler = client_gbar_mouse_on_hold,
        },
        {
-               .cmd = "pd_mouse_off_hold",
-               .handler = client_pd_mouse_off_hold,
+               .cmd = CMD_STR_GBAR_MOUSE_OFF_HOLD,
+               .handler = client_gbar_mouse_off_hold,
        },
        {
-               .cmd = "clicked",
+               .cmd = CMD_STR_CLICKED,
                .handler = client_clicked, /*!< pid, pkgname, filename, event, timestamp, x, y, ret */
        },
        {
-               .cmd = "text_signal",
+               .cmd = CMD_STR_TEXT_SIGNAL,
                .handler = client_text_signal, /* pid, pkgname, filename, emission, source, s, sy, ex, ey, ret */
        },
        {
-               .cmd = "delete",
+               .cmd = CMD_STR_DELETE,
                .handler = client_delete, /* pid, pkgname, filename, ret */
        },
        {
-               .cmd = "resize",
+               .cmd = CMD_STR_RESIZE,
                .handler = client_resize, /* pid, pkgname, filename, w, h, ret */
        },
        {
-               .cmd = "new",
+               .cmd = CMD_STR_NEW,
                .handler = client_new, /* pid, timestamp, pkgname, content, cluster, category, period, ret */
        },
        {
-               .cmd = "set_period",
+               .cmd = CMD_STR_SET_PERIOD,
                .handler = client_set_period, /* pid, pkgname, filename, period, ret, period */
        },
        {
-               .cmd = "change_group",
+               .cmd = CMD_STR_CHANGE_GROUP,
                .handler = client_change_group, /* pid, pkgname, filename, cluster, category, ret */
        },
        {
-               .cmd = "pd_move",
-               .handler = client_pd_move, /* pkgname, id, x, y */
+               .cmd = CMD_STR_GBAR_MOVE,
+               .handler = client_gbar_move, /* pkgname, id, x, y */
        },
        {
-               .cmd = "pd_access_hl",
-               .handler = client_pd_access_hl,
+               .cmd = CMD_STR_GBAR_ACCESS_HL,
+               .handler = client_gbar_access_hl,
        },
        {
-               .cmd = "pd_access_activate",
-               .handler = client_pd_access_activate,
+               .cmd = CMD_STR_GBAR_ACCESS_ACTIVATE,
+               .handler = client_gbar_access_activate,
        },
        {
-               .cmd = "pd_access_action",
-               .handler = client_pd_access_action,
+               .cmd = CMD_STR_GBAR_ACCESS_ACTION,
+               .handler = client_gbar_access_action,
        },
        {
-               .cmd = "pd_access_scroll",
-               .handler = client_pd_access_scroll,
+               .cmd = CMD_STR_GBAR_ACCESS_SCROLL,
+               .handler = client_gbar_access_scroll,
        },
        {
-               .cmd = "pd_access_value_change",
-               .handler = client_pd_access_value_change,
+               .cmd = CMD_STR_GBAR_ACCESS_VALUE_CHANGE,
+               .handler = client_gbar_access_value_change,
        },
        {
-               .cmd = "pd_access_mouse",
-               .handler = client_pd_access_mouse,
+               .cmd = CMD_STR_GBAR_ACCESS_MOUSE,
+               .handler = client_gbar_access_mouse,
        },
        {
-               .cmd = "pd_access_back",
-               .handler = client_pd_access_back,
+               .cmd = CMD_STR_GBAR_ACCESS_BACK,
+               .handler = client_gbar_access_back,
        },
        {
-               .cmd = "pd_access_over",
-               .handler = client_pd_access_over,
+               .cmd = CMD_STR_GBAR_ACCESS_OVER,
+               .handler = client_gbar_access_over,
        },
        {
-               .cmd = "pd_access_read",
-               .handler = client_pd_access_read,
+               .cmd = CMD_STR_GBAR_ACCESS_READ,
+               .handler = client_gbar_access_read,
        },
        {
-               .cmd = "pd_access_enable",
-               .handler = client_pd_access_enable,
+               .cmd = CMD_STR_GBAR_ACCESS_ENABLE,
+               .handler = client_gbar_access_enable,
        },
 
        {
-               .cmd = "lb_access_hl",
-               .handler = client_lb_access_hl,
+               .cmd = CMD_STR_DBOX_ACCESS_HL,
+               .handler = client_dbox_access_hl,
        },
        {
-               .cmd = "lb_access_activate",
-               .handler = client_lb_access_activate,
+               .cmd = CMD_STR_DBOX_ACCESS_ACTIVATE,
+               .handler = client_dbox_access_activate,
        },
        {
-               .cmd = "lb_access_action",
-               .handler = client_lb_access_action,
+               .cmd = CMD_STR_DBOX_ACCESS_ACTION,
+               .handler = client_dbox_access_action,
        },
        {
-               .cmd = "lb_access_scroll",
-               .handler = client_lb_access_scroll,
+               .cmd = CMD_STR_DBOX_ACCESS_SCROLL,
+               .handler = client_dbox_access_scroll,
        },
        {
-               .cmd = "lb_access_value_change",
-               .handler = client_lb_access_value_change,
+               .cmd = CMD_STR_DBOX_ACCESS_VALUE_CHANGE,
+               .handler = client_dbox_access_value_change,
        },
        {
-               .cmd = "lb_access_mouse",
-               .handler = client_lb_access_mouse,
+               .cmd = CMD_STR_DBOX_ACCESS_MOUSE,
+               .handler = client_dbox_access_mouse,
        },
        {
-               .cmd = "lb_access_back",
-               .handler = client_lb_access_back,
+               .cmd = CMD_STR_DBOX_ACCESS_BACK,
+               .handler = client_dbox_access_back,
        },
        {
-               .cmd = "lb_access_over",
-               .handler = client_lb_access_over,
+               .cmd = CMD_STR_DBOX_ACCESS_OVER,
+               .handler = client_dbox_access_over,
        },
        {
-               .cmd = "lb_access_read",
-               .handler = client_lb_access_read,
+               .cmd = CMD_STR_DBOX_ACCESS_READ,
+               .handler = client_dbox_access_read,
        },
        {
-               .cmd = "lb_access_enable",
-               .handler = client_lb_access_enable,
+               .cmd = CMD_STR_DBOX_ACCESS_ENABLE,
+               .handler = client_dbox_access_enable,
        },
        {
-               .cmd = "lb_key_down",
-               .handler = client_lb_key_down,
+               .cmd = CMD_STR_DBOX_KEY_DOWN,
+               .handler = client_dbox_key_down,
        },
        {
-               .cmd = "lb_key_up",
-               .handler = client_lb_key_up,
+               .cmd = CMD_STR_DBOX_KEY_UP,
+               .handler = client_dbox_key_up,
        },
        {
-               .cmd = "lb_key_focus_in",
-               .handler = client_lb_key_focus_in,
+               .cmd = CMD_STR_DBOX_KEY_FOCUS_IN,
+               .handler = client_dbox_key_focus_in,
        },
        {
-               .cmd = "lb_key_focus_out",
-               .handler = client_lb_key_focus_out,
+               .cmd = CMD_STR_DBOX_KEY_FOCUS_OUT,
+               .handler = client_dbox_key_focus_out,
        },
        {
-               .cmd = "pd_key_down",
-               .handler = client_pd_key_down,
+               .cmd = CMD_STR_GBAR_KEY_DOWN,
+               .handler = client_gbar_key_down,
        },
        {
-               .cmd = "pd_key_up",
-               .handler = client_pd_key_up,
+               .cmd = CMD_STR_GBAR_KEY_UP,
+               .handler = client_gbar_key_up,
        },
        {
-               .cmd = "pd_key_focus_in",
-               .handler = client_pd_key_focus_in,
+               .cmd = CMD_STR_GBAR_KEY_FOCUS_IN,
+               .handler = client_gbar_key_focus_in,
        },
        {
-               .cmd = "pd_key_focus_out",
-               .handler = client_pd_key_focus_out,
+               .cmd = CMD_STR_GBAR_KEY_FOCUS_OUT,
+               .handler = client_gbar_key_focus_out,
        },
        {
-               .cmd = "update_mode",
+               .cmd = CMD_STR_UPDATE_MODE,
                .handler = client_update_mode,
        },
        // Cut HERE. Above list must be sync'd with provider list.
 
        {
-               .cmd = "lb_mouse_set",
-               .handler = client_lb_mouse_set,
+               .cmd = CMD_STR_DBOX_MOUSE_SET,
+               .handler = client_dbox_mouse_set,
        },
        {
-               .cmd = "lb_mouse_unset",
-               .handler = client_lb_mouse_unset,
+               .cmd = CMD_STR_DBOX_MOUSE_UNSET,
+               .handler = client_dbox_mouse_unset,
        },
        {
-               .cmd = "pd_mouse_set",
-               .handler = client_pd_mouse_set,
+               .cmd = CMD_STR_GBAR_MOUSE_SET,
+               .handler = client_gbar_mouse_set,
        },
        {
-               .cmd = "pd_mouse_unset",
-               .handler = client_pd_mouse_unset,
+               .cmd = CMD_STR_GBAR_MOUSE_UNSET,
+               .handler = client_gbar_mouse_unset,
        },
        {
-               .cmd = "change,visibility",
+               .cmd = CMD_STR_CHANGE_VISIBILITY,
                .handler = client_change_visibility,
        },
        {
-               .cmd = "lb_acquire_pixmap",
-               .handler = client_lb_acquire_pixmap,
+               .cmd = CMD_STR_DBOX_ACQUIRE_PIXMAP,
+               .handler = client_dbox_acquire_pixmap,
        },
        {
-               .cmd = "lb_release_pixmap",
-               .handler = client_lb_release_pixmap,
+               .cmd = CMD_STR_DBOX_RELEASE_PIXMAP,
+               .handler = client_dbox_release_pixmap,
        },
        {
-               .cmd = "pd_acquire_pixmap",
-               .handler = client_pd_acquire_pixmap,
+               .cmd = CMD_STR_GBAR_ACQUIRE_PIXMAP,
+               .handler = client_gbar_acquire_pixmap,
        },
        {
-               .cmd = "pd_release_pixmap",
-               .handler = client_pd_release_pixmap,
+               .cmd = CMD_STR_GBAR_RELEASE_PIXMAP,
+               .handler = client_gbar_release_pixmap,
        },
        {
-               .cmd = "acquire",
+               .cmd = CMD_STR_ACQUIRE,
                .handler = client_acquire, /*!< pid, ret */
        },
        {
-               .cmd = "release",
+               .cmd = CMD_STR_RELEASE,
                .handler = cilent_release, /*!< pid, ret */
        },
        {
-               .cmd = "pinup_changed",
+               .cmd = CMD_STR_PINUP_CHANGED,
                .handler = client_pinup_changed, /* pid, pkgname, filename, pinup, ret */
        },
        {
-               .cmd = "create_pd",
-               .handler = client_create_pd, /* pid, pkgname, filename, ret */
+               .cmd = CMD_STR_CREATE_GBAR,
+               .handler = client_create_gbar, /* pid, pkgname, filename, ret */
        },
        {
-               .cmd = "destroy_pd",
-               .handler = client_destroy_pd, /* pid, pkgname, filename, ret */
+               .cmd = CMD_STR_DESTROY_GBAR,
+               .handler = client_destroy_gbar, /* pid, pkgname, filename, ret */
        },
        {
-               .cmd = "activate_package",
+               .cmd = CMD_STR_ACTIVATE_PACKAGE,
                .handler = client_activate_package, /* pid, pkgname, ret */
        },
        {
-               .cmd = "subscribe", /* pid, cluster, sub-cluster */
+               .cmd = CMD_STR_SUBSCRIBE, /* pid, cluster, sub-cluster */
                .handler = client_subscribed,
        },
        {
-               .cmd = "unsubscribe", /* pid, cluster, sub-cluster */
+               .cmd = CMD_STR_UNSUBSCRIBE, /* pid, cluster, sub-cluster */
                .handler = client_unsubscribed,
        },
        {
-               .cmd = "delete_cluster",
+               .cmd = CMD_STR_DELETE_CLUSTER,
                .handler = client_delete_cluster,
        },
        {
-               .cmd = "delete_category",
+               .cmd = CMD_STR_DELETE_CATEGORY,
                .handler = client_delete_category,
        },
        {
-               .cmd = "refresh_group",
+               .cmd = CMD_STR_REFRESH_GROUP,
                .handler = client_refresh_group,
        },
        {
-               .cmd = "update",
+               .cmd = CMD_STR_UPDATE,
                .handler = client_update,
        },
 
        {
-               .cmd = "lb_key_set",
-               .handler = client_lb_key_set,
+               .cmd = CMD_STR_DBOX_KEY_SET,
+               .handler = client_dbox_key_set,
        },
        {
-               .cmd = "lb_key_unset",
-               .handler = client_lb_key_unset,
+               .cmd = CMD_STR_DBOX_KEY_UNSET,
+               .handler = client_dbox_key_unset,
        },
 
        {
-               .cmd = "pd_key_set",
-               .handler = client_pd_key_set,
+               .cmd = CMD_STR_GBAR_KEY_SET,
+               .handler = client_gbar_key_set,
        },
        {
-               .cmd = "pd_key_unset",
-               .handler = client_pd_key_unset,
+               .cmd = CMD_STR_GBAR_KEY_UNSET,
+               .handler = client_gbar_key_unset,
        },
 
        {
-               .cmd = "client_paused",
+               .cmd = CMD_STR_CLIENT_PAUSED,
                .handler = client_pause_request,
        },
        {
-               .cmd = "client_resumed",
+               .cmd = CMD_STR_CLIENT_RESUMED,
                .handler = client_resume_request,
        },
+       {
+               .cmd = CMD_STR_DBOX_ACQUIRE_XPIXMAP,
+               .handler = client_dbox_acquire_xpixmap,
+       },
+       {
+               .cmd = CMD_STR_GBAR_ACQUIRE_XPIXMAP,
+               .handler = client_gbar_acquire_xpixmap,
+       },
 
        {
                .cmd = NULL,
@@ -8150,15 +8528,15 @@ static struct method s_client_table[] = {
 
 static struct method s_service_table[] = {
        {
-               .cmd = "service_update",
+               .cmd = CMD_STR_SERVICE_UPDATE,
                .handler = service_update,
        },
        {
-               .cmd = "service_change_period",
+               .cmd = CMD_STR_SERVICE_CHANGE_PERIOD,
                .handler = service_change_period,
        },
        {
-               .cmd = "service_inst_cnt",
+               .cmd = CMD_STR_SERVICE_INST_CNT,
                .handler = service_instance_count,
        },
        {
@@ -8169,94 +8547,107 @@ static struct method s_service_table[] = {
 
 static struct method s_slave_table[] = {
        {
-               .cmd = "updated",
+               .cmd = CMD_STR_UPDATED,
                .handler = slave_updated, /* slave_name, pkgname, filename, width, height, ret */
        },
        {
-               .cmd = "desc_updated",
+               .cmd = CMD_STR_DESC_UPDATED,
                .handler = slave_desc_updated, /* slave_name, pkgname, filename, decsfile, ret */
        },
        {
-               .cmd = "extra_info",
+               .cmd = CMD_STR_EXTRA_UPDATED,
+               .handler = slave_extra_updated,
+       },
+       {
+               .cmd = CMD_STR_EXTRA_INFO,
                .handler = slave_extra_info, /* slave_name, pkgname, filename, priority, content_info, title, icon, name */
        },
        {
-               .cmd = "deleted",
+               .cmd = CMD_STR_DELETED,
                .handler = slave_deleted, /* slave_name, pkgname, filename, ret */
        },
        {
-               .cmd = "faulted",
+               .cmd = CMD_STR_FAULTED,
                .handler = slave_faulted, /* slave_name, pkgname, id, funcname */
        },
        {
-               .cmd = "scroll",
+               .cmd = CMD_STR_SCROLL,
                .handler = slave_hold_scroll, /* slave_name, pkgname, id, seize */
        },
 
        {
-               .cmd = "lb_update_begin",
-               .handler = slave_lb_update_begin,
+               .cmd = CMD_STR_DBOX_UPDATE_BEGIN,
+               .handler = slave_dbox_update_begin,
        },
        {
-               .cmd = "lb_update_end",
-               .handler = slave_lb_update_end,
+               .cmd = CMD_STR_DBOX_UPDATE_END,
+               .handler = slave_dbox_update_end,
        },
        {
-               .cmd = "pd_update_begin",
-               .handler = slave_pd_update_begin,
+               .cmd = CMD_STR_GBAR_UPDATE_BEGIN,
+               .handler = slave_gbar_update_begin,
        },
        {
-               .cmd = "pd_update_end",
-               .handler = slave_pd_update_end,
+               .cmd = CMD_STR_GBAR_UPDATE_END,
+               .handler = slave_gbar_update_end,
        },
 
        {
-               .cmd = "access_status",
+               .cmd = CMD_STR_ACCESS_STATUS,
                .handler = slave_access_status,
        },
        {
-               .cmd = "key_status",
+               .cmd = CMD_STR_KEY_STATUS,
                .handler = slave_key_status,
        },
        {
-               .cmd = "close_pd",
-               .handler = slave_close_pd,
+               .cmd = CMD_STR_CLOSE_GBAR,
+               .handler = slave_close_gbar,
        },
 
        {
-               .cmd = "call",
+               .cmd = CMD_STR_CALL,
                .handler = slave_call, /* slave_name, pkgname, filename, function, ret */
        },
        {
-               .cmd = "ret",
+               .cmd = CMD_STR_RET,
                .handler = slave_ret, /* slave_name, pkgname, filename, function, ret */
        },
        {
-               .cmd = "acquire_buffer",
+               .cmd = CMD_STR_ACQUIRE_BUFFER,
                .handler = slave_acquire_buffer, /* slave_name, id, w, h, size, - out - type, shmid */
        },
        {
-               .cmd = "resize_buffer",
+               .cmd = CMD_STR_RESIZE_BUFFER,
                .handler = slave_resize_buffer,
        },
        {
-               .cmd = "release_buffer",
+               .cmd = CMD_STR_RELEASE_BUFFER,
                .handler = slave_release_buffer, /* slave_name, id - ret */
        },
        {
-               .cmd = "hello",
+               .cmd = CMD_STR_HELLO,
                .handler = slave_hello, /* slave_name, ret */
        },
        {
-               .cmd = "ping",
+               .cmd = CMD_STR_PING,
                .handler = slave_ping, /* slave_name, ret */
        },
        {
-               .cmd = "ctrl",
+               .cmd = CMD_STR_CTRL,
                .handler = slave_ctrl, /* control bits */
        },
 
        {
+               .cmd = CMD_STR_ACQUIRE_XBUFFER,
+               .handler = slave_acquire_extra_buffer,
+       },
+       {
+               .cmd = CMD_STR_RELEASE_XBUFFER,
+               .handler = slave_release_extra_buffer,
+       },
+
+       {
                .cmd = NULL,
                .handler = NULL,
        },
@@ -8264,7 +8655,7 @@ static struct method s_slave_table[] = {
 
 HAPI int server_init(void)
 {
-       com_core_packet_use_thread(COM_CORE_THREAD);
+       com_core_packet_use_thread(DYNAMICBOX_CONF_COM_CORE_THREAD);
 
        if (unlink(INFO_SOCKET) < 0) {
                ErrPrint("info socket: %s\n", strerror(errno));
index e2b27c9..c553abc 100644 (file)
@@ -30,7 +30,7 @@
 #include <Eina.h>
 #include <com-core.h>
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #else
 #include <lite-errno.h>
 #endif
@@ -353,7 +353,7 @@ HAPI int service_register_tcb_callback(struct service_context *svc_ctx, struct t
        cbdata = malloc(sizeof(*cbdata));
        if (!cbdata) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        cbdata->tcb = tcb;
@@ -372,10 +372,10 @@ HAPI int service_register_tcb_callback(struct service_context *svc_ctx, struct t
                break;
        default:
                DbgFree(cbdata);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /*!
@@ -393,7 +393,7 @@ HAPI int service_unregister_tcb_callback(struct service_context *svc_ctx, struct
                        if (cbdata->tcb == tcb && cbdata->cb == cb && cbdata->data == data) {
                                svc_ctx->tcb_create_cb_list = eina_list_remove(svc_ctx->tcb_create_cb_list, cbdata);
                                DbgFree(cbdata);
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -402,15 +402,15 @@ HAPI int service_unregister_tcb_callback(struct service_context *svc_ctx, struct
                        if (cbdata->tcb == tcb && cbdata->cb == cb && cbdata->data == data) {
                                svc_ctx->tcb_destroy_cb_list = eina_list_remove(svc_ctx->tcb_destroy_cb_list, cbdata);
                                DbgFree(cbdata);
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
        default:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 /*!
index 94c0214..4af52c2 100644 (file)
@@ -38,7 +38,8 @@
 #include "critical_log.h"
 
 #if defined(HAVE_LIVEBOX)
-#include <livebox-service.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_conf.h>
 #include "client_life.h"
 #include "slave_life.h"
 #include "xmonitor.h"
@@ -69,7 +70,7 @@ HAPI int setting_is_lcd_off(void)
 {
        int state;
 
-       if (!CHECK_LCD) {
+       if (!DYNAMICBOX_CONF_CHECK_LCD) {
                /* Always turned on */
                return 0;
        }
old mode 100755 (executable)
new mode 100644 (file)
index 5ac67f5..419cc69
@@ -19,7 +19,7 @@
 
 #include <dlog.h>
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #else
 #include "lite-errno.h"
 #endif
@@ -210,13 +210,13 @@ HAPI int shortcut_service_init(void)
 {
        if (s_info.svc_ctx) {
                ErrPrint("Already initialized\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        s_info.svc_ctx = service_common_create(SHORTCUT_SOCKET, service_thread_main, NULL);
        if (!s_info.svc_ctx) {
                ErrPrint("Unable to activate service thread\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), SHORTCUT_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
@@ -224,7 +224,7 @@ HAPI int shortcut_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
@@ -233,24 +233,24 @@ HAPI int shortcut_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
        DbgPrint("Successfully initiated\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int shortcut_service_fini(void)
 {
        if (!s_info.svc_ctx) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        service_common_destroy(s_info.svc_ctx);
        s_info.svc_ctx = NULL;
        DbgPrint("Successfully Finalized\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index 19c0934..f82307b 100644 (file)
@@ -31,7 +31,9 @@
 #include <bundle.h>
 
 #include <packet.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_conf.h>
+#include <dynamicbox_cmd_list.h>
 
 #include "critical_log.h"
 #include "slave_life.h"
@@ -44,7 +46,6 @@
 #include "util.h"
 #include "abi.h"
 #include "xmonitor.h"
-#include "provider_cmd_list.h"
 
 #define BUNDLE_SLAVE_SVC_OP_TYPE "__APP_SVC_OP_TYPE__"
 #define APP_CONTROL_OPERATION_MAIN "http://tizen.org/appcontrol/operation/main"
@@ -55,7 +56,7 @@ struct slave_node {
        char *name;
        char *abi;
        char *pkgname;
-       int secured;    /* Only A package(livebox) is loaded for security requirements */
+       int secured;    /* Only A package(dynamicbox) is loaded for security requirements */
        int refcnt;
        int fault_count;
        int critical_fault_count;
@@ -131,7 +132,7 @@ static Eina_Bool slave_ttl_cb(void *data)
        /*!
         * \note
         * ttl_timer must has to be set to NULL before deactivate the slave
-        * It will be used for making decision of the expired TTL timer or the fault of a livebox.
+        * It will be used for making decision of the expired TTL timer or the fault of a dynamicbox.
         */
        slave->ttl_timer = NULL;
 
@@ -150,13 +151,13 @@ static Eina_Bool slave_ttl_cb(void *data)
 static inline int xmonitor_pause_cb(void *data)
 {
        slave_pause(data);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int xmonitor_resume_cb(void *data)
 {
        slave_resume(data);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline struct slave_node *create_slave_node(const char *name, int is_secured, const char *abi, const char *pkgname, int network)
@@ -197,7 +198,7 @@ static inline struct slave_node *create_slave_node(const char *name, int is_secu
        slave->pid = (pid_t)-1;
        slave->state = SLAVE_TERMINATED;
        slave->network = network;
-       slave->relaunch_count = SLAVE_RELAUNCH_COUNT;
+       slave->relaunch_count = DYNAMICBOX_CONF_SLAVE_RELAUNCH_COUNT;
 
        xmonitor_add_event_callback(XMONITOR_PAUSED, xmonitor_pause_cb, slave);
        xmonitor_add_event_callback(XMONITOR_RESUMED, xmonitor_resume_cb, slave);
@@ -432,7 +433,7 @@ static Eina_Bool activate_timer_cb(void *data)
                }
        }
 
-       CRITICAL_LOG("Slave is not activated in %lf sec (slave: %s)\n", SLAVE_ACTIVATE_TIME, slave_name(slave));
+       CRITICAL_LOG("Slave is not activated in %lf sec (slave: %s)\n", DYNAMICBOX_CONF_SLAVE_ACTIVATE_TIME, slave_name(slave));
        slave = slave_deactivated(slave);
        return ECORE_CALLBACK_CANCEL;
 }
@@ -494,9 +495,9 @@ static Eina_Bool relaunch_timer_cb(void *data)
                        invoke_slave_fault_handler(slave);
                } else {
                        bundle_add(param, BUNDLE_SLAVE_SVC_OP_TYPE, APP_CONTROL_OPERATION_MAIN);
-                       bundle_add(param, BUNDLE_SLAVE_NAME, slave_name(slave));
-                       bundle_add(param, BUNDLE_SLAVE_SECURED, slave->secured ? "true" : "false");
-                       bundle_add(param, BUNDLE_SLAVE_ABI, slave->abi);
+                       bundle_add(param, DYNAMICBOX_CONF_BUNDLE_SLAVE_NAME, slave_name(slave));
+                       bundle_add(param, DYNAMICBOX_CONF_BUNDLE_SLAVE_SECURED, slave->secured ? "true" : "false");
+                       bundle_add(param, DYNAMICBOX_CONF_BUNDLE_SLAVE_ABI, slave->abi);
 
                        slave->pid = (pid_t)aul_launch_app(slave_pkgname(slave), param);
 
@@ -565,29 +566,29 @@ HAPI int slave_activate(struct slave_node *slave)
                } else if (slave_state(slave) == SLAVE_REQUEST_TO_TERMINATE || slave_state(slave) == SLAVE_REQUEST_TO_DISCONNECT) {
                        slave_set_reactivation(slave, 1);
                }
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        } else if (slave_state(slave) == SLAVE_REQUEST_TO_LAUNCH) {
                DbgPrint("Slave is already launched: but the AUL is timed out\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
-       if (DEBUG_MODE) {
+       if (DYNAMICBOX_CONF_DEBUG_MODE || g_conf.debug_mode) {
                DbgPrint("Debug Mode enabled. name[%s] secured[%d] abi[%s]\n", slave_name(slave), slave->secured, slave->abi);
        } else {
                bundle *param;
 
-               slave->relaunch_count = SLAVE_RELAUNCH_COUNT;
+               slave->relaunch_count = DYNAMICBOX_CONF_SLAVE_RELAUNCH_COUNT;
 
                param = bundle_create();
                if (!param) {
                        ErrPrint("Failed to create a bundle\n");
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
 
                bundle_add(param, BUNDLE_SLAVE_SVC_OP_TYPE, APP_CONTROL_OPERATION_MAIN);
-               bundle_add(param, BUNDLE_SLAVE_NAME, slave_name(slave));
-               bundle_add(param, BUNDLE_SLAVE_SECURED, slave->secured ? "true" : "false");
-               bundle_add(param, BUNDLE_SLAVE_ABI, slave->abi);
+               bundle_add(param, DYNAMICBOX_CONF_BUNDLE_SLAVE_NAME, slave_name(slave));
+               bundle_add(param, DYNAMICBOX_CONF_BUNDLE_SLAVE_SECURED, slave->secured ? "true" : "false");
+               bundle_add(param, DYNAMICBOX_CONF_BUNDLE_SLAVE_ABI, slave->abi);
 
                slave->pid = (pid_t)aul_launch_app(slave_pkgname(slave), param);
 
@@ -609,11 +610,11 @@ HAPI int slave_activate(struct slave_node *slave)
                case AUL_R_ECANCELED:           /**< Operation canceled */
                case AUL_R_ETIMEOUT:            /**< Timeout */
                        CRITICAL_LOG("Try relaunch this soon %s (%d)\n", slave_name(slave), slave->pid);
-                       slave->relaunch_timer = ecore_timer_add(SLAVE_RELAUNCH_TIME, relaunch_timer_cb, slave);
+                       slave->relaunch_timer = ecore_timer_add(DYNAMICBOX_CONF_SLAVE_RELAUNCH_TIME, relaunch_timer_cb, slave);
                        if (!slave->relaunch_timer) {
                                CRITICAL_LOG("Failed to register a relaunch timer (%s)\n", slave_name(slave));
                                slave->pid = (pid_t)-1;
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
                        /* Try again after a few secs later */
                        break;
@@ -624,7 +625,7 @@ HAPI int slave_activate(struct slave_node *slave)
                        break;
                }
 
-               slave->activate_timer = ecore_timer_add(SLAVE_ACTIVATE_TIME, activate_timer_cb, slave);
+               slave->activate_timer = ecore_timer_add(DYNAMICBOX_CONF_SLAVE_ACTIVATE_TIME, activate_timer_cb, slave);
                if (!slave->activate_timer) {
                        ErrPrint("Failed to register an activate timer\n");
                }
@@ -638,7 +639,7 @@ HAPI int slave_activate(struct slave_node *slave)
         */
        (void)slave_ref(slave);
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_give_more_ttl(struct slave_node *slave)
@@ -646,22 +647,22 @@ HAPI int slave_give_more_ttl(struct slave_node *slave)
        double delay;
 
        if (!slave->secured || !slave->ttl_timer) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       delay = SLAVE_TTL - ecore_timer_pending_get(slave->ttl_timer);
+       delay = DYNAMICBOX_CONF_SLAVE_TTL - ecore_timer_pending_get(slave->ttl_timer);
        ecore_timer_delay(slave->ttl_timer, delay);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_freeze_ttl(struct slave_node *slave)
 {
        if (!slave->secured || !slave->ttl_timer) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ecore_timer_freeze(slave->ttl_timer);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_thaw_ttl(struct slave_node *slave)
@@ -669,14 +670,14 @@ HAPI int slave_thaw_ttl(struct slave_node *slave)
        double delay;
 
        if (!slave->secured || !slave->ttl_timer) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        ecore_timer_thaw(slave->ttl_timer);
 
-       delay = SLAVE_TTL - ecore_timer_pending_get(slave->ttl_timer);
+       delay = DYNAMICBOX_CONF_SLAVE_TTL - ecore_timer_pending_get(slave->ttl_timer);
        ecore_timer_delay(slave->ttl_timer, delay);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_activated(struct slave_node *slave)
@@ -687,9 +688,9 @@ HAPI int slave_activated(struct slave_node *slave)
                slave_pause(slave);
        }
 
-       if (slave->secured == 1 && SLAVE_TTL > 0.0f) {
-               DbgPrint("Slave deactivation timer is added (%s - %lf)\n", slave_name(slave), SLAVE_TTL);
-               slave->ttl_timer = ecore_timer_add(SLAVE_TTL, slave_ttl_cb, slave);
+       if (slave->secured == 1 && DYNAMICBOX_CONF_SLAVE_TTL > 0.0f) {
+               DbgPrint("Slave deactivation timer is added (%s - %lf)\n", slave_name(slave), DYNAMICBOX_CONF_SLAVE_TTL);
+               slave->ttl_timer = ecore_timer_add(DYNAMICBOX_CONF_SLAVE_TTL, slave_ttl_cb, slave);
                if (!slave->ttl_timer) {
                        ErrPrint("Failed to create a TTL timer\n");
                }
@@ -720,7 +721,7 @@ HAPI int slave_activated(struct slave_node *slave)
                slave->relaunch_timer = NULL;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline int invoke_deactivate_cb(struct slave_node *slave)
@@ -816,7 +817,7 @@ HAPI struct slave_node *slave_deactivate(struct slave_node *slave, int no_timer)
                ErrPrint("Terminate timer is already fired (%d)\n", slave->pid);
        } else if (!no_timer && !slave->secured) {
                DbgPrint("Fire the terminate timer: %d\n", slave->pid);
-               slave->terminate_timer = ecore_timer_add(SLAVE_ACTIVATE_TIME, terminate_timer_cb, slave);
+               slave->terminate_timer = ecore_timer_add(DYNAMICBOX_CONF_SLAVE_ACTIVATE_TIME, terminate_timer_cb, slave);
                if (!slave->terminate_timer) {
                        /*!
                         * \note
@@ -903,7 +904,7 @@ HAPI struct slave_node *slave_deactivated(struct slave_node *slave)
 
                DbgPrint("Need to reactivate a slave\n");
                ret = slave_activate(slave);
-               if (ret < 0 && ret != LB_STATUS_ERROR_ALREADY) {
+               if (ret < 0 && ret != DBOX_STATUS_ERROR_ALREADY) {
                        ErrPrint("Failed to reactivate a slave\n");
                }
        } else if (slave_loaded_instance(slave) == 0) {
@@ -923,6 +924,13 @@ HAPI struct slave_node *slave_deactivated_by_fault(struct slave_node *slave)
        int ret;
        int reactivate = 1;
        int reactivate_instances = 1;
+       int max_load;
+
+       if (g_conf.slave_max_load < 0) {
+               max_load = DYNAMICBOX_CONF_SLAVE_MAX_LOAD;
+       } else {
+               max_load = g_conf.slave_max_load;
+       }
 
        if (!slave_is_activated(slave)) {
                DbgPrint("Deactivating in progress\n");
@@ -949,9 +957,10 @@ HAPI struct slave_node *slave_deactivated_by_fault(struct slave_node *slave)
        double faulted_at;
 
        faulted_at = ecore_time_get();
-       if (faulted_at - slave->activated_at < MINIMUM_REACTIVATION_TIME) {
+       if (faulted_at - slave->activated_at < DYNAMICBOX_CONF_MINIMUM_REACTIVATION_TIME) {
                slave->critical_fault_count++;
-               if (!slave_loaded_instance(slave) || slave->critical_fault_count >= SLAVE_MAX_LOAD) {
+
+               if (!slave_loaded_instance(slave) || slave->critical_fault_count >= max_load) {
                        ErrPrint("Reactivation time is too fast and frequently occurred - Stop to auto reactivation\n");
                        reactivate = 0;
                        reactivate_instances = 0;
@@ -972,9 +981,9 @@ HAPI struct slave_node *slave_deactivated_by_fault(struct slave_node *slave)
                struct timeval rtv;
 
                timersub(&faulted_at, &slave->activated_at, &rtv);
-               if (rtv.tv_sec < MINIMUM_REACTIVATION_TIME) {
+               if (rtv.tv_sec < DYNAMICBOX_CONF_MINIMUM_REACTIVATION_TIME) {
                        slave->critical_fault_count++;
-                       if (!slave_loaded_instance(slave) || slave->critical_fault_count >= SLAVE_MAX_LOAD) {
+                       if (!slave_loaded_instance(slave) || slave->critical_fault_count >= max_load) {
                                ErrPrint("Reactivation time is too fast and frequently occurred - Stop to auto reactivation\n");
                                reactivate = 0;
                                reactivate_instances = 0;
@@ -1032,7 +1041,7 @@ HAPI int slave_event_callback_add(struct slave_node *slave, enum slave_event eve
        ev = calloc(1, sizeof(*ev));
        if (!ev) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        ev->slave = slave;
@@ -1078,10 +1087,10 @@ HAPI int slave_event_callback_add(struct slave_node *slave, enum slave_event eve
                break;
        default:
                DbgFree(ev);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_event_callback_del(struct slave_node *slave, enum slave_event event, int (*cb)(struct slave_node *, void *), void *data)
@@ -1100,7 +1109,7 @@ HAPI int slave_event_callback_del(struct slave_node *slave, enum slave_event eve
                                        slave->event_deactivate_list = eina_list_remove(slave->event_deactivate_list, ev);
                                        DbgFree(ev);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -1113,7 +1122,7 @@ HAPI int slave_event_callback_del(struct slave_node *slave, enum slave_event eve
                                        slave->event_delete_list = eina_list_remove(slave->event_delete_list, ev);
                                        DbgFree(ev);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -1126,7 +1135,7 @@ HAPI int slave_event_callback_del(struct slave_node *slave, enum slave_event eve
                                        slave->event_activate_list = eina_list_remove(slave->event_activate_list, ev);
                                        DbgFree(ev);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -1139,7 +1148,7 @@ HAPI int slave_event_callback_del(struct slave_node *slave, enum slave_event eve
                                        slave->event_pause_list = eina_list_remove(slave->event_pause_list, ev);
                                        DbgFree(ev);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -1152,7 +1161,7 @@ HAPI int slave_event_callback_del(struct slave_node *slave, enum slave_event eve
                                        slave->event_resume_list = eina_list_remove(slave->event_resume_list, ev);
                                        DbgFree(ev);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -1165,15 +1174,15 @@ HAPI int slave_event_callback_del(struct slave_node *slave, enum slave_event eve
                                        slave->event_fault_list = eina_list_remove(slave->event_fault_list, ev);
                                        DbgFree(ev);
                                }
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
        default:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI int slave_set_data(struct slave_node *slave, const char *tag, void *data)
@@ -1183,19 +1192,19 @@ HAPI int slave_set_data(struct slave_node *slave, const char *tag, void *data)
        priv = calloc(1, sizeof(*priv));
        if (!priv) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        priv->tag = strdup(tag);
        if (!priv->tag) {
                ErrPrint("Heap: %s\n", strerror(errno));
                DbgFree(priv);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        priv->data = data;
        slave->data_list = eina_list_append(slave->data_list, priv);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void *slave_del_data(struct slave_node *slave, const char *tag)
@@ -1299,8 +1308,15 @@ HAPI struct slave_node *slave_find_available(const char *slave_pkgname, const ch
                        }
                } else if (slave->network == network) {
                        DbgPrint("slave[%s] loaded_package[%d] net: [%d]\n", slave_name(slave), slave->loaded_package, slave->network);
-                       if (!strcasecmp(abi, DEFAULT_ABI)) {
-                               if (slave->loaded_package < SLAVE_MAX_LOAD) {
+                       if (!strcasecmp(abi, DYNAMICBOX_CONF_DEFAULT_ABI)) {
+                               int max_load;
+                               if (g_conf.slave_max_load < 0) {
+                                       max_load = DYNAMICBOX_CONF_SLAVE_MAX_LOAD;
+                               } else {
+                                       max_load = g_conf.slave_max_load;
+                               }
+
+                               if (slave->loaded_package < max_load) {
                                        return slave;
                                }
                        } else {
@@ -1359,7 +1375,7 @@ HAPI char *slave_package_name(const char *abi, const char *lbid)
                return NULL;
        }
 
-       s_pkgname = util_replace_string(tmp, REPLACE_TAG_APPID, lbid);
+       s_pkgname = util_replace_string(tmp, DYNAMICBOX_CONF_REPLACE_TAG_APPID, lbid);
        if (!s_pkgname) {
                DbgPrint("Failed to get replaced string\n");
                s_pkgname = strdup(tmp);
@@ -1445,13 +1461,13 @@ HAPI const pid_t const slave_pid(const struct slave_node *slave)
 HAPI int slave_set_pid(struct slave_node *slave, pid_t pid)
 {
        if (!slave) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        DbgPrint("Slave PID is updated to %d from %d\n", pid, slave_pid(slave));
 
        slave->pid = pid;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline void invoke_resumed_cb(struct slave_node *slave)
@@ -1551,10 +1567,10 @@ HAPI int slave_resume(struct slave_node *slave)
        case SLAVE_REQUEST_TO_LAUNCH:
        case SLAVE_REQUEST_TO_TERMINATE:
        case SLAVE_TERMINATED:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        case SLAVE_RESUMED:
        case SLAVE_REQUEST_TO_RESUME:
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        default:
                break;
        }
@@ -1564,7 +1580,7 @@ HAPI int slave_resume(struct slave_node *slave)
        packet = packet_create((const char *)&cmd, "d", timestamp);
        if (!packet) {
                ErrPrint("Failed to prepare param\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        slave->state = SLAVE_REQUEST_TO_RESUME;
@@ -1582,10 +1598,10 @@ HAPI int slave_pause(struct slave_node *slave)
        case SLAVE_REQUEST_TO_LAUNCH:
        case SLAVE_REQUEST_TO_TERMINATE:
        case SLAVE_TERMINATED:
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        case SLAVE_PAUSED:
        case SLAVE_REQUEST_TO_PAUSE:
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        default:
                break;
        }
@@ -1595,7 +1611,7 @@ HAPI int slave_pause(struct slave_node *slave)
        packet = packet_create((const char *)&cmd, "d", timestamp);
        if (!packet) {
                ErrPrint("Failed to prepare param\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        slave->state = SLAVE_REQUEST_TO_PAUSE;
index d2ee751..555b595 100644 (file)
 
 #include <packet.h>
 #include <com-core_packet.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_service.h>
+#include <dynamicbox_cmd_list.h>
+#include <dynamicbox_conf.h>
 
 #include "debug.h"
 #include "slave_life.h"
@@ -38,7 +41,6 @@
 #include "fault_manager.h"
 #include "util.h"
 #include "conf.h"
-#include "provider_cmd_list.h"
 
 struct slave_rpc {
        Ecore_Timer *pong_timer;
@@ -126,7 +128,7 @@ static int slave_async_cb(pid_t pid, int handle, const struct packet *packet, vo
 
        if (!command) {
                ErrPrint("Command is NIL\n");
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        /*!
@@ -164,7 +166,7 @@ static int slave_async_cb(pid_t pid, int handle, const struct packet *packet, vo
 
 out:
        destroy_command(command);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static Eina_Bool command_consumer_cb(void *data)
@@ -260,7 +262,7 @@ static void prepend_command(struct command *command)
                return;
        }
 
-       s_info.command_consuming_timer = ecore_timer_add(PACKET_TIME, command_consumer_cb, NULL);
+       s_info.command_consuming_timer = ecore_timer_add(DYNAMICBOX_CONF_PACKET_TIME, command_consumer_cb, NULL);
        if (!s_info.command_consuming_timer) {
                ErrPrint("Failed to add command consumer\n");
                s_info.command_list = eina_list_remove(s_info.command_list, command);
@@ -276,7 +278,7 @@ static void push_command(struct command *command)
                return;
        }
 
-       s_info.command_consuming_timer = ecore_timer_add(PACKET_TIME, command_consumer_cb, NULL);
+       s_info.command_consuming_timer = ecore_timer_add(DYNAMICBOX_CONF_PACKET_TIME, command_consumer_cb, NULL);
        if (!s_info.command_consuming_timer) {
                ErrPrint("Failed to add command consumer\n");
                s_info.command_list = eina_list_remove(s_info.command_list, command);
@@ -297,7 +299,7 @@ static int slave_deactivate_cb(struct slave_node *slave, void *data)
                 * \note
                 * Return negative value will remove this callback from the event list of the slave
                 */
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (rpc->pong_timer) {
@@ -340,7 +342,7 @@ static int slave_deactivate_cb(struct slave_node *slave, void *data)
         */
        rpc->ping_count = 0;
        rpc->next_ping_count = 1;
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static Eina_Bool ping_timeout_cb(void *data)
@@ -391,7 +393,7 @@ HAPI int slave_rpc_async_request(struct slave_node *slave, const char *pkgname,
                }
 
                packet_unref(packet);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        command->ret_cb = ret_cb;
@@ -405,7 +407,7 @@ HAPI int slave_rpc_async_request(struct slave_node *slave, const char *pkgname,
                        ret_cb(slave, NULL, data);
                }
                destroy_command(command);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (rpc->handle < 0) {
@@ -416,7 +418,7 @@ HAPI int slave_rpc_async_request(struct slave_node *slave, const char *pkgname,
                        int ret;
                        DbgPrint("Activate slave forcely\n");
                        ret = slave_activate(slave);
-                       if (ret < 0 && ret != LB_STATUS_ERROR_ALREADY) {
+                       if (ret < 0 && ret != DBOX_STATUS_ERROR_ALREADY) {
 
                                if (ret_cb) {
                                        ret_cb(slave, NULL, data);
@@ -433,7 +435,7 @@ HAPI int slave_rpc_async_request(struct slave_node *slave, const char *pkgname,
                        rpc->pending_list = eina_list_append(rpc->pending_list, command);
                }
 
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (urgent) {
@@ -442,7 +444,7 @@ HAPI int slave_rpc_async_request(struct slave_node *slave, const char *pkgname,
                push_command(command);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_rpc_request_only(struct slave_node *slave, const char *pkgname, struct packet *packet, int urgent)
@@ -454,7 +456,7 @@ HAPI int slave_rpc_request_only(struct slave_node *slave, const char *pkgname, s
        if (!command) {
                ErrPrint("Failed to create a command\n");
                packet_unref(packet);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        command->ret_cb = NULL;
@@ -465,7 +467,7 @@ HAPI int slave_rpc_request_only(struct slave_node *slave, const char *pkgname, s
        if (!rpc) {
                ErrPrint("Slave has no RPC\n");
                destroy_command(command);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (rpc->handle < 0) {
@@ -477,7 +479,7 @@ HAPI int slave_rpc_request_only(struct slave_node *slave, const char *pkgname, s
 
                        DbgPrint("Activate slave forcely\n");
                        ret = slave_activate(slave);
-                       if (ret < 0 && ret != LB_STATUS_ERROR_ALREADY) {
+                       if (ret < 0 && ret != DBOX_STATUS_ERROR_ALREADY) {
                                destroy_command(command);
                                return ret;
                        }
@@ -489,7 +491,7 @@ HAPI int slave_rpc_request_only(struct slave_node *slave, const char *pkgname, s
                        rpc->pending_list = eina_list_append(rpc->pending_list, command);
                }
 
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        if (urgent) {
@@ -498,7 +500,7 @@ HAPI int slave_rpc_request_only(struct slave_node *slave, const char *pkgname, s
                push_command(command);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_rpc_update_handle(struct slave_node *slave, int handle)
@@ -508,7 +510,7 @@ HAPI int slave_rpc_update_handle(struct slave_node *slave, int handle)
 
        rpc = slave_data(slave, "rpc");
        if (!rpc) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        DbgPrint("SLAVE: New handle assigned for %d, %d\n", slave_pid(slave), handle);
@@ -517,7 +519,7 @@ HAPI int slave_rpc_update_handle(struct slave_node *slave, int handle)
                ecore_timer_del(rpc->pong_timer);
        }
 
-       rpc->pong_timer = ecore_timer_add(DEFAULT_PING_TIME, ping_timeout_cb, slave);
+       rpc->pong_timer = ecore_timer_add(DYNAMICBOX_CONF_DEFAULT_PING_TIME, ping_timeout_cb, slave);
        if (!rpc->pong_timer) {
                ErrPrint("Failed to add ping timer\n");
        }
@@ -534,7 +536,7 @@ HAPI int slave_rpc_update_handle(struct slave_node *slave, int handle)
                push_command(command);
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_rpc_init(struct slave_node *slave)
@@ -544,12 +546,12 @@ HAPI int slave_rpc_init(struct slave_node *slave)
        rpc = calloc(1, sizeof(*rpc));
        if (!rpc) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        if (slave_set_data(slave, "rpc", rpc) < 0) {
                DbgFree(rpc);
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        if (slave_event_callback_add(slave, SLAVE_EVENT_DEACTIVATE, slave_deactivate_cb, NULL) < 0) {
@@ -560,7 +562,7 @@ HAPI int slave_rpc_init(struct slave_node *slave)
        rpc->next_ping_count = 1;
        rpc->handle = -1;
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_rpc_fini(struct slave_node *slave)
@@ -569,7 +571,7 @@ HAPI int slave_rpc_fini(struct slave_node *slave)
 
        rpc = slave_del_data(slave, "rpc");
        if (!rpc) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        slave_event_callback_del(slave, SLAVE_EVENT_DEACTIVATE, slave_deactivate_cb, NULL);
@@ -579,7 +581,7 @@ HAPI int slave_rpc_fini(struct slave_node *slave)
        }
 
        DbgFree(rpc);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_rpc_ping(struct slave_node *slave)
@@ -589,12 +591,12 @@ HAPI int slave_rpc_ping(struct slave_node *slave)
        rpc = slave_data(slave, "rpc");
        if (!rpc) {
                ErrPrint("Slave RPC is not valid\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!slave_is_activated(slave)) {
                ErrPrint("Slave is not activated\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        rpc->ping_count++;
@@ -605,7 +607,7 @@ HAPI int slave_rpc_ping(struct slave_node *slave)
        rpc->next_ping_count++;
 
        ecore_timer_reset(rpc->pong_timer);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_rpc_ping_freeze(struct slave_node *slave)
@@ -615,16 +617,16 @@ HAPI int slave_rpc_ping_freeze(struct slave_node *slave)
        rpc = slave_data(slave, "rpc");
        if (!rpc) {
                ErrPrint("Slave RPC is not valid\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!slave_is_activated(slave)) {
                ErrPrint("Slave is not activated\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        ecore_timer_freeze(rpc->pong_timer);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int slave_rpc_ping_thaw(struct slave_node *slave)
@@ -634,16 +636,16 @@ HAPI int slave_rpc_ping_thaw(struct slave_node *slave)
        rpc = slave_data(slave, "rpc");
        if (!rpc) {
                ErrPrint("Slave RPC is not valid\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (!slave_is_activated(slave)) {
                ErrPrint("Slave is not activated\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        ecore_timer_thaw(rpc->pong_timer);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void slave_rpc_request_update(const char *pkgname, const char *id, const char *cluster, const char *category, const char *content, int force)
@@ -681,7 +683,7 @@ HAPI int slave_rpc_handle(struct slave_node *slave)
        rpc = slave_data(slave, "rpc");
        if (!rpc) {
                DbgPrint("Slave RPC is not initiated\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        return rpc->handle;
@@ -695,7 +697,7 @@ HAPI int slave_rpc_disconnect(struct slave_node *slave)
        packet = packet_create_noack((const char *)&cmd, "d", util_timestamp());
        if (!packet) {
                ErrPrint("Failed to create a packet\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        DbgPrint("Send disconnection request packet\n");
index 7c95b1c..f9c356e 100644 (file)
 #include <Eina.h>
 #include <Ecore.h>
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_conf.h>
 #else
 #include "lite-errno.h"
+#define DYNAMICBOX_CONF_IMAGE_PATH "/tmp/"
 #endif
 
 #include "util.h"
@@ -87,78 +89,13 @@ HAPI int util_check_ext(const char *filename, const char *check_ptr)
        name_len = strlen(filename);
        while (--name_len >= 0 && *check_ptr) {
                if (filename[name_len] != *check_ptr) {
-                       return LB_STATUS_ERROR_INVALID;
+                       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
                }
 
                check_ptr ++;
        }
 
-       return LB_STATUS_SUCCESS;
-}
-
-static inline int check_native_livebox(const char *pkgname)
-{
-       int len;
-       char *path;
-
-       len = strlen(pkgname) * 2;
-       len += strlen(ROOT_PATH);
-       len += strlen("%s/libexec/liblive-%s.so");
-
-       path = malloc(len + 1);
-       if (!path) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
-       }
-
-       snprintf(path, len, "%s%s/libexec/liblive-%s.so", ROOT_PATH, pkgname, pkgname);
-       if (access(path, F_OK | R_OK) != 0) {
-               ErrPrint("%s is not a valid package\n", pkgname);
-               DbgFree(path);
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       DbgFree(path);
-       return LB_STATUS_SUCCESS;
-}
-
-static inline int check_web_livebox(const char *pkgname)
-{
-       int len;
-       char *path;
-
-       len = strlen(pkgname) * 2;
-       len += strlen("/opt/usr/apps/%s/res/wgt/livebox/index.html");
-
-       path = malloc(len + 1);
-       if (!path) {
-               ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
-       }
-
-       snprintf(path, len, "/opt/usr/apps/%s/res/wgt/livebox/index.html", pkgname);
-       if (access(path, F_OK | R_OK) != 0) {
-               ErrPrint("%s is not a valid package\n", pkgname);
-               DbgFree(path);
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       DbgFree(path);
-       return LB_STATUS_SUCCESS;
-}
-
-HAPI int util_validate_livebox_package(const char *pkgname)
-{
-       if (!pkgname) {
-               ErrPrint("Invalid argument\n");
-               return LB_STATUS_ERROR_INVALID;
-       }
-
-       if (!check_native_livebox(pkgname) || !check_web_livebox(pkgname)) {
-               return LB_STATUS_SUCCESS;
-       }
-
-       return LB_STATUS_ERROR_INVALID;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int util_unlink(const char *filename)
@@ -168,28 +105,28 @@ HAPI int util_unlink(const char *filename)
        int ret;
 
        if (!filename) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        desclen = strlen(filename) + 6; /* .desc */
        descfile = malloc(desclen);
        if (!descfile) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        ret = snprintf(descfile, desclen, "%s.desc", filename);
        if (ret < 0) {
                ErrPrint("Error: %s\n", strerror(errno));
                DbgFree(descfile);
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        (void)unlink(descfile);
        DbgFree(descfile);
        (void)unlink(filename);
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI char *util_slavename(void)
@@ -437,18 +374,18 @@ HAPI int util_unlink_files(const char *folder)
 
        if (lstat(folder, &info) < 0) {
                ErrPrint("Error: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        if (!S_ISDIR(info.st_mode)) {
                ErrPrint("Error: %s is not a folder", folder);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        handle = opendir(folder);
        if (!handle) {
                ErrPrint("Error: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_IO;
+               return DBOX_STATUS_ERROR_IO_ERROR;
        }
 
        while ((entry = readdir(handle))) {
@@ -478,18 +415,18 @@ HAPI int util_unlink_files(const char *folder)
        if (closedir(handle) < 0) {
                ErrPrint("closedir: %s\n", strerror(errno));
        }
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void util_remove_emergency_disk(void)
 {
        int ret;
-       ret = umount(IMAGE_PATH);
+       ret = umount(DYNAMICBOX_CONF_IMAGE_PATH);
        if (ret < 0) {
                ErrPrint("umount: %s\n", strerror(errno));
        }
 
-       DbgPrint("Try to unmount[%s] %d\n", IMAGE_PATH, ret);
+       DbgPrint("Try to unmount[%s] %d\n", DYNAMICBOX_CONF_IMAGE_PATH, ret);
        s_info.emergency_mounted = 0;
 }
 
@@ -518,7 +455,7 @@ HAPI void util_prepare_emergency_disk(void)
                TAG_ERROR
        };
 
-       buf = strdup(EMERGENCY_DISK);
+       buf = strdup(DYNAMICBOX_CONF_EMERGENCY_DISK);
        if (!buf) {
                ErrPrint("Failed to prepare emergency disk info\n");
                return;
@@ -619,69 +556,67 @@ HAPI void util_prepare_emergency_disk(void)
 
        DbgPrint("source[%s] type[%s] option[%s]\n", source, type, option);
 
-       ret = mount(source, IMAGE_PATH, type, MS_NOSUID | MS_NOEXEC, option);
+       ret = mount(source, DYNAMICBOX_CONF_IMAGE_PATH, type, MS_NOSUID | MS_NOEXEC, option);
        DbgFree(buf);
        if (ret < 0) {
                ErrPrint("Failed to mount: %s\n", strerror(errno));
                return;
        }
 
-       MINIMUM_SPACE = 0;
-
-       ErrPrint("Disk space is not enough, use the tmpfs. Currently required minimum space is %lu bytes\n", MINIMUM_SPACE);
-       if (chmod(IMAGE_PATH, 0750) < 0) {
+       ErrPrint("Disk space is not enough, use the tmpfs. Currently required minimum space is %lu bytes\n", DYNAMICBOX_CONF_MINIMUM_SPACE);
+       if (chmod(DYNAMICBOX_CONF_IMAGE_PATH, 0750) < 0) {
                ErrPrint("chmod: %s\n", strerror(errno));
        }
 
-       if (chown(IMAGE_PATH, 5000, 5000) < 0) {
+       if (chown(DYNAMICBOX_CONF_IMAGE_PATH, 5000, 5000) < 0) {
                ErrPrint("chown: %s\n", strerror(errno));
        }
 
-       ret = smack_setlabel(IMAGE_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+       ret = smack_setlabel(DYNAMICBOX_CONF_IMAGE_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
        if (ret != 0) {
-               ErrPrint("Failed to set SMACK for %s (%d)\n", IMAGE_PATH, ret);
+               ErrPrint("Failed to set SMACK for %s (%d)\n", DYNAMICBOX_CONF_IMAGE_PATH, ret);
        } else {
-               ret = smack_setlabel(IMAGE_PATH, "1", SMACK_LABEL_TRANSMUTE);
-               DbgPrint("[%s] is successfully created (t: %d)\n", IMAGE_PATH, ret);
+               ret = smack_setlabel(DYNAMICBOX_CONF_IMAGE_PATH, "1", SMACK_LABEL_TRANSMUTE);
+               DbgPrint("[%s] is successfully created (t: %d)\n", DYNAMICBOX_CONF_IMAGE_PATH, ret);
        }
 
-       if (mkdir(ALWAYS_PATH, 0755) < 0) {
-               ErrPrint("mkdir: (%s) %s\n", ALWAYS_PATH, strerror(errno));
+       if (mkdir(DYNAMICBOX_CONF_ALWAYS_PATH, 0755) < 0) {
+               ErrPrint("mkdir: (%s) %s\n", DYNAMICBOX_CONF_ALWAYS_PATH, strerror(errno));
        } else {
-               if (chmod(ALWAYS_PATH, 0750) < 0) {
+               if (chmod(DYNAMICBOX_CONF_ALWAYS_PATH, 0750) < 0) {
                        ErrPrint("chmod: %s\n", strerror(errno));
                }
 
-               if (chown(ALWAYS_PATH, 5000, 5000) < 0) {
+               if (chown(DYNAMICBOX_CONF_ALWAYS_PATH, 5000, 5000) < 0) {
                        ErrPrint("chown: %s\n", strerror(errno));
                }
 
-               ret = smack_setlabel(ALWAYS_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+               ret = smack_setlabel(DYNAMICBOX_CONF_ALWAYS_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
                if (ret != 0) {
-                       ErrPrint("Failed to set SMACK for %s (%d)\n", ALWAYS_PATH, ret);
+                       ErrPrint("Failed to set SMACK for %s (%d)\n", DYNAMICBOX_CONF_ALWAYS_PATH, ret);
                } else {
-                       ret = smack_setlabel(ALWAYS_PATH, "1", SMACK_LABEL_TRANSMUTE);
-                       DbgPrint("[%s] is successfully created (t: %d)\n", ALWAYS_PATH, ret);
+                       ret = smack_setlabel(DYNAMICBOX_CONF_ALWAYS_PATH, "1", SMACK_LABEL_TRANSMUTE);
+                       DbgPrint("[%s] is successfully created (t: %d)\n", DYNAMICBOX_CONF_ALWAYS_PATH, ret);
                }
        }
 
-       if (mkdir(READER_PATH, 0755) < 0) {
-               ErrPrint("mkdir: (%s) %s\n", READER_PATH, strerror(errno));
+       if (mkdir(DYNAMICBOX_CONF_READER_PATH, 0755) < 0) {
+               ErrPrint("mkdir: (%s) %s\n", DYNAMICBOX_CONF_READER_PATH, strerror(errno));
        } else {
-               if (chmod(READER_PATH, 0750) < 0) {
+               if (chmod(DYNAMICBOX_CONF_READER_PATH, 0750) < 0) {
                        ErrPrint("chmod: %s\n", strerror(errno));
                }
 
-               if (chown(READER_PATH, 5000, 5000) < 0) {
+               if (chown(DYNAMICBOX_CONF_READER_PATH, 5000, 5000) < 0) {
                        ErrPrint("chown: %s\n", strerror(errno));
                }
 
-               ret = smack_setlabel(READER_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+               ret = smack_setlabel(DYNAMICBOX_CONF_READER_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
                if (ret != 0) {
-                       ErrPrint("Failed to set SMACK for %s (%d)\n", READER_PATH, ret);
+                       ErrPrint("Failed to set SMACK for %s (%d)\n", DYNAMICBOX_CONF_READER_PATH, ret);
                } else {
-                       ret = smack_setlabel(READER_PATH, "1", SMACK_LABEL_TRANSMUTE);
-                       DbgPrint("[%s] is successfully created (t: %d)\n", READER_PATH, ret);
+                       ret = smack_setlabel(DYNAMICBOX_CONF_READER_PATH, "1", SMACK_LABEL_TRANSMUTE);
+                       DbgPrint("[%s] is successfully created (t: %d)\n", DYNAMICBOX_CONF_READER_PATH, ret);
                }
        }
 
@@ -697,36 +632,36 @@ HAPI void util_setup_log_disk(void)
 {
        int ret;
 
-       if (access(SLAVE_LOG_PATH, R_OK | W_OK | X_OK) == 0) {
-               DbgPrint("[%s] is already accessible\n", SLAVE_LOG_PATH);
+       if (access(DYNAMICBOX_CONF_LOG_PATH, R_OK | W_OK | X_OK) == 0) {
+               DbgPrint("[%s] is already accessible\n", DYNAMICBOX_CONF_LOG_PATH);
                return;
        }
 
-       DbgPrint("Initiate the critical log folder [%s]\n", SLAVE_LOG_PATH);
-       if (mkdir(SLAVE_LOG_PATH, 0755) < 0) {
+       DbgPrint("Initiate the critical log folder [%s]\n", DYNAMICBOX_CONF_LOG_PATH);
+       if (mkdir(DYNAMICBOX_CONF_LOG_PATH, 0755) < 0) {
                ErrPrint("mkdir: %s\n", strerror(errno));
        } else {
-               if (chmod(SLAVE_LOG_PATH, 0750) < 0) {
+               if (chmod(DYNAMICBOX_CONF_LOG_PATH, 0750) < 0) {
                        ErrPrint("chmod: %s\n", strerror(errno));
                }
 
-               if (chown(SLAVE_LOG_PATH, 5000, 5000) < 0) {
+               if (chown(DYNAMICBOX_CONF_LOG_PATH, 5000, 5000) < 0) {
                        ErrPrint("chown: %s\n", strerror(errno));
                }
 
-               ret = smack_setlabel(SLAVE_LOG_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
+               ret = smack_setlabel(DYNAMICBOX_CONF_LOG_PATH, DATA_SHARE_LABEL, SMACK_LABEL_ACCESS);
                if (ret != 0) {
-                       ErrPrint("Failed to set SMACK for %s (%d)\n", SLAVE_LOG_PATH, ret);
+                       ErrPrint("Failed to set SMACK for %s (%d)\n", DYNAMICBOX_CONF_LOG_PATH, ret);
                } else {
-                       ret = smack_setlabel(SLAVE_LOG_PATH, "1", SMACK_LABEL_TRANSMUTE);
-                       DbgPrint("[%s] is successfully created (t: %d)\n", SLAVE_LOG_PATH, ret);
+                       ret = smack_setlabel(DYNAMICBOX_CONF_LOG_PATH, "1", SMACK_LABEL_TRANSMUTE);
+                       DbgPrint("[%s] is successfully created (t: %d)\n", DYNAMICBOX_CONF_LOG_PATH, ret);
                }
        }
 }
 
 HAPI int util_service_is_enabled(const char *tag)
 {
-       return !!strcasestr(SERVICES, tag);
+       return !!strcasestr(DYNAMICBOX_CONF_SERVICES, tag);
 }
 
 /* End of a file */
index a169f3f..4e4db7d 100644 (file)
@@ -1,7 +1,7 @@
 #include "util.h"
 
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #else
 #include "lite-errno.h"
 #endif
@@ -10,17 +10,17 @@ int util_screen_size_get(int *width, int *height)
 {
        *width = 0;
        *height = 0;
-       return LB_STATUS_ERROR_NOT_IMPLEMENTED;
+       return DBOX_STATUS_ERROR_NOT_IMPLEMENTED;
 }
 
 int util_screen_init(void)
 {
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 int util_screen_fini(void)
 {
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index e63e412..a05fefc 100644 (file)
@@ -2,7 +2,7 @@
 #include <dlog.h>
 
 #if defined(HAVE_LIVEBOX)
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #else
 #include "lite-errno.h"
 #endif
@@ -19,10 +19,10 @@ int util_screen_size_get(int *width, int *height)
 {
        if (!s_info.initialized) {
                ErrPrint("Not initialized\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
        ecore_x_window_size_get(0, width, height);
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 int util_screen_init(void)
index 12ec36a..143a186 100644 (file)
@@ -20,7 +20,7 @@
 #include <dlog.h>
 #include <aul.h>
 
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 #include <packet.h>
 
 #include <sys/smack.h>
@@ -89,7 +89,7 @@ static int put_reply_tcb(struct tcb *tcb, double seq)
        ctx = malloc(sizeof(*ctx));
        if (!ctx) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        ctx->tcb = tcb;
@@ -97,7 +97,7 @@ static int put_reply_tcb(struct tcb *tcb, double seq)
 
        s_info.context_list = eina_list_append(s_info.context_list, ctx);
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline struct tcb *get_reply_tcb(double seq)
@@ -162,7 +162,7 @@ static inline int put_pended_request(struct tcb *tcb, struct packet *packet)
        item = malloc(sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->tcb = tcb;
@@ -170,7 +170,7 @@ static inline int put_pended_request(struct tcb *tcb, struct packet *packet)
        if (!item->packet) {
                DbgFree(item);
                ErrPrint("Unable to ref packet\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        s_info.pending_list = eina_list_append(s_info.pending_list, item);
@@ -214,7 +214,7 @@ static int launch_timeout_cb(struct service_context *svc_ctx, void *data)
 static int launch_svc(struct service_context *svc_ctx)
 {
        pid_t pid;
-       int ret = LB_STATUS_SUCCESS;
+       int ret = DBOX_STATUS_ERROR_NONE;
 
        pid = aul_launch_app(SVC_PKG, NULL);
        switch (pid) {
@@ -225,7 +225,7 @@ static int launch_svc(struct service_context *svc_ctx)
        case AUL_R_ENOINIT:             /**< AUL handler NOT initialized */
        case AUL_R_ERROR:               /**< General error */
                ErrPrint("Failed to launch an app: %s(%d)\n", SVC_PKG, pid);
-               ret = LB_STATUS_ERROR_FAULT;
+               ret = DBOX_STATUS_ERROR_FAULT;
                break;
        case AUL_R_ETIMEOUT:            /**< Timeout */
        case AUL_R_ECOMM:               /**< Comunication Error */
@@ -237,7 +237,7 @@ static int launch_svc(struct service_context *svc_ctx)
                s_info.delay_launcher = service_common_add_timer(svc_ctx, LAUNCH_TIMEOUT, lazy_launcher_cb, NULL);
                if (!s_info.delay_launcher) {
                        ErrPrint("Unable to add delay launcher\n");
-                       ret = LB_STATUS_ERROR_FAULT;
+                       ret = DBOX_STATUS_ERROR_FAULT;
                }
                break;
        case AUL_R_LOCAL:               /**< Launch by himself */
@@ -295,20 +295,20 @@ static int service_thread_main(struct tcb *tcb, struct packet *packet, void *dat
                        }
                }
 
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        cmd = packet_command(packet);
        if (!cmd) {
                ErrPrint("Invalid packet\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        switch (packet_type(packet)) {
        case PACKET_REQ:
                if (!s_info.svc_daemon_is_launched) {
                        ret = launch_svc(tcb_svc_ctx(tcb));
-                       if (ret != LB_STATUS_SUCCESS) {
+                       if (ret != DBOX_STATUS_ERROR_NONE) {
                                goto reply_out;
                        }
                }
@@ -336,12 +336,12 @@ static int service_thread_main(struct tcb *tcb, struct packet *packet, void *dat
                if (!strcmp(cmd, "service_register")) {
                        if (!s_info.svc_daemon_is_launched) {
                                ErrPrint("Service daemon is not launched. but something tries to register a service\n");
-                               return LB_STATUS_ERROR_INVALID;
+                               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
                        }
 
                        if (s_info.svc_daemon) {
                                ErrPrint("Service daemon is already prepared\n");
-                               return LB_STATUS_ERROR_INVALID;
+                               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
                        }
 
                        if (s_info.launch_timer) {
@@ -358,7 +358,7 @@ static int service_thread_main(struct tcb *tcb, struct packet *packet, void *dat
                                        s_info.svc_daemon_pid = -1;
                                }
                                s_info.svc_daemon_is_launched = 0;
-                               return LB_STATUS_ERROR_FAULT;
+                               return DBOX_STATUS_ERROR_FAULT;
                        }
                        DbgPrint("TTL Timer is added: %p\n", s_info.ttl_timer);
 
@@ -385,10 +385,10 @@ static int service_thread_main(struct tcb *tcb, struct packet *packet, void *dat
                break;
        default:
                ErrPrint("Packet type is not valid[%s]\n", cmd);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 
 reply_out:
        ErrPrint("Error: %d\n", ret);
@@ -404,13 +404,13 @@ int utility_service_init(void)
 {
        if (s_info.svc_ctx) {
                ErrPrint("Already initialized\n");
-               return LB_STATUS_ERROR_ALREADY;
+               return DBOX_STATUS_ERROR_ALREADY;
        }
 
        s_info.svc_ctx = service_common_create(UTILITY_SOCKET, service_thread_main, NULL);
        if (!s_info.svc_ctx) {
                ErrPrint("Unable to activate service thread\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        if (smack_fsetlabel(service_common_fd(s_info.svc_ctx), UTILITY_SMACK_LABEL, SMACK_LABEL_IPOUT) != 0) {
@@ -418,7 +418,7 @@ int utility_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
@@ -427,24 +427,24 @@ int utility_service_init(void)
                        ErrPrint("Unable to set SMACK label(%d)\n", errno);
                        service_common_destroy(s_info.svc_ctx);
                        s_info.svc_ctx = NULL;
-                       return LB_STATUS_ERROR_FAULT;
+                       return DBOX_STATUS_ERROR_FAULT;
                }
        }
 
        DbgPrint("Successfully initiated\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 int utility_service_fini(void)
 {
        if (!s_info.svc_ctx) {
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        service_common_destroy(s_info.svc_ctx);
        s_info.svc_ctx = NULL;
        DbgPrint("Successfully Finalized\n");
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 /* End of a file */
index 204a22d..bb820e3 100644 (file)
@@ -31,7 +31,8 @@
 
 #include <gio/gio.h>
 #include <dlog.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
+#include <dynamicbox_conf.h>
 
 #include "conf.h"
 #include "debug.h"
@@ -72,7 +73,7 @@ static struct info {
 static inline void touch_paused_file(void)
 {
        int fd;
-       fd = creat(PAUSED_FILE, 0644);
+       fd = creat(DYNAMICBOX_CONF_PAUSED_FILE, 0644);
        if (fd >= 0) {
                if (close(fd) < 0) {
                        ErrPrint("close: %s\n", strerror(errno));
@@ -84,7 +85,7 @@ static inline void touch_paused_file(void)
 
 static inline void remove_paused_file(void)
 {
-       if (unlink(PAUSED_FILE) < 0) {
+       if (unlink(DYNAMICBOX_CONF_PAUSED_FILE) < 0) {
                ErrPrint("Unlink .live.paused: %s\n", strerror(errno));
        }
 }
@@ -101,14 +102,14 @@ static inline int get_pid(Ecore_X_Window win)
                                sizeof(int), &in_pid, &num) == EINA_FALSE) {
                if (ecore_x_netwm_pid_get(win, &pid) == EINA_FALSE) {
                        ErrPrint("Failed to get PID from a window 0x%X\n", win);
-                       return LB_STATUS_ERROR_INVALID;
+                       return DBOX_STATUS_ERROR_INVALID_PARAMETER;
                }
        } else if (in_pid) {
                pid = *(int *)in_pid;
                DbgFree(in_pid);
        } else {
                ErrPrint("Failed to get PID\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        return pid;
@@ -149,7 +150,7 @@ HAPI void xmonitor_handle_state_changes(void)
 
                touch_paused_file();
 
-               sqlite3_release_memory(SQLITE_FLUSH_MAX);
+               sqlite3_release_memory(DYNAMICBOX_CONF_SQLITE_FLUSH_MAX);
                malloc_trim(0);
        } else {
                remove_paused_file();
@@ -168,8 +169,8 @@ HAPI int xmonitor_update_state(int target_pid)
        struct client_node *client;
        int pid;
 
-       if (!USE_XMONITOR || target_pid < 0) {
-               return LB_STATUS_SUCCESS;
+       if (!DYNAMICBOX_CONF_USE_XMONITOR || target_pid < 0) {
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        win = ecore_x_window_focus_get();
@@ -182,7 +183,7 @@ HAPI int xmonitor_update_state(int target_pid)
                        DbgPrint("Client window has no focus now\n");
                        client_paused(client);
                }
-               return LB_STATUS_ERROR_NOT_EXIST;
+               return DBOX_STATUS_ERROR_NOT_EXIST;
        }
 
        client = client_find_by_pid(pid);
@@ -193,7 +194,7 @@ HAPI int xmonitor_update_state(int target_pid)
                        DbgPrint("Client window has no focus now\n");
                        client_paused(client);
                }
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
        if (target_pid != pid) {
@@ -205,7 +206,7 @@ HAPI int xmonitor_update_state(int target_pid)
        }
 
        xmonitor_handle_state_changes();
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static Eina_Bool client_cb(void *data, int type, void *event)
@@ -330,7 +331,7 @@ HAPI int xmonitor_pause(struct client_node *client)
        DbgPrint("%d is paused\n", client_pid(client));
        client_paused(client);
        xmonitor_handle_state_changes();
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int xmonitor_resume(struct client_node *client)
@@ -338,7 +339,7 @@ HAPI int xmonitor_resume(struct client_node *client)
        DbgPrint("%d is resumed\n", client_pid(client));
        client_resumed(client);
        xmonitor_handle_state_changes();
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 static inline void disable_xmonitor(void)
@@ -363,7 +364,7 @@ static inline int enable_xmonitor(void)
                                                        create_cb, NULL);
        if (!s_info.create_handler) {
                ErrPrint("Failed to add create event handler\n");
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        s_info.destroy_handler =
@@ -373,7 +374,7 @@ static inline int enable_xmonitor(void)
                ErrPrint("Failed to add destroy event handler\n");
                ecore_event_handler_del(s_info.create_handler);
                s_info.create_handler = NULL;
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        s_info.client_handler =
@@ -385,16 +386,16 @@ static inline int enable_xmonitor(void)
                ecore_event_handler_del(s_info.destroy_handler);
                s_info.create_handler = NULL;
                s_info.destroy_handler = NULL;
-               return LB_STATUS_ERROR_FAULT;
+               return DBOX_STATUS_ERROR_FAULT;
        }
 
        sniff_all_windows();
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int xmonitor_init(void)
 {
-       if (USE_XMONITOR) {
+       if (DYNAMICBOX_CONF_USE_XMONITOR) {
                int ret;
                ret = enable_xmonitor();
                if (ret < 0) {
@@ -409,12 +410,12 @@ HAPI int xmonitor_init(void)
                remove_paused_file();
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void xmonitor_fini(void)
 {
-       if (USE_XMONITOR) {
+       if (DYNAMICBOX_CONF_USE_XMONITOR) {
                disable_xmonitor();
        }
 }
@@ -426,7 +427,7 @@ HAPI int xmonitor_add_event_callback(enum xmonitor_event event, int (*cb)(void *
        item = malloc(sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->cb = cb;
@@ -442,10 +443,10 @@ HAPI int xmonitor_add_event_callback(enum xmonitor_event event, int (*cb)(void *
        default:
                ErrPrint("Invalid event type\n");
                DbgFree(item);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int xmonitor_del_event_callback(enum xmonitor_event event, int (*cb)(void *user_data), void *user_data)
@@ -460,7 +461,7 @@ HAPI int xmonitor_del_event_callback(enum xmonitor_event event, int (*cb)(void *
                        if (item->cb == cb && item->user_data == user_data) {
                                s_info.pause_list = eina_list_remove(s_info.pause_list, item);
                                DbgFree(item);
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -470,16 +471,16 @@ HAPI int xmonitor_del_event_callback(enum xmonitor_event event, int (*cb)(void *
                        if (item->cb == cb && item->user_data == user_data) {
                                s_info.resume_list = eina_list_remove(s_info.resume_list, item);
                                DbgFree(item);
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
        default:
                ErrPrint("Invalid event type\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI int xmonitor_is_paused(void)
index 488a3d3..7f1604b 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <gio/gio.h>
 #include <dlog.h>
-#include <livebox-errno.h>
+#include <dynamicbox_errno.h>
 
 #include "conf.h"
 #include "debug.h"
@@ -126,7 +126,7 @@ HAPI int xmonitor_update_state(int target_pid)
        struct client_node *client;
 
        if (!USE_XMONITOR || target_pid < 0) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        /*!
@@ -138,7 +138,7 @@ HAPI int xmonitor_update_state(int target_pid)
         */
 
        xmonitor_handle_state_changes();
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int xmonitor_pause(struct client_node *client)
@@ -146,7 +146,7 @@ HAPI int xmonitor_pause(struct client_node *client)
        DbgPrint("%d is paused\n", client_pid(client));
        client_paused(client);
        xmonitor_handle_state_changes();
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int xmonitor_resume(struct client_node *client)
@@ -154,13 +154,13 @@ HAPI int xmonitor_resume(struct client_node *client)
        DbgPrint("%d is resumed\n", client_pid(client));
        client_resumed(client);
        xmonitor_handle_state_changes();
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int xmonitor_init(void)
 {
        if (USE_XMONITOR) {
-               return LB_STATUS_SUCCESS;
+               return DBOX_STATUS_ERROR_NONE;
        }
 
        s_info.paused = client_is_all_paused() || setting_is_lcd_off();
@@ -170,7 +170,7 @@ HAPI int xmonitor_init(void)
                remove_paused_file();
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI void xmonitor_fini(void)
@@ -186,7 +186,7 @@ HAPI int xmonitor_add_event_callback(enum xmonitor_event event, int (*cb)(void *
        item = malloc(sizeof(*item));
        if (!item) {
                ErrPrint("Heap: %s\n", strerror(errno));
-               return LB_STATUS_ERROR_MEMORY;
+               return DBOX_STATUS_ERROR_OUT_OF_MEMORY;
        }
 
        item->cb = cb;
@@ -202,10 +202,10 @@ HAPI int xmonitor_add_event_callback(enum xmonitor_event event, int (*cb)(void *
        default:
                ErrPrint("Invalid event type\n");
                DbgFree(item);
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_SUCCESS;
+       return DBOX_STATUS_ERROR_NONE;
 }
 
 HAPI int xmonitor_del_event_callback(enum xmonitor_event event, int (*cb)(void *user_data), void *user_data)
@@ -220,7 +220,7 @@ HAPI int xmonitor_del_event_callback(enum xmonitor_event event, int (*cb)(void *
                        if (item->cb == cb && item->user_data == user_data) {
                                s_info.pause_list = eina_list_remove(s_info.pause_list, item);
                                DbgFree(item);
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
@@ -230,16 +230,16 @@ HAPI int xmonitor_del_event_callback(enum xmonitor_event event, int (*cb)(void *
                        if (item->cb == cb && item->user_data == user_data) {
                                s_info.resume_list = eina_list_remove(s_info.resume_list, item);
                                DbgFree(item);
-                               return LB_STATUS_SUCCESS;
+                               return DBOX_STATUS_ERROR_NONE;
                        }
                }
                break;
        default:
                ErrPrint("Invalid event type\n");
-               return LB_STATUS_ERROR_INVALID;
+               return DBOX_STATUS_ERROR_INVALID_PARAMETER;
        }
 
-       return LB_STATUS_ERROR_NOT_EXIST;
+       return DBOX_STATUS_ERROR_NOT_EXIST;
 }
 
 HAPI int xmonitor_is_paused(void)
index f94697a..d2b0274 100644 (file)
@@ -10,7 +10,7 @@ pkg_check_modules(info_pkgs REQUIRED
        ecore
        glib-2.0
        gio-2.0
-       livebox-service
+       dynamicbox_service
        xdamage
        xfixes
        x11
index 31bd6e2..7f46e19 100644 (file)
@@ -40,7 +40,7 @@
 #include <com-core_packet.h>
 #include <com-core.h>
 
-#include <livebox-service.h>
+#include <dynamicbox_service.h>
 
 #include <Ecore.h>
 
@@ -432,7 +432,7 @@ static void send_pkg_list(void)
        s_info.cmd = PKG_LIST;
        s_info.age++;
 
-       livebox_service_get_pkglist(pkglist_cb, s_info.targetdir);
+       dynamicbox_service_get_pkglist(pkglist_cb, s_info.targetdir);
 }
 
 static void send_inst_delete(void)
@@ -564,7 +564,7 @@ static void send_inst_list(const char *pkgname)
 
 static void help(void)
 {
-       printf("liveinfo - Livebox utility\n");
+       printf("liveinfo - DynamicBox utility\n");
        printf("------------------------------ [Option] ------------------------------\n");
        printf("-b Batch mode\n");
        printf("-x execute command\n");
@@ -701,38 +701,38 @@ static inline int do_stat(const char *cmd)
 
        switch (type){
        case PKG:
-               tmp = livebox_service_i18n_name(node_name(node), NULL);
+               tmp = dynamicbox_service_i18n_name(node_name(node), NULL);
                printf("Name: %s (", tmp);
                free(tmp);
 
-               i = livebox_service_is_enabled(node_name(node));
+               i = dynamicbox_service_is_enabled(node_name(node));
                printf("%s)\n", i ? "enabled" : "disabled");
 
-               tmp = livebox_service_i18n_icon(node_name(node), NULL);
+               tmp = dynamicbox_service_i18n_icon(node_name(node), NULL);
                printf("Icon: %s\n", tmp);
                free(tmp);
 
-               tmp = livebox_service_provider_name(node_name(node));
+               tmp = dynamicbox_service_provider_name(node_name(node));
                printf("Provider: %s (content:", tmp);
                free(tmp);
 
-               tmp = livebox_service_content(node_name(node));
+               tmp = dynamicbox_service_content(node_name(node));
                printf("%s)\n", tmp);
                free(tmp);
 
-               tmp = livebox_service_lb_script_path(node_name(node));
+               tmp = dynamicbox_service_dbox_script_path(node_name(node));
                printf("LB Script: %s (", tmp);
                free(tmp);
 
-               tmp = livebox_service_lb_script_group(node_name(node));
+               tmp = dynamicbox_service_dbox_script_group(node_name(node));
                printf("%s)\n", tmp);
                free(tmp);
 
-               tmp = livebox_service_pd_script_path(node_name(node));
+               tmp = dynamicbox_service_gbar_script_path(node_name(node));
                printf("PD Script: %s (", tmp);
                free(tmp);
 
-               tmp = livebox_service_pd_script_group(node_name(node));
+               tmp = dynamicbox_service_gbar_script_group(node_name(node));
                printf("%s)\n", tmp);
                free(tmp);
 
@@ -1925,7 +1925,7 @@ int main(int argc, char *argv[])
 
        com_core_add_event_callback(CONNECTOR_DISCONNECTED, disconnected_cb, NULL);
        com_core_add_event_callback(CONNECTOR_CONNECTED, connected_cb, NULL);
-       livebox_service_init();
+       dynamicbox_service_init();
 
        s_info.fd = com_core_packet_client_init(SOCKET_FILE, 0, s_table);
        if (s_info.fd < 0) {
@@ -1959,7 +1959,7 @@ int main(int argc, char *argv[])
        ecore_main_loop_begin();
 
        fini_directory();
-       livebox_service_fini();
+       dynamicbox_service_fini();
 
        if (s_info.fd > 0) {
                com_core_packet_client_fini(s_info.fd);