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