[vlc-devel] [PATCH 16/19] update: move documentation to vlc_update.h
Kartik Ohri
kartikohri13 at gmail.com
Thu Jul 23 15:18:31 CEST 2020
Move documentation for VLC API method update_New,
update_Delete, update_Check and update_Download from
src/misc/update.c to include/vlc_update.h.
---
include/vlc_update.h | 32 ++++++++++++++++++++++++++++++++
src/misc/update.c | 28 +---------------------------
2 files changed, 33 insertions(+), 27 deletions(-)
diff --git a/include/vlc_update.h b/include/vlc_update.h
index 348104d38c..762d7f0fb0 100644
--- a/include/vlc_update.h
+++ b/include/vlc_update.h
@@ -48,12 +48,44 @@ struct update_release_t
typedef struct update_release_t update_release_t;
+/**
+ * Create a new update VLC struct
+ *
+ * \param p_this the calling vlc_object
+ * \return pointer to new update_t or NULL
+ */
VLC_API update_t * update_New( vlc_object_t * );
#define update_New( a ) update_New( VLC_OBJECT( a ) )
+
+/**
+ * Delete an update_t struct
+ *
+ * \param p_update update_t* pointer
+ * \return nothing
+ */
VLC_API void update_Delete( update_t * );
+
+/**
+ * Check for updates
+ *
+ * \param p_update pointer to update struct
+ * \param pf_callback pointer to a function to call when the update_check is finished
+ * \param p_data pointer to some datas to give to the callback
+ * \returns nothing
+ */
VLC_API void update_Check( update_t *, void (*callback)( void*, bool ), void * );
+
VLC_API bool update_NeedUpgrade( update_t * );
+
+/**
+ * Download the file given in the update_t
+ *
+ * \param p_update structure
+ * \param dir to store the download file
+ * \return nothing
+ */
VLC_API void update_Download( update_t *, const char* );
+
VLC_API update_release_t* update_GetRelease( update_t * );
/**
diff --git a/src/misc/update.c b/src/misc/update.c
index a4c9349153..f78c11cb43 100644
--- a/src/misc/update.c
+++ b/src/misc/update.c
@@ -94,12 +94,7 @@
*****************************************************************************/
#undef update_New
-/**
- * Create a new update VLC struct
- *
- * \param p_this the calling vlc_object
- * \return pointer to new update_t or NULL
- */
+
update_t *update_New( vlc_object_t *p_this )
{
update_t *p_update;
@@ -124,12 +119,6 @@ update_t *update_New( vlc_object_t *p_this )
return p_update;
}
-/**
- * Delete an update_t struct
- *
- * \param p_update update_t* pointer
- * \return nothing
- */
void update_Delete( update_t *p_update )
{
assert( p_update );
@@ -380,14 +369,6 @@ error:
static void* update_CheckReal( void * );
-/**
- * Check for updates
- *
- * \param p_update pointer to update struct
- * \param pf_callback pointer to a function to call when the update_check is finished
- * \param p_data pointer to some datas to give to the callback
- * \returns nothing
- */
void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void *p_data )
{
assert( p_update );
@@ -489,13 +470,6 @@ static char *size_str( uint64_t l_size )
static void* update_DownloadReal( void * );
-/**
- * Download the file given in the update_t
- *
- * \param p_update structure
- * \param dir to store the download file
- * \return nothing
- */
void update_Download( update_t *p_update, const char *psz_destdir )
{
assert( p_update );
--
2.25.1
More information about the vlc-devel
mailing list