Remove livebox
authorhyun lee <hyunn.lee@samsung.com>
Mon, 11 Aug 2014 04:48:40 +0000 (13:48 +0900)
committerhyun lee <hyunn.lee@samsung.com>
Mon, 11 Aug 2014 04:48:40 +0000 (13:48 +0900)
Signed-off-by: hyun lee <hyunn.lee@samsung.com>
lib/include/shortcut.h
lib/src/main.c

index 456d80a..25d6044 100755 (executable)
@@ -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
index 0d80925..5ec06d4 100755 (executable)
@@ -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)