• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

/home/pvrabec/project/openscap/openscap-0.6.4/src/OVAL/oval_parser_impl.h

Go to the documentation of this file.
00001 
00008 /*
00009  * Copyright 2009-2010 Red Hat Inc., Durham, North Carolina.
00010  * All Rights Reserved.
00011  *
00012  * This library is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Lesser General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2.1 of the License, or (at your option) any later version.
00016  *
00017  * This library is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Lesser General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Lesser General Public
00023  * License along with this library; if not, write to the Free Software
00024  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  * Authors:
00027  *      "David Niemoller" <David.Niemoller@g2-inc.com>
00028  */
00029 
00030 #ifndef OVAL_PARSER_H_
00031 #define OVAL_PARSER_H_
00032 
00033 #include <libxml/xmlreader.h>
00034 #include "public/oval_agent_api.h"
00035 #include "../common/util.h"
00036 
00037 OSCAP_HIDDEN_START;
00038 
00039 struct oval_parser_context {
00040         struct oval_definition_model *definition_model;
00041         struct oval_syschar_model *syschar_model;
00042         struct oval_results_model *results_model;
00043         //struct oval_sysinfo            *syschar_sysinfo;
00044         xmlTextReader *reader;
00045         void *user_data;
00046 };
00047 
00048 struct oval_definition_model *oval_parser_context_model(struct oval_parser_context
00049                                                         *context);
00050 
00051 int ovaldef_parser_parse(struct oval_definition_model *, xmlTextReader *, void *);
00052 int ovaldef_parse_node(xmlTextReaderPtr, struct oval_parser_context *);
00053 
00054 int ovalsys_parser_parse(struct oval_syschar_model *, xmlTextReader *, void *);
00055 
00056 struct oval_result_directives *ovalres_parser_parse(struct oval_results_model *, xmlTextReader *, void *);
00057 
00058 
00059 void libxml_error_handler(void *user, const char *message,
00060                           xmlParserSeverities severity, xmlTextReaderLocatorPtr locator);
00061 
00062 int oval_parser_boolean(const char *, int);
00063 
00064 int oval_parser_boolean_attribute(xmlTextReaderPtr reader, char *attname, int defval);
00065 
00066 int oval_parser_int_attribute(xmlTextReaderPtr reader, char *attname, int defval);
00067 
00068 int oval_parser_skip_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
00069 
00070 typedef void (*oval_xml_value_consumer) (char *, void *);
00071 
00072 int oval_parser_text_value(xmlTextReaderPtr reader,
00073                            struct oval_parser_context *context, oval_xml_value_consumer, void *);
00074 
00075 typedef int (*oval_xml_tag_parser) (xmlTextReaderPtr, struct oval_parser_context *, void *);
00076 
00077 int oval_parser_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_xml_tag_parser, void *);
00078 
00079 void oval_text_consumer(char *text, void *user);
00080 
00081 OSCAP_HIDDEN_END;
00082 
00083 #endif                          /* OVAL_PARSER_H_ */

Generated on Wed Oct 20 2010 for Open SCAP Library by  doxygen 1.7.1