1 #ifndef __PARSER_OPML 2 #define __PARSER_OPML 3 4 #include <expat.h> 5 6 typedef void (*OPMLProcessFunc) (gchar *title, gchar *url, gint depth, 7 gpointer data); 8 9 struct _OPMLProcessCtx { 10 XML_Parser parser; 11 guint depth; 12 guint prevdepth; 13 GString *str; 14 OPMLProcessFunc user_function; 15 gboolean body_reached; 16 gpointer user_data; 17 }; 18 19 typedef struct _OPMLProcessCtx OPMLProcessCtx; 20 21 void opml_process(gchar *path, OPMLProcessFunc function, gpointer data); 22 23 #endif /* __PARSER_OPML */ 24