From: Sung-jae Park Date: Thu, 27 Jun 2013 06:32:44 +0000 (+0900) Subject: Add new API for triggering the update event explictly. X-Git-Tag: accepted/tizen/mobile/20150530.065423^2~18^2~13^2~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3c7826b74a6a6a9395c154b5a84df2ef00ce287;p=apps%2Fnative%2Fwidget%2Fwidget.git Add new API for triggering the update event explictly. [model] Redwood [binary_type] AP [customer] Docomo/Orange/Open [issue#] N/A [problem] inotify is not enough to detect updated event. [cause] inotify merges multiple updated event to one event. [solution] Add new API for call it explictly from the livebox. [team] HomeTF [request] [horizontal_expansion] Change-Id: I3f446998e83a05b5ee863b7c9fe6ee5257afa0f8 --- diff --git a/include/livebox.h b/include/livebox.h index 05dcfe6..892885a 100644 --- a/include/livebox.h +++ b/include/livebox.h @@ -144,6 +144,14 @@ extern int livebox_desc_add_block(struct livebox_desc *handle, const char *id, c extern int livebox_desc_del_block(struct livebox_desc *handle, int idx); /*! + * \brief Notify the updated content to the provider. + * \param[in] id Instance Id + * \param[in] is_pd 1 if call for PD or 0(LB). + * \return int + */ +extern int livebox_content_is_updated(const char *id, int is_pd); + +/*! * \brief Replace '\n' with '
' * \param[in] str Source string * \return char* allocated string diff --git a/packaging/liblivebox.spec b/packaging/liblivebox.spec index a842e20..74b48fd 100644 --- a/packaging/liblivebox.spec +++ b/packaging/liblivebox.spec @@ -1,6 +1,6 @@ Name: liblivebox Summary: Library for the development of a livebox -Version: 0.3.3 +Version: 0.4.0 Release: 1 Group: HomeTF/Livebox License: Flora License diff --git a/src/livebox.c b/src/livebox.c index 9d207b6..f6a6732 100644 --- a/src/livebox.c +++ b/src/livebox.c @@ -41,6 +41,7 @@ */ extern const char *livebox_find_pkgname(const char *filename); extern int livebox_request_update_by_id(const char *uri); +extern int livebox_trigger_update_monitor(const char *id, int is_pd); struct block { unsigned int idx; @@ -827,4 +828,9 @@ PUBLIC int livebox_buffer_post_render(struct livebox_buffer *handle) return LB_STATUS_SUCCESS; } +PUBLIC int livebox_content_is_updated(const char *filename, int is_pd) +{ + return livebox_trigger_update_monitor(filename, is_pd); +} + /* End of a file */