Open SCAP Library
/home/pvrabec/project/openscap/openscap-0.7.4/src/OVAL/oval_results_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_RESULTS_IMPL_H_
00031 #define OVAL_RESULTS_IMPL_H_
00032 
00033 #include "public/oval_results.h"
00034 #include "oval_definitions_impl.h"
00035 #include "oval_system_characteristics_impl.h"
00036 #include "../common/util.h"
00037 
00038 OSCAP_HIDDEN_START;
00039 
00040 int oval_result_system_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
00041 xmlNode *oval_result_system_to_dom(struct oval_result_system *, struct oval_results_model *, struct oval_result_directives *, xmlDocPtr, xmlNode *);
00042 
00043 struct oval_result_test *oval_result_system_get_new_test(struct oval_result_system *, struct oval_test *);
00044 
00045 int oval_result_definition_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
00046 struct oval_result_definition *make_result_definition_from_oval_definition(struct oval_result_system *,
00047                                                                            struct oval_definition *);
00048 xmlNode *oval_result_definition_to_dom(struct oval_result_definition *, oval_result_directive_content_t, xmlDocPtr, xmlNode *);
00049 
00050 struct oval_result_test *make_result_test_from_oval_test(struct oval_result_system *system, struct oval_test *oval_test);
00051 
00052 int oval_result_test_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
00053 xmlNode *oval_result_test_to_dom(struct oval_result_test *, xmlDocPtr, xmlNode *);
00054 
00055 int oval_result_directives_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
00056 int oval_result_directives_to_dom(struct oval_result_directives *, xmlDoc *, xmlNode *);
00057 
00058 int oval_result_item_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
00059 xmlNode *oval_result_item_to_dom(struct oval_result_item *, xmlDocPtr, xmlNode *);
00060 
00061 struct oval_result_criteria_node *make_result_criteria_node_from_oval_criteria_node(struct oval_result_system *, struct oval_criteria_node *);
00062 
00063 int oval_result_criteria_node_parse(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
00064 xmlNode *oval_result_criteria_node_to_dom(struct oval_result_criteria_node *, xmlDocPtr, xmlNode *);
00065 
00066 oval_result_t oval_result_parse(xmlTextReaderPtr, char *, oval_result_t);
00067 
00068 struct oval_result_definition *oval_result_system_get_new_definition(struct oval_result_system *,
00069                                                                      struct oval_definition *);
00070 struct oval_result_test *oval_result_system_get_test(struct oval_result_system *, char *);
00071 
00072 struct oresults { 
00073         int true_cnt; 
00074         int false_cnt;
00075         int unknown_cnt;
00076         int error_cnt;
00077         int noteval_cnt;
00078         int notappl_cnt;
00079 };
00080 
00081 int ores_add_res(struct oresults *ores, oval_result_t res);
00082 void ores_clear(struct oresults *ores);
00083 oval_result_t ores_get_result_bychk(struct oresults *ores, oval_check_t check);
00084 oval_result_t ores_get_result_byopr(struct oresults *ores, oval_operator_t op);
00085 
00086 void oval_results_model_add_system(struct oval_results_model *, struct oval_result_system *);
00087 
00088 OSCAP_HIDDEN_END;
00089 
00090 #endif                          /* OVAL_RESULTS_IMPL_H_ */