From c22dd92b73ea6af325028fc139d2fc3ba2ad0b05 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Thu, 30 Oct 2014 10:40:10 +0900 Subject: [PATCH] Replace livebox with dynamicbox [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 --- CMakeLists.txt | 6 +- data/CMakeLists.txt | 2 +- data/abi.ini | 3 - data/dump_dynamicbox.sh | 8 + data/dump_livebox.sh | 7 - data/wayland.mobile.conf.ini | 6 +- data/wayland.wearable.conf.ini | 6 +- data/x11.mobile.320x480.conf.ini | 6 +- data/x11.mobile.480x800.conf.ini | 8 +- data/x11.mobile.conf.ini | 10 +- data/x11.wearable.360x480.conf.ini | 6 +- data/x11.wearable.conf.ini | 6 +- include/buffer_handler.h | 23 +- include/conf.h | 179 +- include/debug.h | 2 + include/group.h | 4 +- include/instance.h | 115 +- include/io.h | 6 +- include/lite-errno.h | 53 +- include/package.h | 51 +- include/parser.h | 18 +- include/provider_cmd_list.h | 155 - include/util.h | 1 - packaging/data-provider-master.manifest | 10 +- packaging/data-provider-master.spec | 53 +- .../CMakeLists.txt | 6 +- .../dynamicbox.xml | 34 +- .../include/dlist.h | 0 {pkgmgr_livebox => pkgmgr_dynamicbox}/src/dlist.c | 0 .../src/service_register.c | 629 ++- src/abi.c | 18 +- src/badge_service.c | 16 +- src/buffer_handler.c | 643 ++- src/buffer_handler_wayland.c | 112 +- src/client_life.c | 57 +- src/client_rpc.c | 26 +- src/conf.c | 1048 +--- src/critical_log.c | 27 +- src/dead_monitor.c | 1 + src/event.c | 98 +- src/fault_manager.c | 32 +- src/file_service.c | 52 +- src/group.c | 92 +- src/instance.c | 5089 ++++++++++---------- src/io.c | 135 +- src/liveinfo.c | 6 +- src/main.c | 54 +- src/notification_service.c | 16 +- src/package.c | 544 +-- src/parser.c | 193 +- src/pkgmgr.c | 78 +- src/script_handler.c | 203 +- src/server.c | 3147 ++++++------ src/service_common.c | 16 +- src/setting.c | 5 +- src/shortcut_service.c | 16 +- src/slave_life.c | 148 +- src/slave_rpc.c | 76 +- src/util.c | 167 +- src/util_wayland.c | 8 +- src/util_x11.c | 6 +- src/utility_service.c | 46 +- src/xmonitor.c | 55 +- src/xmonitor_wayland.c | 28 +- util_liveinfo/CMakeLists.txt | 2 +- util_liveinfo/src/liveinfo.c | 28 +- 66 files changed, 6406 insertions(+), 7295 deletions(-) mode change 100755 => 100644 CMakeLists.txt create mode 100644 data/dump_dynamicbox.sh delete mode 100644 data/dump_livebox.sh delete mode 100644 include/provider_cmd_list.h rename {pkgmgr_livebox => pkgmgr_dynamicbox}/CMakeLists.txt (83%) rename pkgmgr_livebox/livebox.xml => pkgmgr_dynamicbox/dynamicbox.xml (64%) rename {pkgmgr_livebox => pkgmgr_dynamicbox}/include/dlist.h (100%) rename {pkgmgr_livebox => pkgmgr_dynamicbox}/src/dlist.c (100%) rename {pkgmgr_livebox => pkgmgr_dynamicbox}/src/service_register.c (78%) mode change 100755 => 100644 src/notification_service.c mode change 100755 => 100644 src/shortcut_service.c diff --git a/CMakeLists.txt b/CMakeLists.txt old mode 100755 new mode 100644 index 004e6ee..ecc8ea1 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 215fbaa..56d64c4 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -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) diff --git a/data/abi.ini b/data/abi.ini index 8d92eaa..d2dbfb1 100644 --- a/data/abi.ini +++ b/data/abi.ini @@ -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 index 0000000..1791a31 --- /dev/null +++ b/data/dump_dynamicbox.sh @@ -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 index 2fb6c32..0000000 --- a/data/dump_livebox.sh +++ /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 diff --git a/data/wayland.mobile.conf.ini b/data/wayland.mobile.conf.ini index b2c700c..468b696 100644 --- a/data/wayland.mobile.conf.ini +++ b/data/wayland.mobile.conf.ini @@ -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 diff --git a/data/wayland.wearable.conf.ini b/data/wayland.wearable.conf.ini index c286ce0..034a081 100644 --- a/data/wayland.wearable.conf.ini +++ b/data/wayland.wearable.conf.ini @@ -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 diff --git a/data/x11.mobile.320x480.conf.ini b/data/x11.mobile.320x480.conf.ini index cb15dc9..4811331 100644 --- a/data/x11.mobile.320x480.conf.ini +++ b/data/x11.mobile.320x480.conf.ini @@ -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 diff --git a/data/x11.mobile.480x800.conf.ini b/data/x11.mobile.480x800.conf.ini index 9ec20a6..ebea45a 100644 --- a/data/x11.mobile.480x800.conf.ini +++ b/data/x11.mobile.480x800.conf.ini @@ -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 diff --git a/data/x11.mobile.conf.ini b/data/x11.mobile.conf.ini index 9c3dafd..e152a07 100644 --- a/data/x11.mobile.conf.ini +++ b/data/x11.mobile.conf.ini @@ -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 diff --git a/data/x11.wearable.360x480.conf.ini b/data/x11.wearable.360x480.conf.ini index f29bff4..f540ec3 100644 --- a/data/x11.wearable.360x480.conf.ini +++ b/data/x11.wearable.360x480.conf.ini @@ -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 diff --git a/data/x11.wearable.conf.ini b/data/x11.wearable.conf.ini index 24b54f6..6119d57 100644 --- a/data/x11.wearable.conf.ini +++ b/data/x11.wearable.conf.ini @@ -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 diff --git a/include/buffer_handler.h b/include/buffer_handler.h index 2b0e8cd..ff5cf1d 100644 --- a/include/buffer_handler.h +++ b/include/buffer_handler.h @@ -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 /*! * \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 diff --git a/include/conf.h b/include/conf.h index b37d71a..a4d0603 100644 --- a/include/conf.h +++ b/include/conf.h @@ -15,176 +15,14 @@ */ 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 */ diff --git a/include/debug.h b/include/debug.h index cc4911f..ac1a079 100644 --- a/include/debug.h +++ b/include/debug.h @@ -67,4 +67,6 @@ extern FILE *__file_log_fp; #define PERF_MARK(tag) #endif +#define HAPI __attribute__((visibility("hidden"))) + /* End of a file */ diff --git a/include/group.h b/include/group.h index 04dfddd..8cda595 100644 --- a/include/group.h +++ b/include/group.h @@ -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); diff --git a/include/instance.h b/include/instance.h index e189382..781b7a8 100644 --- a/include/instance.h +++ b/include/instance.h @@ -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 @@ -37,21 +37,21 @@ * 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 diff --git a/include/io.h b/include/io.h index c3d83b4..5647d52 100644 --- a/include/io.h +++ b/include/io.h @@ -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 */ diff --git a/include/lite-errno.h b/include/lite-errno.h index a46b9f5..3046725 100644 --- a/include/lite-errno.h +++ b/include/lite-errno.h @@ -14,47 +14,48 @@ * 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)) /*! * \} diff --git a/include/package.h b/include/package.h index dd5d3f6..492739f 100644 --- a/include/package.h +++ b/include/package.h @@ -14,21 +14,6 @@ * 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); diff --git a/include/parser.h b/include/parser.h index 16e297a..71349e5 100644 --- a/include/parser.h +++ b/include/parser.h @@ -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 index 91e5771..0000000 --- a/include/provider_cmd_list.h +++ /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 diff --git a/include/util.h b/include/util.h index 4f32a76..56348f1 100644 --- a/include/util.h +++ b/include/util.h @@ -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); diff --git a/packaging/data-provider-master.manifest b/packaging/data-provider-master.manifest index ee86158..e0992e3 100644 --- a/packaging/data-provider-master.manifest +++ b/packaging/data-provider-master.manifest @@ -42,7 +42,7 @@ - + @@ -65,16 +65,16 @@ - - + + - + - + diff --git a/packaging/data-provider-master.spec b/packaging/data-provider-master.spec index 6c86741..ec21600 100755 --- a/packaging/data-provider-master.spec +++ b/packaging/data-provider-master.spec @@ -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 < - - + + /usr/share/icons/small/com.samsung.live-nicesj.png - Content information - + Content information + - com.samsung.nicesj + com.samsung.nicesj - com.samsung.nicesj + com.samsung.nicesj - 1x1 - 2x1 - 2x2 + + 1x1 + + 2x1 + 2x2 4x1 4x2 - 4x3 - 4x4 + 4x3 + 4x4 - + 21x21 23x21 23x23 - + 0x0