00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef OVAL_RESULTS_IMPL_H_
00032 #define OVAL_RESULTS_IMPL_H_
00033
00034 #include "public/oval_results.h"
00035
00036 #include "oval_definitions_impl.h"
00037 #include "oval_system_characteristics_impl.h"
00038 #include "adt/oval_smc_impl.h"
00039
00040 #include "common/util.h"
00041
00042 OSCAP_HIDDEN_START;
00043
00044 int oval_result_system_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
00045 xmlNode *oval_result_system_to_dom(struct oval_result_system *, struct oval_results_model *, struct oval_directives_model *, xmlDocPtr, xmlNode *);
00046
00047 struct oval_result_test *oval_result_system_get_new_test(struct oval_result_system *, struct oval_test *, int variable_instance);
00048
00049 int oval_result_definition_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
00050 struct oval_result_definition *make_result_definition_from_oval_definition(struct oval_result_system *,
00051 struct oval_definition *,
00052 int variable_instance);
00053 xmlNode *oval_result_definition_to_dom(struct oval_result_definition *, oval_result_directive_content_t, xmlDocPtr, xmlNode *);
00054 int oval_result_definition_get_variable_instance_hint(const struct oval_result_definition *definition);
00055 void oval_result_definition_set_variable_instance_hint(struct oval_result_definition *definition, int new_hint_value);
00056
00057 struct oval_result_test *make_result_test_from_oval_test(struct oval_result_system *system, struct oval_test *oval_test, int variable_instance);
00058
00059 int oval_result_test_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
00060 xmlNode *oval_result_test_to_dom(struct oval_result_test *, xmlDocPtr, xmlNode *);
00061
00062
00063 int oval_result_item_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
00064 xmlNode *oval_result_item_to_dom(struct oval_result_item *, xmlDocPtr, xmlNode *);
00065
00066 struct oval_result_criteria_node *make_result_criteria_node_from_oval_criteria_node(struct oval_result_system *, struct oval_criteria_node *, int variable_instance);
00067
00068 int oval_result_criteria_node_parse(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
00069 xmlNode *oval_result_criteria_node_to_dom(struct oval_result_criteria_node *, xmlDocPtr, xmlNode *);
00070
00071 oval_result_t oval_result_parse(xmlTextReaderPtr, char *, oval_result_t);
00072
00073 struct oval_result_definition *oval_result_system_get_new_definition(struct oval_result_system *,
00074 struct oval_definition *,
00075 int variable_instance);
00076 struct oval_result_test *oval_result_system_get_test(struct oval_result_system *, char *);
00077
00078 struct oresults {
00079 int true_cnt;
00080 int false_cnt;
00081 int unknown_cnt;
00082 int error_cnt;
00083 int noteval_cnt;
00084 int notappl_cnt;
00085 };
00086
00087 int ores_add_res(struct oresults *ores, oval_result_t res);
00088 void ores_clear(struct oresults *ores);
00089 oval_result_t ores_get_result_bychk(struct oresults *ores, oval_check_t check);
00090 oval_result_t ores_get_result_byopr(struct oresults *ores, oval_operator_t op);
00091
00092 void oval_results_model_add_system(struct oval_results_model *, struct oval_result_system *);
00093
00094 struct oval_result_definition_iterator *oval_result_definition_iterator_new(struct oval_smc *mapping);
00095 struct oval_result_test_iterator *oval_result_test_iterator_new(struct oval_smc *mapping);
00096
00097 const char *oval_result_test_get_id(const struct oval_result_test *test);
00098
00099 OSCAP_HIDDEN_END;
00100
00101 #endif