X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_xml.h;h=df11ba5ee0454f796c34fef8c92a1a025ae463cb;hb=e80f251e5bccdb29d5e213d8712c79f5953142f4;hp=4dac9492f1fa73ab325e9f163c2400db873c2aa8;hpb=99f02e92782d40eb07808b687b572faf5f6129f5;p=vlc diff --git a/include/vlc_xml.h b/include/vlc_xml.h index 4dac9492f1..df11ba5ee0 100644 --- a/include/vlc_xml.h +++ b/include/vlc_xml.h @@ -46,9 +46,9 @@ struct xml_t const char * ); }; -VLC_EXPORT( xml_t *, xml_Create, ( vlc_object_t * ) LIBVLC_USED ); +VLC_API xml_t * xml_Create( vlc_object_t * ) VLC_USED; #define xml_Create( a ) xml_Create( VLC_OBJECT(a) ) -VLC_EXPORT( void, xml_Delete, ( xml_t * ) ); +VLC_API void xml_Delete( xml_t * ); static inline void xml_CatalogLoad( xml_t *xml, const char *catalog ) { @@ -70,43 +70,26 @@ struct xml_reader_t stream_t *p_stream; module_t *p_module; - int (*pf_read) ( xml_reader_t * ); - int (*pf_node_type) ( xml_reader_t * ); - char * (*pf_name) ( xml_reader_t * ); - char * (*pf_value) ( xml_reader_t * ); - int (*pf_next_attr) ( xml_reader_t * ); + int (*pf_next_node) ( xml_reader_t *, const char ** ); + const char *(*pf_next_attr) ( xml_reader_t *, const char ** ); int (*pf_use_dtd) ( xml_reader_t * ); }; -VLC_EXPORT( xml_reader_t *, xml_ReaderCreate, (vlc_object_t *, stream_t *) LIBVLC_USED ); +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) -VLC_EXPORT( void, xml_ReaderDelete, (xml_reader_t *) ); -VLC_EXPORT( xml_reader_t *, xml_ReaderReset, (xml_reader_t *, stream_t *) LIBVLC_USED ); +VLC_API void xml_ReaderDelete(xml_reader_t *); +VLC_API xml_reader_t * xml_ReaderReset(xml_reader_t *, stream_t *) VLC_USED; -static inline int xml_ReaderRead( xml_reader_t *reader ) +static inline int xml_ReaderNextNode( xml_reader_t *reader, const char **pval ) { - return reader->pf_read( reader ); + return reader->pf_next_node( reader, pval ); } -static inline int xml_ReaderNodeType( xml_reader_t *reader ) +static inline const char *xml_ReaderNextAttr( xml_reader_t *reader, + const char **pval ) { - return reader->pf_node_type( reader ); -} - -static inline char *xml_ReaderName( xml_reader_t *reader ) -{ - return reader->pf_name( reader ); -} - -static inline char *xml_ReaderValue( xml_reader_t *reader ) -{ - return reader->pf_value( reader ); -} - -static inline int xml_ReaderNextAttr( xml_reader_t *reader ) -{ - return reader->pf_next_attr( reader ); + return reader->pf_next_attr( reader, pval ); } static inline int xml_ReaderUseDTD( xml_reader_t *reader )