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_H_
00032 #define OVAL_RESULTS_H_
00033
00038 #include "oval_definitions.h"
00039 #include "oval_system_characteristics.h"
00040 #include <stdbool.h>
00041
00042 typedef enum {
00043 OVAL_RESULT_INVALID = 0,
00044 OVAL_RESULT_TRUE = 1,
00045 OVAL_RESULT_FALSE = 2,
00046 OVAL_RESULT_UNKNOWN = 3,
00047 OVAL_RESULT_ERROR = 4,
00048 OVAL_RESULT_NOT_EVALUATED = 5,
00049 OVAL_RESULT_NOT_APPLICABLE = 6
00050 } oval_result_t;
00051
00052 typedef enum {
00053 OVAL_DIRECTIVE_CONTENT_UNKNOWN = 0,
00054 OVAL_DIRECTIVE_CONTENT_THIN = 1,
00055 OVAL_DIRECTIVE_CONTENT_FULL = 2
00056 } oval_result_directive_content_t;
00057
00058
00059 struct oval_result_definition;
00060 struct oval_result_definition_iterator;
00061
00062 struct oval_result_item;
00063 struct oval_result_item_iterator;
00064
00065 struct oval_result_test;
00066 struct oval_result_test_iterator;
00067
00068 struct oval_result_criteria_node;
00069 struct oval_result_criteria_node_iterator;
00070
00071 struct oval_result_directives;
00072
00073 struct oval_result_system;
00074 struct oval_result_system_iterator;
00075
00076 int oval_result_system_iterator_has_more(struct oval_result_system_iterator *);
00077 struct oval_result_system *oval_result_system_iterator_next (struct oval_result_system_iterator *);
00078 void oval_result_system_iterator_free (struct oval_result_system_iterator *);
00079
00080 struct oval_result_definition_iterator *oval_result_system_get_definitions (struct oval_result_system *);
00081 struct oval_result_test_iterator *oval_result_system_get_tests (struct oval_result_system *);
00082 struct oval_syschar_model *oval_result_system_get_syschar_model(struct oval_result_system *);
00083 struct oval_sysinfo *oval_result_system_get_sysinfo (struct oval_result_system *);
00084
00085 void oval_result_system_add_definition(struct oval_result_system *, struct oval_result_definition *);
00086 void oval_result_system_add_test (struct oval_result_system *, struct oval_result_test *);
00087
00088 int oval_result_definition_iterator_has_more(struct oval_result_definition_iterator *);
00089 struct oval_result_definition *oval_result_definition_iterator_next (struct oval_result_definition_iterator *);
00090 void oval_result_definition_iterator_free (struct oval_result_definition_iterator *);
00091
00092 struct oval_definition *oval_result_definition_get_definition(struct oval_result_definition *);
00093 struct oval_result_system *oval_result_definition_get_system (struct oval_result_definition *);
00094 int oval_result_definition_get_instance (struct oval_result_definition *);
00095 oval_result_t oval_result_definition_get_result (struct oval_result_definition *);
00096 struct oval_message_iterator *oval_result_definition_get_messages (struct oval_result_definition *);
00097 struct oval_result_criteria_node *oval_result_definition_get_criteria (struct oval_result_definition *);
00098
00099 void oval_result_definition_set_result (struct oval_result_definition *, oval_result_t);
00100 void oval_result_definition_set_instance(struct oval_result_definition *, int);
00101 void oval_result_definition_set_criteria(struct oval_result_definition *, struct oval_result_criteria_node *);
00102 void oval_result_definition_add_message (struct oval_result_definition *, struct oval_message *);
00103
00104 int oval_result_item_iterator_has_more(struct oval_result_item_iterator *);
00105 struct oval_result_item *oval_result_item_iterator_next (struct oval_result_item_iterator *);
00106 void oval_result_item_iterator_free (struct oval_result_item_iterator *);
00107
00108 struct oval_sysdata *oval_result_item_get_sysdata (struct oval_result_item *);
00109 oval_result_t oval_result_item_get_result (struct oval_result_item *);
00110 struct oval_message_iterator *oval_result_item_get_messages(struct oval_result_item *);
00111
00112 int oval_result_test_iterator_has_more(struct oval_result_test_iterator *);
00113 struct oval_result_test *oval_result_test_iterator_next (struct oval_result_test_iterator *);
00114 void oval_result_test_iterator_free (struct oval_result_test_iterator *);
00115
00116 struct oval_test *oval_result_test_get_test (struct oval_result_test *);
00117 struct oval_result_system *oval_result_test_get_system (struct oval_result_test *);
00118 oval_result_t oval_result_test_get_result (struct oval_result_test *);
00119 int oval_result_test_get_instance(struct oval_result_test *);
00120 struct oval_message *oval_result_test_get_message (struct oval_result_test *);
00121 struct oval_result_item_iterator *oval_result_test_get_items (struct oval_result_test *);
00122 struct oval_variable_binding_iterator *oval_result_test_get_bindings(struct oval_result_test *);
00123
00124 int oval_result_criteria_node_iterator_has_more(struct oval_result_criteria_node_iterator *);
00125 struct oval_result_criteria_node *oval_result_criteria_node_iterator_next (struct oval_result_criteria_node_iterator *);
00126 void oval_result_criteria_node_iterator_free (struct oval_result_criteria_node_iterator *);
00127
00128 oval_criteria_node_type_t oval_result_criteria_node_get_type (struct oval_result_criteria_node *);
00129 oval_result_t oval_result_criteria_node_get_result (struct oval_result_criteria_node *);
00130 bool oval_result_criteria_node_get_negate (struct oval_result_criteria_node *);
00131 oval_operator_t oval_result_criteria_node_get_operator(struct oval_result_criteria_node *);
00132 struct oval_result_criteria_node_iterator *oval_result_criteria_node_get_subnodes(struct oval_result_criteria_node *);
00133 struct oval_result_test *oval_result_criteria_node_get_test (struct oval_result_criteria_node *);
00134 struct oval_result_definition *oval_result_criteria_node_get_extends (struct oval_result_criteria_node *);
00135
00136 bool oval_result_directives_get_reported(struct oval_result_directives *, oval_result_t);
00137 oval_result_directive_content_t oval_result_directives_get_content (struct oval_result_directives *, oval_result_t);
00138
00139 void oval_result_directives_set_reported(struct oval_result_directives *, oval_result_t, bool);
00140 void oval_result_directives_set_content (struct oval_result_directives *, oval_result_t, oval_result_directive_content_t);
00141
00142 const char * oval_result_get_text(oval_result_t);
00143
00148 #endif