Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vlc_xml.h

00001 /*****************************************************************************
00002  * xml.h
00003  *****************************************************************************
00004  * Copyright (C) 2004 the VideoLAN team
00005  * $Id: vlc_xml.h 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Author: Gildas Bazin <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef _VLC_XML_H
00025 #define _VLC_XML_H
00026 
00027 # ifdef __cplusplus
00028 extern "C" {
00029 # endif
00030 
00031 struct xml_t
00032 {
00033     VLC_COMMON_MEMBERS
00034 
00035     /* Module properties */
00036     module_t  *p_module;
00037     xml_sys_t *p_sys;
00038 
00039     xml_reader_t * (*pf_reader_create) ( xml_t *, stream_t * );
00040     void (*pf_reader_delete) ( xml_reader_t * );
00041 
00042     void (*pf_catalog_load) ( xml_t *, const char * );
00043     void (*pf_catalog_add) ( xml_t *, const char *, const char *,
00044                                const char * );
00045 };
00046 
00047 #define xml_Create( a ) __xml_Create( VLC_OBJECT(a) )
00048 VLC_EXPORT( xml_t *, __xml_Create, ( vlc_object_t * ) );
00049 VLC_EXPORT( void, xml_Delete, ( xml_t * ) );
00050 
00051 #define xml_ReaderCreate( a, b ) a->pf_reader_create( a, b )
00052 #define xml_ReaderDelete( a, b ) a->pf_reader_delete( b )
00053 #define xml_CatalogLoad( a, b ) a->pf_catalog_load( a, b )
00054 #define xml_CatalogAdd( a, b, c, d ) a->pf_catalog_add( a, b, c, d )
00055 
00056 struct xml_reader_t
00057 {
00058     xml_t *p_xml;
00059     xml_reader_sys_t *p_sys;
00060 
00061     int (*pf_read) ( xml_reader_t * );
00062     int (*pf_node_type) ( xml_reader_t * );
00063     char * (*pf_name) ( xml_reader_t * );
00064     char * (*pf_value) ( xml_reader_t * );
00065     int (*pf_next_attr) ( xml_reader_t * );
00066 
00067     int (*pf_use_dtd) ( xml_reader_t *, vlc_bool_t );
00068 };
00069 
00070 #define xml_ReaderRead( a ) a->pf_read( a )
00071 #define xml_ReaderNodeType( a ) a->pf_node_type( a )
00072 #define xml_ReaderName( a ) a->pf_name( a )
00073 #define xml_ReaderValue( a ) a->pf_value( a )
00074 #define xml_ReaderNextAttr( a ) a->pf_next_attr( a )
00075 #define xml_ReaderUseDTD( a, b ) a->pf_use_dtd( a, b )
00076 
00077 #define XML_READER_NONE 0
00078 #define XML_READER_STARTELEM 1
00079 #define XML_READER_ENDELEM 2
00080 #define XML_READER_TEXT 3
00081 
00082 # ifdef __cplusplus
00083 }
00084 # endif
00085 
00086 #endif

Generated on Tue Dec 20 10:14:20 2005 for vlc-0.8.4a by  doxygen 1.4.2