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

/home/pvrabec/project/openscap/openscap-0.6.6/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_variable_model *variable_model;
00044         //struct oval_sysinfo            *syschar_sysinfo;
00045         xmlTextReader *reader;
00046         void *user_data;
00047 };
00048 
00049 struct oval_definition_model *oval_parser_context_model(struct oval_parser_context
00050                                                         *context);
00051 
00052 int ovaldef_parser_parse(struct oval_definition_model *, xmlTextReader *, void *);
00053 int ovaldef_parse_node(xmlTextReaderPtr, struct oval_parser_context *);
00054 
00055 int ovalsys_parser_parse(struct oval_syschar_model *, xmlTextReader *, void *);
00056 
00057 struct oval_result_directives *ovalres_parser_parse(struct oval_results_model *, xmlTextReader *, void *);
00058 
00059 
00060 void libxml_error_handler(void *user, const char *message,
00061                           xmlParserSeverities severity, xmlTextReaderLocatorPtr locator);
00062 
00063 int oval_parser_boolean(const char *, int);
00064 
00065 int oval_parser_boolean_attribute(xmlTextReaderPtr reader, char *attname, int defval);
00066 
00067 int oval_parser_int_attribute(xmlTextReaderPtr reader, char *attname, int defval);
00068 
00069 int oval_parser_skip_tag(xmlTextReaderPtr reader, struct oval_parser_context *context);
00070 
00071 typedef void (*oval_xml_value_consumer) (char *, void *);
00072 
00073 int oval_parser_text_value(xmlTextReaderPtr reader,
00074                            struct oval_parser_context *context, oval_xml_value_consumer, void *);
00075 
00076 typedef int (*oval_xml_tag_parser) (xmlTextReaderPtr, struct oval_parser_context *, void *);
00077 
00078 int oval_parser_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, oval_xml_tag_parser, void *);
00079 
00080 void oval_text_consumer(char *text, void *user);
00081 
00082 OSCAP_HIDDEN_END;
00083 
00084 #endif                          /* OVAL_PARSER_H_ */

Generated on Thu Dec 9 2010 for Open SCAP Library by  doxygen 1.7.1