diff options
author | hyun lee <hyunn.lee@samsung.com> | 2014-08-11 13:48:40 +0900 |
---|---|---|
committer | hyun lee <hyunn.lee@samsung.com> | 2014-08-11 13:48:40 +0900 |
commit | ce278b8fe9b0a779475d389105d0d831b341ddfe (patch) | |
tree | 4fcf89238cf08b46dde0fc0687ead9c23464ebab | |
parent | cd4546635d418acae793ebc5244246ee7dabc286 (diff) | |
download | shortcut-ce278b8fe9b0a779475d389105d0d831b341ddfe.tar.gz shortcut-ce278b8fe9b0a779475d389105d0d831b341ddfe.tar.bz2 shortcut-ce278b8fe9b0a779475d389105d0d831b341ddfe.zip |
Remove livebox
Signed-off-by: hyun lee <hyunn.lee@samsung.com>
-rwxr-xr-x | lib/include/shortcut.h | 43 | ||||
-rwxr-xr-x | lib/src/main.c | 115 |
2 files changed, 0 insertions, 158 deletions
diff --git a/lib/include/shortcut.h b/lib/include/shortcut.h index 456d80a..25d6044 100755 --- a/lib/include/shortcut.h +++ b/lib/include/shortcut.h @@ -101,22 +101,6 @@ enum shortcut_type { DYNAMICBOX_TYPE_EASY_3x1 = 0x30020000, /**< Easy mode 3x2 */ DYNAMICBOX_TYPE_EASY_3x3 = 0x30040000, /**< Easy mode 3x3 */ DYNAMICBOX_TYPE_UNKNOWN = 0x1FFF0000, /**< Error */ - - LIVEBOX_TYPE_DEFAULT = 0x10000000, /**< @internal Type mask for default dynamicbox */ - LIVEBOX_TYPE_EASY_DEFAULT = 0x30000000, /**< @internal Type mask for easy mode dynamicbox */ - LIVEBOX_TYPE_1x1 = 0x10010000, /**< @internal 1x1 */ - LIVEBOX_TYPE_2x1 = 0x10020000, /**< @internal 2x1 */ - LIVEBOX_TYPE_2x2 = 0x10040000, /**< @internal 2x2 */ - LIVEBOX_TYPE_4x1 = 0x10080000, /**< @internal 4x1 */ - LIVEBOX_TYPE_4x2 = 0x10100000, /**< @internal 4x2 */ - LIVEBOX_TYPE_4x3 = 0x10200000, /**< @internal 4x3 */ - LIVEBOX_TYPE_4x4 = 0x10400000, /**< @internal 4x4 */ - LIVEBOX_TYPE_4x5 = 0x11000000, /**< @internal 4x5 */ - LIVEBOX_TYPE_4x6 = 0x12000000, /**< @internal 4x6 */ - LIVEBOX_TYPE_EASY_1x1 = 0x30010000, /**< @internal Easy mode 1x1 */ - LIVEBOX_TYPE_EASY_3x1 = 0x30020000, /**< @internal Easy mode 3x2 */ - LIVEBOX_TYPE_EASY_3x3 = 0x30040000, /**< @internal Easy mode 3x3 */ - LIVEBOX_TYPE_UNKNOWN = 0x1FFF0000 /**< @internal Error */ }; /** @@ -152,12 +136,6 @@ enum shortcut_error_e { #define ADD_TO_HOME_IS_DYNAMICBOX(type) (!!((type) & 0x10000000)) /** - * @internal - * @brief It will be removed - */ -#define ADD_TO_HOME_IS_LIVEBOX(type) (!!((type) & 0x10000000)) - -/** * @brief Definition for a macro to check the request type. * @since_tizen 2.3 * @param[in] type Request type @@ -180,12 +158,6 @@ enum shortcut_error_e { #define ADD_TO_HOME_IS_REMOVE_DYNAMICBOX(type) (!!((type) & DYNAMICBOX_REMOVE)) /** - * @internal - * @brief It will be removed - */ -#define ADD_TO_HOME_IS_REMOVE_LIVEBOX(type) (!!((type) & DYNAMICBOX_REMOVE)) - -/** * @brief Definition for a macro to check the request status. * @since_tizen 2.3 * @param[in] type Status @@ -477,12 +449,6 @@ extern int shortcut_get_list(const char *appid, int (*cb)(const char *appid, con extern int add_to_home_dynamicbox(const char *appid, const char *name, int type, const char *content, const char *icon, double period, int allow_duplicate, result_cb_t result_cb, void *data); /** - * @internal - * @brief It will be removed - */ -extern int add_to_home_livebox(const char *appid, const char *name, int type, const char *content, const char *icon, double period, int allow_duplicate, result_cb_t result_cb, void *data); - -/** * * @brief The application, which supporting the add_to_home feature, should invoke this. * @@ -623,15 +589,6 @@ extern int add_to_home_remove_shortcut(const char *appid, const char *name, cons */ extern int add_to_home_remove_dynamicbox(const char *appid, const char *name, result_cb_t result_cb, void *data); -/** - * @internal - * @brief It will be removed - */ -extern int add_to_home_remove_livebox(const char *appid, const char *name, result_cb_t result_cb, void *data); - - - - #ifdef __cplusplus } #endif diff --git a/lib/src/main.c b/lib/src/main.c index 0d80925..5ec06d4 100755 --- a/lib/src/main.c +++ b/lib/src/main.c @@ -489,65 +489,7 @@ EAPI int add_to_home_remove_dynamicbox(const char *appid, const char *name, resu return SHORTCUT_ERROR_NONE; } -EAPI int add_to_home_remove_livebox(const char *appid, const char *name, result_cb_t result_cb, void *data) -{ - struct packet *packet; - struct result_cb_item *item; - int ret; - if (!appid || !name) { - ErrPrint("Invalid argument\n"); - return SHORTCUT_ERROR_INVALID_PARAMETER; - } - - if (!s_info.initialized) { - s_info.initialized = 1; - com_core_add_event_callback(CONNECTOR_DISCONNECTED, disconnected_cb, NULL); - } - - if (s_info.client_fd < 0) { - static struct method service_table[] = { - { - .cmd = NULL, - .handler = NULL, - }, - }; - - - s_info.client_fd = com_core_packet_client_init(s_info.socket_file, 0, service_table); - if (s_info.client_fd < 0) { - ErrPrint("Failed to make connection\n"); - return SHORTCUT_ERROR_COMM; - } - } - - item = malloc(sizeof(*item)); - if (!item) { - ErrPrint("Heap: %s\n", strerror(errno)); - return SHORTCUT_ERROR_OUT_OF_MEMORY; - } - - item->result_cb = result_cb; - item->data = data; - - packet = packet_create("rm_dynamicbox", "iss", getpid(), appid, name); - if (!packet) { - ErrPrint("Failed to build a packet\n"); - free(item); - return SHORTCUT_ERROR_FAULT; - } - - ret = com_core_packet_async_send(s_info.client_fd, packet, 0.0f, shortcut_send_cb, item); - if (ret < 0) { - packet_destroy(packet); - free(item); - com_core_packet_client_fini(s_info.client_fd); - s_info.client_fd = SHORTCUT_ERROR_INVALID_PARAMETER; - return SHORTCUT_ERROR_COMM; - } - - return SHORTCUT_ERROR_NONE; -} EAPI int add_to_home_shortcut(const char *appid, const char *name, int type, const char *content, const char *icon, int allow_duplicate, result_cb_t result_cb, void *data) { @@ -680,63 +622,6 @@ EAPI int add_to_home_dynamicbox(const char *appid, const char *name, int type, c return SHORTCUT_ERROR_NONE; } -EAPI int add_to_home_livebox(const char *appid, const char *name, int type, const char *content, const char *icon, double period, int allow_duplicate, result_cb_t result_cb, void *data) -{ - struct packet *packet; - struct result_cb_item *item; - int ret; - - if (!appid || !ADD_TO_HOME_IS_DYNAMICBOX(type)) { - ErrPrint("Invalid type is used for adding a dynamicbox\n"); - return SHORTCUT_ERROR_INVALID_PARAMETER; - } - - if (!s_info.initialized) { - s_info.initialized = 1; - com_core_add_event_callback(CONNECTOR_DISCONNECTED, disconnected_cb, NULL); - } - - if (s_info.client_fd < 0) { - static struct method service_table[] = { - { - .cmd = NULL, - .handler = NULL, - }, - }; - - s_info.client_fd = com_core_packet_client_init(s_info.socket_file, 0, service_table); - if (s_info.client_fd < 0) { - return SHORTCUT_ERROR_COMM; - } - } - - item = malloc(sizeof(*item)); - if (!item) { - ErrPrint("Heap: %s\n", strerror(errno)); - return SHORTCUT_ERROR_OUT_OF_MEMORY; - } - - item->result_cb = result_cb; - item->data = data; - - packet = packet_create("add_dynamicbox", "ississdi", getpid(), appid, name, type, content, icon, period, allow_duplicate); - if (!packet) { - ErrPrint("Failed to build a packet\n"); - free(item); - return SHORTCUT_ERROR_FAULT; - } - - ret = com_core_packet_async_send(s_info.client_fd, packet, 0.0f, shortcut_send_cb, item); - if (ret < 0) { - packet_destroy(packet); - free(item); - com_core_packet_client_fini(s_info.client_fd); - s_info.client_fd = SHORTCUT_ERROR_INVALID_PARAMETER; - return SHORTCUT_ERROR_COMM; - } - - return SHORTCUT_ERROR_NONE; -} static inline int open_db(void) |