Open SCAP Library
oval_results_impl.h
Go to the documentation of this file.
1 
8 /*
9  * Copyright 2009-2010 Red Hat Inc., Durham, North Carolina.
10  * All Rights Reserved.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  * Authors:
27  * "David Niemoller" <David.Niemoller@g2-inc.com>
28  */
29 
30 #ifndef OVAL_RESULTS_IMPL_H_
31 #define OVAL_RESULTS_IMPL_H_
32 
33 #include "public/oval_results.h"
34 
35 #include "oval_definitions_impl.h"
37 
38 #include "common/util.h"
39 
40 OSCAP_HIDDEN_START;
41 
42 int oval_result_system_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
43 xmlNode *oval_result_system_to_dom(struct oval_result_system *, struct oval_results_model *, struct oval_directives_model *, xmlDocPtr, xmlNode *);
44 
45 struct oval_result_test *oval_result_system_get_new_test(struct oval_result_system *, struct oval_test *);
46 
47 int oval_result_definition_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
48 struct oval_result_definition *make_result_definition_from_oval_definition(struct oval_result_system *,
49  struct oval_definition *);
50 xmlNode *oval_result_definition_to_dom(struct oval_result_definition *, oval_result_directive_content_t, xmlDocPtr, xmlNode *);
51 
52 struct oval_result_test *make_result_test_from_oval_test(struct oval_result_system *system, struct oval_test *oval_test);
53 
54 int oval_result_test_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, void *);
55 xmlNode *oval_result_test_to_dom(struct oval_result_test *, xmlDocPtr, xmlNode *);
56 
57 
58 int oval_result_item_parse_tag(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
59 xmlNode *oval_result_item_to_dom(struct oval_result_item *, xmlDocPtr, xmlNode *);
60 
61 struct oval_result_criteria_node *make_result_criteria_node_from_oval_criteria_node(struct oval_result_system *, struct oval_criteria_node *);
62 
63 int oval_result_criteria_node_parse(xmlTextReaderPtr, struct oval_parser_context *, struct oval_result_system *, oscap_consumer_func, void *);
64 xmlNode *oval_result_criteria_node_to_dom(struct oval_result_criteria_node *, xmlDocPtr, xmlNode *);
65 
66 oval_result_t oval_result_parse(xmlTextReaderPtr, char *, oval_result_t);
67 
68 struct oval_result_definition *oval_result_system_get_new_definition(struct oval_result_system *,
69  struct oval_definition *);
70 struct oval_result_test *oval_result_system_get_test(struct oval_result_system *, char *);
71 
72 struct oresults {
73  int true_cnt;
74  int false_cnt;
75  int unknown_cnt;
76  int error_cnt;
77  int noteval_cnt;
78  int notappl_cnt;
79 };
80 
81 int ores_add_res(struct oresults *ores, oval_result_t res);
82 void ores_clear(struct oresults *ores);
83 oval_result_t ores_get_result_bychk(struct oresults *ores, oval_check_t check);
84 oval_result_t ores_get_result_byopr(struct oresults *ores, oval_operator_t op);
85 
86 void oval_results_model_add_system(struct oval_results_model *, struct oval_result_system *);
87 
88 OSCAP_HIDDEN_END;
89 
90 #endif /* OVAL_RESULTS_IMPL_H_ */