Add a new interface for requesting update a box
authorSung-jae Park <nicesj.park@samsung.com>
Wed, 6 Feb 2013 14:02:35 +0000 (14:02 +0000)
committerSung-jae Park <nicesj.park@samsung.com>
Wed, 6 Feb 2013 14:02:35 +0000 (14:02 +0000)
Change-Id: Ia2b20c4d8f1fcd7702ffaaa9627873aacbbed950

include/livebox.h
packaging/liblivebox-viewer.spec
src/livebox.c

index 55266e4..daaf920 100644 (file)
@@ -89,7 +89,6 @@ enum content_event_type {
        PD_KEY_DOWN                     = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_DOWN,
        PD_KEY_UP                       = CONTENT_EVENT_PD_MASK | CONTENT_EVENT_KEY_MASK | CONTENT_EVENT_KEY_UP,
 
-
        CONTENT_EVENT_MAX       = 0xFFFFFFFF,
 };
 
@@ -607,6 +606,13 @@ extern int livebox_unsubscribe_group(const char *cluster, const char *category);
 extern int livebox_refresh_group(const char *cluster, const char *category);
 
 /*!
+ * \brief Refresh a livebox
+ * \param[in] handler
+ * \return int Success 0 or negative value
+ */
+extern int livebox_refresh(struct livebox *handler);
+
+/*!
  * \brief Pixmap Id of a livebox content
  * \param[in] handler
  * \return int
index 7c571d3..88b6cb3 100644 (file)
@@ -1,6 +1,6 @@
 Name: liblivebox-viewer
 Summary: Library for developing the application.
-Version: 0.8.13
+Version: 0.9.0
 Release: 1
 Group: framework/livebox
 License: Flora License
index 055778b..a3f9038 100644 (file)
@@ -1957,6 +1957,27 @@ EAPI int livebox_unsubscribe_group(const char *cluster, const char *category)
        return master_rpc_request_only(NULL, packet);
 }
 
+EAPI int livebox_refresh(struct livebox *handler)
+{
+       struct packet *packet;
+
+       if (!handler) {
+               ErrPrint("Hnalder is NIL\n");
+               return -EINVAL;
+       }
+
+       if (handler->state != CREATE || !handler->id)
+               return -EINVAL;
+
+       packet = packet_create_noack("update", "ss", handler->pkgname, handler->id);
+       if (!packet) {
+               ErrPrint("Failed to create a packet\n");
+               return -EFAULT;
+       }
+
+       return master_rpc_request_only(handler, packet);
+}
+
 EAPI int livebox_refresh_group(const char *cluster, const char *category)
 {
        struct packet *packet;