Update trigger_update for sending the new content 49/12449/1
authorSung-jae Park <nicesj.park@samsung.com>
Fri, 15 Nov 2013 07:45:59 +0000 (16:45 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Fri, 15 Nov 2013 07:45:59 +0000 (16:45 +0900)
Change-Id: Idbc5df0cfab74b7586772b55338ce59b7c53edc4

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

index 2b04b30..ab658e6 100644 (file)
@@ -197,6 +197,26 @@ extern int livebox_service_need_frame(const char *pkgid, int size_type);
 extern int livebox_service_trigger_update(const char *pkgname, const char *id, const char *cluster, const char *category, int force);
 
 /*!
+ * \brief Trigger the update event for given livebox instance
+ * \details N/A
+ * \remarks N/A
+ * \param[in] pkgname Livebox package name
+ * \param[in] id Set NULL if you don't know what the Id is. Then every instance of given pkgname will be triggered its update event.
+ * \param[in] cluster Cluster name. Default NULL
+ * \param[in] category Category name, Default NULL
+ * \param[in] content New content information, Default NULL
+ * \param[in] force 1 if you want to update your livebox even if the provider is paused or 0. 0 is default
+ * \return int
+ * \retval LB_STATUS_ERROR_INVALID Invalid argument
+ * \retval LB_STATUS_ERROR_CANCEL Provider is paused, so this update request is canceld.(ignored), if you want to make update forcely, use force=1
+ * \retval LB_STATUS_ERROR_MEMORY Memory is not enough to make request
+ * \retval LB_STATUS_ERROR_FAULT Failed to create a request packet
+ * \retval LB_STATUS_SUCCESS Successfully requested
+ * \see N/A
+ */
+extern int livebox_service_trigger_update_with_content(const char *pkgname, const char *id, const char *cluster, const char *category, const char *content, int force);
+
+/*!
  * \brief Change the update period of given livebox instance
  * \details N/A
  * \remarks N/A
index 2bce796..548b5a5 100644 (file)
@@ -1,5 +1,5 @@
 Name:          liblivebox-service
-Version:       0.5.7
+Version:       0.5.9
 Release:       1
 License:       Flora
 Summary:       Service API for gathering installed livebox information
@@ -62,7 +62,6 @@ make %{?_smp_mflags}
 %files devel
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%manifest %{name}.manifest
 %{_includedir}/livebox-service/livebox-service.h
 %{_includedir}/livebox-service/livebox-errno.h
 %{_libdir}/pkgconfig/*.pc
index e4b581a..2045765 100644 (file)
@@ -440,7 +440,7 @@ EAPI int livebox_service_change_period(const char *pkgname, const char *id, doub
        return ret;
 }
 
-EAPI int livebox_service_trigger_update(const char *pkgname, const char *id, const char *cluster, const char *category, int force)
+EAPI int livebox_service_trigger_update_with_content(const char *pkgname, const char *id, const char *cluster, const char *category, const char *content, int force)
 {
        struct packet *packet;
        struct packet *result;
@@ -474,7 +474,7 @@ EAPI int livebox_service_trigger_update(const char *pkgname, const char *id, con
                category = "default";
        }
 
-       packet = packet_create("service_update", "ssss", pkgname, uri, cluster, category);
+       packet = packet_create("service_update", "sssss", pkgname, uri, cluster, category, content);
        /*!
         * \note
         * "free" function accepts NULL
@@ -503,6 +503,11 @@ EAPI int livebox_service_trigger_update(const char *pkgname, const char *id, con
        return ret;
 }
 
+EAPI int livebox_service_trigger_update(const char *pkgname, const char *id, const char *cluster, const char *category, int force)
+{
+       return livebox_service_trigger_update_with_content(pkgname, id, cluster, category, NULL, force);
+}
+
 /*!
  * pkgid == Package Id (not the livebox id)
  */