00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 #ifndef DBUS_GLIB_PARSER_H
00024 #define DBUS_GLIB_PARSER_H
00025 
00026 #include <dbus/dbus.h>
00027 #include <glib.h>
00028 #include "dbus-gidl.h"
00029 
00030 G_BEGIN_DECLS
00031 
00032 typedef struct Parser Parser;
00033 
00034 Parser*  parser_new           (void);
00035 Parser*  parser_ref           (Parser      *parser);
00036 void     parser_unref         (Parser      *parser);
00037 gboolean parser_check_doctype (Parser      *parser,
00038                                const char  *doctype,
00039                                GError     **error);
00040 gboolean parser_start_element (Parser      *parser,
00041                                const char  *element_name,
00042                                const char **attribute_names,
00043                                const char **attribute_values,
00044                                GError     **error);
00045 gboolean parser_end_element   (Parser      *parser,
00046                                const char  *element_name,
00047                                GError     **error);
00048 gboolean parser_content       (Parser      *parser,
00049                                const char  *content,
00050                                int          len,
00051                                GError     **error);
00052 gboolean parser_finished      (Parser      *parser,
00053                                GError     **error);
00054 
00055 NodeInfo* description_load_from_file   (const char  *filename,
00056                                         GError     **error);
00057 NodeInfo* description_load_from_string (const char  *str,
00058                                         int          len,
00059                                         GError     **error);
00060 
00061 NodeInfo* parser_get_nodes (Parser *parser);
00062 
00063 G_END_DECLS
00064 
00065 #endif