From b83dd6b9f768e2f41dcc6cb9597e19373fe5f171 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Wed, 4 Dec 2013 13:59:49 +0900 Subject: [PATCH] Apply force option to trigger the updates forcely Change-Id: Ifc68719d3ed8f852ed9c39f2981a20da55d45806 --- include/livebox.h | 6 ++++-- packaging/liblivebox-viewer.spec | 2 +- src/livebox.c | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/livebox.h b/include/livebox.h index 3661b04..876d6e3 100644 --- a/include/livebox.h +++ b/include/livebox.h @@ -1221,6 +1221,7 @@ extern int livebox_unsubscribe_group(const char *cluster, const char *category); * \remarks N/A * \param[in] cluster Cluster ID * \param[in] category Sub-cluster ID + * \param[in] force 1 if the boxes should be updated even if they are paused * \return int * \retval LB_STATUS_ERROR_INVALID * \retval LB_STATUS_ERROR_FAULT @@ -1229,13 +1230,14 @@ extern int livebox_unsubscribe_group(const char *cluster, const char *category); * \post N/A * \see N/A */ -extern int livebox_refresh_group(const char *cluster, const char *category); +extern int livebox_refresh_group(const char *cluster, const char *category, int force); /*! * \brief Refresh a livebox * \details N/A * \remarks N/A * \param[in] handler + * \param[in] force 1 if the box should be updated even if it is paused * \return int * \retval LB_STATUS_ERROR_INVALID * \retval LB_STATUS_ERROR_FAULT @@ -1244,7 +1246,7 @@ extern int livebox_refresh_group(const char *cluster, const char *category); * \post N/A * \see N/A */ -extern int livebox_refresh(struct livebox *handler); +extern int livebox_refresh(struct livebox *handler, int force); /*! * \brief Pixmap Id of a livebox content diff --git a/packaging/liblivebox-viewer.spec b/packaging/liblivebox-viewer.spec index e8376e5..a82f2d7 100644 --- a/packaging/liblivebox-viewer.spec +++ b/packaging/liblivebox-viewer.spec @@ -1,6 +1,6 @@ Name: liblivebox-viewer Summary: Library for developing the application -Version: 0.14.8 +Version: 0.14.9 Release: 1 Group: HomeTF/Livebox License: Flora diff --git a/src/livebox.c b/src/livebox.c index 743ae95..897b0c6 100644 --- a/src/livebox.c +++ b/src/livebox.c @@ -2494,7 +2494,7 @@ 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) +EAPI int livebox_refresh(struct livebox *handler, int force) { struct packet *packet; @@ -2507,7 +2507,7 @@ EAPI int livebox_refresh(struct livebox *handler) return LB_STATUS_ERROR_INVALID; } - packet = packet_create_noack("update", "ss", handler->pkgname, handler->id); + packet = packet_create_noack("update", "ssi", handler->pkgname, handler->id, force); if (!packet) { ErrPrint("Failed to create a packet\n"); return LB_STATUS_ERROR_FAULT; @@ -2516,7 +2516,7 @@ EAPI int livebox_refresh(struct livebox *handler) return master_rpc_request_only(handler, packet); } -EAPI int livebox_refresh_group(const char *cluster, const char *category) +EAPI int livebox_refresh_group(const char *cluster, const char *category, int force) { struct packet *packet; @@ -2525,7 +2525,7 @@ EAPI int livebox_refresh_group(const char *cluster, const char *category) return LB_STATUS_ERROR_INVALID; } - packet = packet_create_noack("refresh_group", "ss", cluster, category); + packet = packet_create_noack("refresh_group", "ssi", cluster, category, force); if (!packet) { ErrPrint("Failed to create a packet\n"); return LB_STATUS_ERROR_FAULT; -- 2.7.4