00001 /***************************************************************************** 00002 * Copyright (C) 2006 Daniel Stränger <vlc at schmaller dot de> 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00017 *******************************************************************************/ 00018 /** 00019 * \file modules/demux/playlist/xspf.h 00020 * \brief XSPF playlist import: prototypes, datatypes, defines 00021 */ 00022 00023 /* defines */ 00024 #define FREE_NAME() free(psz_name);psz_name=NULL; 00025 #define FREE_VALUE() free(psz_value);psz_value=NULL; 00026 #define FREE_ATT() FREE_NAME();FREE_VALUE() 00027 00028 enum { 00029 UNKNOWN_CONTENT, 00030 SIMPLE_CONTENT, 00031 COMPLEX_CONTENT 00032 }; 00033 00034 #define SIMPLE_INTERFACE (input_item_t *p_input,\ 00035 const char *psz_name,\ 00036 char *psz_value) 00037 #define COMPLEX_INTERFACE (demux_t *p_demux,\ 00038 input_item_node_t *p_input_node,\ 00039 xml_reader_t *p_xml_reader,\ 00040 const char *psz_element) 00041 00042 /* prototypes */ 00043 static bool parse_playlist_node COMPLEX_INTERFACE; 00044 static bool parse_tracklist_node COMPLEX_INTERFACE; 00045 static bool parse_track_node COMPLEX_INTERFACE; 00046 static bool parse_extension_node COMPLEX_INTERFACE; 00047 static bool parse_extitem_node COMPLEX_INTERFACE; 00048 static bool set_item_info SIMPLE_INTERFACE; 00049 static bool set_option SIMPLE_INTERFACE; 00050 static bool skip_element COMPLEX_INTERFACE; 00051 00052 /* datatypes */ 00053 typedef struct 00054 { 00055 const char *name; 00056 int type; 00057 union 00058 { 00059 bool (*smpl) SIMPLE_INTERFACE; 00060 bool (*cmplx) COMPLEX_INTERFACE; 00061 } pf_handler; 00062 } xml_elem_hnd_t;
1.5.6