|
Open SCAP Library
|
00001 00008 /* 00009 * Copyright 2009--2013 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 * Šimon Lukašík 00029 */ 00030 00031 #ifndef OVAL_RESULTS_IMPL_H_ 00032 #define OVAL_RESULTS_IMPL_H_ 00033 00034 #include "oval_results.h" 00035 00036 #include "OVAL/oval_definitions_impl.h" 00037 #include "OVAL/oval_system_characteristics_impl.h" 00038 #include "OVAL/adt/oval_smc_impl.h" 00039 00040 #include "common/util.h" 00041 #include "source/oscap_source_priv.h" 00042 00043 OSCAP_HIDDEN_START; 00044 00045 int oval_result_system_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *); 00046 xmlNode *oval_result_system_to_dom(struct oval_result_system *, struct oval_results_model *, struct oval_directives_model *, xmlDocPtr, xmlNode *); 00047 00048 struct oval_result_test *oval_result_system_get_new_test(struct oval_result_system *, struct oval_test *, int variable_instance); 00049 00050 int oval_result_definition_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *); 00051 struct oval_result_definition *make_result_definition_from_oval_definition(struct oval_result_system *, 00052 struct oval_definition *, 00053 int variable_instance); 00054 xmlNode *oval_result_definition_to_dom(struct oval_result_definition *, oval_result_directive_content_t, xmlDocPtr, xmlNode *); 00055 int oval_result_definition_get_variable_instance_hint(const struct oval_result_definition *definition); 00056 void oval_result_definition_set_variable_instance_hint(struct oval_result_definition *definition, int new_hint_value); 00057 00058 struct oval_result_test *make_result_test_from_oval_test(struct oval_result_system *system, struct oval_test *oval_test, int variable_instance); 00059 00060 int oval_result_test_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *); 00061 xmlNode *oval_result_test_to_dom(struct oval_result_test *, xmlDocPtr, xmlNode *); 00062 00063 00064 int oval_result_item_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *); 00065 xmlNode *oval_result_item_to_dom(struct oval_result_item *, xmlDocPtr, xmlNode *); 00066 00067 struct oval_result_criteria_node *make_result_criteria_node_from_oval_criteria_node(struct oval_result_system *, struct oval_criteria_node *, int variable_instance); 00068 00069 int oval_result_criteria_node_parse(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *); 00070 oval_result_t oval_result_criteria_node_negate(struct oval_result_criteria_node *node, oval_result_t result); 00071 xmlNode *oval_result_criteria_node_to_dom(struct oval_result_criteria_node *, xmlDocPtr, xmlNode *); 00072 00073 oval_result_t oval_result_parse(xmlTextReaderPtr, char *, oval_result_t); 00074 00075 struct oval_result_definition *oval_result_system_get_new_definition(struct oval_result_system *, 00076 struct oval_definition *, 00077 int variable_instance); 00078 struct oval_result_test *oval_result_system_get_test(struct oval_result_system *, char *); 00079 00080 struct oresults { 00081 int true_cnt; 00082 int false_cnt; 00083 int unknown_cnt; 00084 int error_cnt; 00085 int noteval_cnt; 00086 int notappl_cnt; 00087 }; 00088 00089 int ores_add_res(struct oresults *ores, oval_result_t res); 00090 void ores_clear(struct oresults *ores); 00091 oval_result_t ores_get_result_bychk(struct oresults *ores, oval_check_t check); 00092 oval_result_t ores_get_result_byopr(struct oresults *ores, oval_operator_t op); 00093 00094 struct oval_results_model *oval_results_model_new_with_probe_session(struct oval_definition_model *definition_model, struct oval_syschar_model **syschar_models, struct oval_probe_session *probe_session); 00095 struct oval_probe_session *oval_results_model_get_probe_session(struct oval_results_model *model); 00096 void oval_results_model_add_system(struct oval_results_model *, struct oval_result_system *); 00097 00098 struct oval_result_definition_iterator *oval_result_definition_iterator_new(struct oval_smc *mapping); 00099 struct oval_result_test_iterator *oval_result_test_iterator_new(struct oval_smc *mapping); 00100 00101 const char *oval_result_test_get_id(const struct oval_result_test *test); 00102 00103 00104 struct oval_result_definition *oval_result_system_prepare_definition(struct oval_result_system *sys, const char *id); 00105 00106 OSCAP_HIDDEN_END; 00107 00108 #endif /* OVAL_RESULTS_IMPL_H_ */
1.7.3