ofdbus/dbus-glib/dbus/dbus-gparser.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /* -*- mode: C; c-file-style: "gnu" -*- */
       
     2 /* dbus-gparser.h parse DBus description files
       
     3  *
       
     4  * Copyright (C) 2003  Red Hat, Inc.
       
     5  *
       
     6  * Licensed under the Academic Free License version 2.1
       
     7  * 
       
     8  * This program is free software; you can redistribute it and/or modify
       
     9  * it under the terms of the GNU General Public License as published by
       
    10  * the Free Software Foundation; either version 2 of the License, or
       
    11  * (at your option) any later version.
       
    12  *
       
    13  * This program is distributed in the hope that it will be useful,
       
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    16  * GNU General Public License for more details.
       
    17  * 
       
    18  * You should have received a copy of the GNU General Public License
       
    19  * along with this program; if not, write to the Free Software
       
    20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    21  *
       
    22  */
       
    23 #ifndef DBUS_GLIB_PARSER_H
       
    24 #define DBUS_GLIB_PARSER_H
       
    25 
       
    26 #include <dbus/dbus.h>
       
    27 #include <glib.h>
       
    28 #include "dbus-gidl.h"
       
    29 
       
    30 G_BEGIN_DECLS
       
    31 
       
    32 typedef struct Parser Parser;
       
    33 
       
    34 Parser*  parser_new           (void);
       
    35 Parser*  parser_ref           (Parser      *parser);
       
    36 void     parser_unref         (Parser      *parser);
       
    37 gboolean parser_check_doctype (Parser      *parser,
       
    38                                const char  *doctype,
       
    39                                GError     **error);
       
    40 gboolean parser_start_element (Parser      *parser,
       
    41                                const char  *element_name,
       
    42                                const char **attribute_names,
       
    43                                const char **attribute_values,
       
    44                                GError     **error);
       
    45 gboolean parser_end_element   (Parser      *parser,
       
    46                                const char  *element_name,
       
    47                                GError     **error);
       
    48 gboolean parser_content       (Parser      *parser,
       
    49                                const char  *content,
       
    50                                int          len,
       
    51                                GError     **error);
       
    52 gboolean parser_finished      (Parser      *parser,
       
    53                                GError     **error);
       
    54 
       
    55 NodeInfo* description_load_from_file   (const char  *filename,
       
    56                                         GError     **error);
       
    57 NodeInfo* description_load_from_string (const char  *str,
       
    58                                         int          len,
       
    59                                         GError     **error);
       
    60 
       
    61 NodeInfo* parser_get_nodes (Parser *parser);
       
    62 
       
    63 G_END_DECLS
       
    64 
       
    65 #endif /* DBUS_GLIB_GPARSER_H */