[vlc-devel] [PATCH 19/19] xml: move documentation to vlc_xml.h

Kartik Ohri kartikohri13 at gmail.com
Thu Jul 23 15:18:34 CEST 2020


Move documentation for VLC API methods xml_Create,
xml_Delete, xml_ReaderCreate and xml_ReaderDelete from
src/misc/xml.c to include/vlc_xml.h.
---
 include/vlc_xml.h | 21 +++++++++++++++++++++
 src/misc/xml.c    | 19 -------------------
 2 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/include/vlc_xml.h b/include/vlc_xml.h
index 9e0b48e147..ad16472f85 100644
--- a/include/vlc_xml.h
+++ b/include/vlc_xml.h
@@ -46,8 +46,18 @@ struct xml_t
                             const char * );
 };
 
+/**
+ * xml_Create:
+ *
+ * Create an instance of an XML parser.
+ * Returns NULL on error.
+ */
 VLC_API xml_t * xml_Create( vlc_object_t * ) VLC_USED;
 #define xml_Create( a ) xml_Create( VLC_OBJECT(a) )
+
+/**
+ * xml_Delete: Deletes an instance of xml_t
+ */
 VLC_API void xml_Delete( xml_t * );
 
 static inline void xml_CatalogLoad( xml_t *xml, const char *catalog )
@@ -77,8 +87,19 @@ struct xml_reader_t
     int (*pf_is_empty) ( xml_reader_t * );
 };
 
+/**
+ * Creates an XML reader.
+ * @param obj parent VLC object
+ * @param stream stream to read XML from
+ * @return NULL on error.
+ */
 VLC_API xml_reader_t * xml_ReaderCreate(vlc_object_t *, stream_t *) VLC_USED;
 #define xml_ReaderCreate( a, s ) xml_ReaderCreate(VLC_OBJECT(a), s)
+
+/**
+ * Deletes an XML reader.
+ * @param reader XML reader created with xml_ReaderCreate().
+ */
 VLC_API void xml_ReaderDelete(xml_reader_t *);
 
 static inline int xml_ReaderNextNode( xml_reader_t *reader, const char **pval )
diff --git a/src/misc/xml.c b/src/misc/xml.c
index 6afbec139c..901d8303aa 100644
--- a/src/misc/xml.c
+++ b/src/misc/xml.c
@@ -30,12 +30,6 @@
 #include "../libvlc.h"
 
 #undef xml_Create
-/*****************************************************************************
- * xml_Create:
- *****************************************************************************
- * Create an instance of an XML parser.
- * Returns NULL on error.
- *****************************************************************************/
 xml_t *xml_Create( vlc_object_t *p_this )
 {
     xml_t *p_xml;
@@ -53,9 +47,6 @@ xml_t *xml_Create( vlc_object_t *p_this )
     return p_xml;
 }
 
-/*****************************************************************************
- * xml_Delete: Deletes an instance of xml_t
- *****************************************************************************/
 void xml_Delete( xml_t *p_xml )
 {
     module_unneed( p_xml, p_xml->p_module );
@@ -64,12 +55,6 @@ void xml_Delete( xml_t *p_xml )
 
 
 #undef xml_ReaderCreate
-/**
- * Creates an XML reader.
- * @param obj parent VLC object
- * @param stream stream to read XML from
- * @return NULL on error.
- */
 xml_reader_t *xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
 {
     xml_reader_t *reader;
@@ -88,10 +73,6 @@ xml_reader_t *xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
 }
 
 
-/**
- * Deletes an XML reader.
- * @param reader XML reader created with xml_ReaderCreate().
- */
 void xml_ReaderDelete(xml_reader_t *reader)
 {
     module_unneed(reader, reader->p_module);
-- 
2.25.1



More information about the vlc-devel mailing list