[vlc-devel] [PATCH 03/19] configuration: move documentation to vlc_configuration.h
Kartik Ohri
kartikohri13 at gmail.com
Thu Jul 23 15:18:18 CEST 2020
Move documentation for VLC API methods config_SaveConfigFile,
config_AddIntf, config_RemoveIntf and config_ExistIntf from
src/config/file.c and src/config/intf.c to
include/vlc_configuration.h.
---
include/vlc_configuration.h | 12 ++++++++++++
src/config/file.c | 5 +----
src/config/intf.c | 6 ------
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index d4b8fc2473..bed303f58f 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -241,6 +241,10 @@ VLC_API ssize_t config_GetIntChoices(const char *, int64_t **values,
VLC_API ssize_t config_GetPszChoices(const char *,
char ***values, char ***texts) VLC_USED;
+/**
+ * Saves the in-memory configuration into a file.
+ * @return 0 on success, -1 on error.
+ */
VLC_API int config_SaveConfigFile( vlc_object_t * );
#define config_SaveConfigFile(a) config_SaveConfigFile(VLC_OBJECT(a))
@@ -320,8 +324,16 @@ typedef enum vlc_user_dir
VLC_API char * config_GetUserDir( vlc_userdir_t ) VLC_USED VLC_MALLOC;
+/* Adds an extra interface to the configuration */
VLC_API void config_AddIntf(const char *);
+
+/* Removes an extra interface from the configuration */
VLC_API void config_RemoveIntf(const char *);
+
+/*
+ * Returns true if the specified extra interface is present in the
+ * configuration, false if not
+ */
VLC_API bool config_ExistIntf(const char *) VLC_USED;
/****************************************************************************
diff --git a/src/config/file.c b/src/config/file.c
index ae6e8b9ce5..8e503c79b5 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -341,10 +341,7 @@ static int config_PrepareDir (vlc_object_t *obj)
}
#undef config_SaveConfigFile
-/**
- * Saves the in-memory configuration into a file.
- * @return 0 on success, -1 on error.
- */
+
int config_SaveConfigFile (vlc_object_t *p_this)
{
diff --git a/src/config/intf.c b/src/config/intf.c
index 14bb1d894d..2d853137d5 100644
--- a/src/config/intf.c
+++ b/src/config/intf.c
@@ -28,7 +28,6 @@
#include <assert.h>
-/* Adds an extra interface to the configuration */
void config_AddIntf( const char *psz_intf )
{
assert( psz_intf );
@@ -77,7 +76,6 @@ void config_AddIntf( const char *psz_intf )
free( psz_config );
}
-/* Removes an extra interface from the configuration */
void config_RemoveIntf( const char *psz_intf )
{
assert( psz_intf );
@@ -128,10 +126,6 @@ void config_RemoveIntf( const char *psz_intf )
free( psz_config );
}
-/*
- * Returns true if the specified extra interface is present in the
- * configuration, false if not
- */
bool config_ExistIntf( const char *psz_intf )
{
assert( psz_intf );
--
2.25.1
More information about the vlc-devel
mailing list