Open SCAP Library: oval_definitions.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

oval_definitions.h
Go to the documentation of this file.
1
16 /*
17 * Copyright 2009-2013 Red Hat Inc., Durham, North Carolina.
18 * All Rights Reserved.
19 *
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License as published by the Free Software Foundation; either
23 * version 2.1 of the License, or (at your option) any later version.
24 *
25 * This library is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 * Lesser General Public License for more details.
29 *
30 * You should have received a copy of the GNU Lesser General Public
31 * License along with this library; if not, write to the Free Software
32 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 *
34 * Authors:
35 * "David Niemoller" <David.Niemoller@g2-inc.com>
36 */
37
38
39 #ifndef OVAL_DEFINITIONS
40 #define OVAL_DEFINITIONS
41
42 #include "oval_adt.h"
43 #include "oval_types.h"
44 #include "oval_version.h"
45 #include <stdbool.h>
46
52 typedef enum {
53 OVAL_AFCFML_UNKNOWN = 0,
54 OVAL_AFCFML_CATOS = 1,
55 OVAL_AFCFML_IOS = 2,
56 OVAL_AFCFML_MACOS = 3,
57 OVAL_AFCFML_PIXOS = 4,
58 OVAL_AFCFML_UNDEFINED = 5,
59 OVAL_AFCFML_UNIX = 6,
60 OVAL_AFCFML_WINDOWS = 7
61 } oval_affected_family_t;
62
64 typedef enum {
65 OVAL_NODETYPE_UNKNOWN = 0,
66 OVAL_NODETYPE_CRITERIA = 1,
67 OVAL_NODETYPE_CRITERION = 2,
68 OVAL_NODETYPE_EXTENDDEF = 3
69 } oval_criteria_node_type_t;
70
72 typedef enum {
73 OVAL_OPERATOR_UNKNOWN = 0,
74 OVAL_OPERATOR_AND = 1,
75 OVAL_OPERATOR_ONE = 2,
76 OVAL_OPERATOR_OR = 3,
77 OVAL_OPERATOR_XOR = 4
78 } oval_operator_t;
79
81 typedef enum {
82 OVAL_OPERATION_UNKNOWN = 0,
83 OVAL_OPERATION_BITWISE_AND,
84 OVAL_OPERATION_BITWISE_OR,
85 OVAL_OPERATION_CASE_INSENSITIVE_EQUALS,
86 OVAL_OPERATION_CASE_INSENSITIVE_NOT_EQUAL,
87 OVAL_OPERATION_EQUALS,
88 OVAL_OPERATION_GREATER_THAN,
89 OVAL_OPERATION_GREATER_THAN_OR_EQUAL,
90 OVAL_OPERATION_LESS_THAN,
91 OVAL_OPERATION_LESS_THAN_OR_EQUAL,
92 OVAL_OPERATION_NOT_EQUAL,
93 OVAL_OPERATION_PATTERN_MATCH,
94 OVAL_OPERATION_SUBSET_OF,
95 OVAL_OPERATION_SUPERSET_OF,
96 } oval_operation_t;
97
98
100 typedef enum {
101 OVAL_EXISTENCE_UNKNOWN = 0,
102 OVAL_ALL_EXIST = 1,
103 OVAL_ANY_EXIST = 2,
104 OVAL_AT_LEAST_ONE_EXISTS = 3,
105 OVAL_ONLY_ONE_EXISTS = 4,
106 OVAL_NONE_EXIST = 5
107 } oval_existence_t;
108
110 typedef enum {
111 OVAL_CHECK_UNKNOWN = 0,
112 OVAL_CHECK_ALL = 1,
113 OVAL_CHECK_AT_LEAST_ONE = 2,
114 OVAL_CHECK_NONE_EXIST = 3,
115 OVAL_CHECK_NONE_SATISFY = 4,
116 OVAL_CHECK_ONLY_ONE = 5
117 } oval_check_t;
118
120 typedef enum {
121 OVAL_OBJECTCONTENT_UNKNOWN = 0,
122 OVAL_OBJECTCONTENT_ENTITY = 1,
123 OVAL_OBJECTCONTENT_SET = 2,
124 OVAL_OBJECTCONTENT_FILTER = 3
125 } oval_object_content_type_t;
126
128 typedef enum {
129 OVAL_ENTITY_TYPE_UNKNOWN,
130 OVAL_ENTITY_TYPE_ANY,
131 OVAL_ENTITY_TYPE_BINARY,
132 OVAL_ENTITY_TYPE_BOOLEAN,
133 OVAL_ENTITY_TYPE_FLOAT,
134 OVAL_ENTITY_TYPE_INTEGER,
135 OVAL_ENTITY_TYPE_STRING,
136 } oval_entity_type_t;
137
139 typedef enum {
140 OVAL_FILTER_ACTION_UNKNOWN = 0,
141 OVAL_FILTER_ACTION_EXCLUDE,
142 OVAL_FILTER_ACTION_INCLUDE
143 } oval_filter_action_t;
144
146 typedef enum {
147 OVAL_DATATYPE_UNKNOWN = 0,
148 OVAL_DATATYPE_BINARY,
149 OVAL_DATATYPE_BOOLEAN,
150 OVAL_DATATYPE_EVR_STRING,
151 OVAL_DATATYPE_FILESET_REVISION,
152 OVAL_DATATYPE_FLOAT,
153 OVAL_DATATYPE_INTEGER,
154 OVAL_DATATYPE_IOS_VERSION,
155 OVAL_DATATYPE_IPV4ADDR,
156 OVAL_DATATYPE_IPV6ADDR,
157 OVAL_DATATYPE_RECORD,
158 OVAL_DATATYPE_SEXP,
159 OVAL_DATATYPE_STRING,
160 OVAL_DATATYPE_STRING_M,
161 OVAL_DATATYPE_VERSION,
162 } oval_datatype_t;
163
165 typedef enum {
166 OVAL_ENTITY_VARREF_UNKNOWN,
167 OVAL_ENTITY_VARREF_NONE,
168 OVAL_ENTITY_VARREF_ATTRIBUTE,
169 OVAL_ENTITY_VARREF_ELEMENT
170 } oval_entity_varref_type_t;
171
173 typedef enum {
174 OVAL_SET_UNKNOWN,
175 OVAL_SET_AGGREGATE,
176 OVAL_SET_COLLECTIVE
177 } oval_setobject_type_t;
178
180 typedef enum {
181 OVAL_SET_OPERATION_UNKNOWN,
182 OVAL_SET_OPERATION_COMPLEMENT = 1,
183 OVAL_SET_OPERATION_INTERSECTION = 2,
184 OVAL_SET_OPERATION_UNION = 3
185 } oval_setobject_operation_t;
186
188 typedef enum {
189 OVAL_VARIABLE_UNKNOWN,
190 OVAL_VARIABLE_EXTERNAL,
191 OVAL_VARIABLE_CONSTANT,
192 OVAL_VARIABLE_LOCAL
193 } oval_variable_type_t;
194
195 #define OVAL_FUNCTION 4
196
197 typedef enum {
198 OVAL_COMPONENT_UNKNOWN = 0,
199 OVAL_COMPONENT_LITERAL = 1,
200 OVAL_COMPONENT_OBJECTREF = 2,
201 OVAL_COMPONENT_VARREF = 3,
202 OVAL_COMPONENT_FUNCTION = 4,
203 OVAL_FUNCTION_BEGIN = OVAL_FUNCTION + 1,
204 OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2,
205 OVAL_FUNCTION_END = OVAL_FUNCTION + 3,
206 OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4,
207 OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5,
208 OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6,
209 OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7,
210 OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8,
211 OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9,
212 OVAL_FUNCTION_COUNT = OVAL_FUNCTION + 10,
213 OVAL_FUNCTION_UNIQUE = OVAL_FUNCTION + 11,
214 OVAL_FUNCTION_LAST = OVAL_FUNCTION + 12
215 } oval_component_type_t;
216
218 typedef enum {
219 OVAL_ARITHMETIC_UNKNOWN = 0,
220 OVAL_ARITHMETIC_ADD = 1,
221 OVAL_ARITHMETIC_MULTIPLY = 2,
222 OVAL_ARITHMETIC_SUBTRACT = 3, //NOT YET SUPPORTED BY OVAL
223 OVAL_ARITHMETIC_DIVIDE = 4 //NOT YET SUPPORTED BY OVAL
224 } oval_arithmetic_operation_t;
225
227 typedef enum {
228 OVAL_DATETIME_UNKNOWN = 0,
229 OVAL_DATETIME_YEAR_MONTH_DAY = 1,
230 OVAL_DATETIME_MONTH_DAY_YEAR = 2,
231 OVAL_DATETIME_DAY_MONTH_YEAR = 3,
232 OVAL_DATETIME_WIN_FILETIME = 4,
233 OVAL_DATETIME_SECONDS_SINCE_EPOCH = 5
234 } oval_datetime_format_t;
235
236 typedef enum {
237 OVAL_RECORD_FIELD_UNKNOWN = 0,
238 OVAL_RECORD_FIELD_STATE = 1,
239 OVAL_RECORD_FIELD_ITEM = 2,
240 } oval_record_field_type_t;
241
245 oval_family_t oval_subtype_get_family(oval_subtype_t);
246 const char *oval_operator_get_text(oval_operator_t);
247 const char *oval_subtype_get_text(oval_subtype_t);
248 const char *oval_family_get_text(oval_family_t);
249 const char *oval_check_get_text(oval_check_t);
250 const char *oval_existence_get_text(oval_existence_t);
251 const char *oval_affected_family_get_text(oval_affected_family_t);
252 const char *oval_datatype_get_text(oval_datatype_t);
253 oval_datatype_t oval_datatype_from_text(const char *);
254 const char *oval_operation_get_text(oval_operation_t);
255 const char *oval_set_operation_get_text(oval_setobject_operation_t);
256 const char *oval_datetime_format_get_text(oval_datetime_format_t);
257 const char *oval_arithmetic_operation_get_text(oval_arithmetic_operation_t);
258 const char *oval_filter_action_get_text(oval_filter_action_t);
259
260
265 struct oval_definition_model;
266
273 struct oval_definition;
278 struct oval_definition_iterator;
284 struct oval_test;
289 struct oval_test_iterator;
298 struct oval_object;
303 struct oval_object_iterator;
310 struct oval_state;
315 struct oval_state_iterator;
330 struct oval_variable;
335 struct oval_variable_iterator;
356 struct oval_affected;
361 struct oval_affected_iterator;
369 struct oval_reference;
374 struct oval_reference_iterator;
383 struct oval_criteria_node;
388 struct oval_criteria_node_iterator;
393 struct oval_object_content;
398 struct oval_object_content_iterator;
403 struct oval_behavior;
408 struct oval_behavior_iterator;
413 struct oval_state_content;
418 struct oval_state_content_iterator;
423 struct oval_value;
428 struct oval_value_iterator;
433 struct oval_entity;
437 struct oval_entity_iterator;
441 struct oval_record_field;
445 struct oval_record_field_iterator;
450 struct oval_setobject;
455 struct oval_setobject_iterator;
460 struct oval_filter;
464 struct oval_filter_iterator;
565 struct oval_component;
570 struct oval_component_iterator;
571
575 struct oval_generator;
576
577 struct oval_generator *oval_generator_new(void);
578 void oval_generator_free(struct oval_generator *generator);
579 struct oval_generator *oval_generator_clone(struct oval_generator *old_generator);
580 char *oval_generator_get_product_name(struct oval_generator *generator);
581 char *oval_generator_get_product_version(struct oval_generator *generator);
582 char *oval_generator_get_schema_version(struct oval_generator *generator);
583 char *oval_generator_get_timestamp(struct oval_generator *generator);
584 void oval_generator_set_product_name(struct oval_generator *generator, char *product_name);
585 void oval_generator_set_product_version(struct oval_generator *generator, char *product_version);
586 void oval_generator_set_schema_version(struct oval_generator *generator, char *schema_version);
587 void oval_generator_set_timestamp(struct oval_generator *generator, char *timestamp);
588
593 struct oval_definition_model *oval_definition_model_new(void);
600 struct oval_definition_model * oval_definition_model_import(const char *file);
601
610 int oval_definition_model_merge(struct oval_definition_model *model, const char *file);
611
617 struct oval_definition_model *oval_definition_model_clone(struct oval_definition_model *);
623 int oval_definition_model_export(struct oval_definition_model *, const char *file);
628 void oval_definition_model_free(struct oval_definition_model *model);
629
634 void oval_definition_model_set_generator(struct oval_definition_model *model, struct oval_generator *generator);
640 int oval_definition_model_bind_variable_model(struct oval_definition_model *, struct oval_variable_model *);
641
642 void oval_definition_model_clear_external_variables(struct oval_definition_model *);
649 struct oval_generator *oval_definition_model_get_generator(struct oval_definition_model *model);
657 struct oval_definition *oval_definition_model_get_definition(struct oval_definition_model *, const char *id);
666 struct oval_test *oval_definition_model_get_test(struct oval_definition_model *model, const char *id);
675 struct oval_object *oval_definition_model_get_object(struct oval_definition_model *model, const char *id);
684 struct oval_state *oval_definition_model_get_state(struct oval_definition_model *model, const char *id);
693 struct oval_variable *oval_definition_model_get_variable(struct oval_definition_model *model, const char *id);
698 struct oval_definition_iterator *oval_definition_model_get_definitions(struct oval_definition_model *model);
705 struct oval_test_iterator *oval_definition_model_get_tests(struct oval_definition_model *model);
712 struct oval_object_iterator *oval_definition_model_get_objects(struct oval_definition_model *model);
719 struct oval_state_iterator *oval_definition_model_get_states(struct oval_definition_model *model);
726 struct oval_variable_iterator *oval_definition_model_get_variables(struct oval_definition_model *model);
727
733 const char * oval_definition_model_supported(void);
739 struct oval_variable_model_iterator *oval_definition_model_get_variable_models(struct oval_definition_model *);
765 struct oval_definition *oval_definition_new(struct oval_definition_model *, const char *id);
766
772 struct oval_definition *oval_definition_clone(struct oval_definition_model *new_model, struct oval_definition *old_definition);
773
783 void oval_definition_free(struct oval_definition *);
784
796 void oval_definition_set_version(struct oval_definition *, int version);
804 void oval_definition_set_class(struct oval_definition *, oval_definition_class_t);
810 void oval_definition_set_deprecated(struct oval_definition *, bool deprecated);
818 void oval_definition_set_title(struct oval_definition *, char *title);
826 void oval_definition_set_description(struct oval_definition *, char *description);
837 void oval_definition_add_affected(struct oval_definition *, struct oval_affected *affected);
848 void oval_definition_add_reference(struct oval_definition *, struct oval_reference *reference);
854 void oval_definition_add_note(struct oval_definition *, char *note);
868 void oval_definition_set_criteria(struct oval_definition *, struct oval_criteria_node *criteria);
879 char *oval_definition_get_id(struct oval_definition *);
885 int oval_definition_get_version(struct oval_definition *);
890 oval_definition_class_t oval_definition_get_class(struct oval_definition *);
895 bool oval_definition_get_deprecated(struct oval_definition *);
901 char *oval_definition_get_title(struct oval_definition *);
907 char *oval_definition_get_description(struct oval_definition *);
914 struct oval_affected_iterator *oval_definition_get_affected(struct oval_definition *);
921 struct oval_reference_iterator *oval_definition_get_references(struct oval_definition *);
928 struct oval_string_iterator *oval_definition_get_notes(struct oval_definition *);
934 struct oval_criteria_node *oval_definition_get_criteria(struct oval_definition *);
951 bool oval_definition_iterator_has_more(struct oval_definition_iterator *);
957 struct oval_definition *oval_definition_iterator_next(struct oval_definition_iterator *);
962 void oval_definition_iterator_free(struct oval_definition_iterator *);
985 struct oval_test *oval_test_new(struct oval_definition_model *, const char *id);
991 struct oval_test *oval_test_clone(struct oval_definition_model *new_model, struct oval_test *old_test);
996 void oval_test_free(struct oval_test *);
997
1011 void oval_test_set_subtype(struct oval_test *, oval_subtype_t subtype);
1017 void oval_test_add_note(struct oval_test *, char *note);
1023 void oval_test_set_comment(struct oval_test *, char *comment);
1028 void oval_test_set_deprecated(struct oval_test *, bool deprecated);
1037 void oval_test_set_version(struct oval_test *, int version);
1042 void oval_test_set_state_operator(struct oval_test *, oval_operator_t);
1051 void oval_test_set_existence(struct oval_test *, oval_existence_t);
1061 void oval_test_set_check(struct oval_test *, oval_check_t);
1070 void oval_test_set_object(struct oval_test *, struct oval_object *);
1076 void oval_test_add_state(struct oval_test *, struct oval_state *);
1087 oval_family_t oval_test_get_family(struct oval_test *);
1092 oval_subtype_t oval_test_get_subtype(struct oval_test *);
1099 struct oval_string_iterator *oval_test_get_notes(struct oval_test *);
1105 char *oval_test_get_comment(struct oval_test *);
1111 char *oval_test_get_id(struct oval_test *);
1116 bool oval_test_get_deprecated(struct oval_test *);
1121 int oval_test_get_version(struct oval_test *);
1126 oval_operator_t oval_test_get_state_operator(struct oval_test *);
1131 oval_existence_t oval_test_get_existence(struct oval_test *);
1136 oval_check_t oval_test_get_check(struct oval_test *);
1142 struct oval_object *oval_test_get_object(struct oval_test *);
1149 struct oval_state_iterator *oval_test_get_states(struct oval_test *);
1150
1167 bool oval_test_iterator_has_more(struct oval_test_iterator *);
1172 struct oval_test *oval_test_iterator_next(struct oval_test_iterator *);
1177 void oval_test_iterator_free(struct oval_test_iterator *);
1198 struct oval_object *oval_object_new(struct oval_definition_model *, const char *id);
1204 struct oval_object *oval_object_clone(struct oval_definition_model *new_model, struct oval_object *old_object);
1209 void oval_object_free(struct oval_object *);
1210
1224 void oval_object_set_subtype(struct oval_object *, oval_subtype_t subtype);
1230 void oval_object_add_note(struct oval_object *, char *note);
1231
1237 void oval_object_set_comment(struct oval_object *, char *comment);
1238
1243 void oval_object_set_deprecated(struct oval_object *, bool deprecated);
1252 void oval_object_set_version(struct oval_object *, int version);
1265 void oval_object_add_object_content(struct oval_object *, struct oval_object_content *content);
1278 void oval_object_add_behavior(struct oval_object *, struct oval_behavior *behavior);
1289 oval_family_t oval_object_get_family(struct oval_object *);
1295 const char *oval_object_get_name(struct oval_object *);
1300 oval_subtype_t oval_object_get_subtype(struct oval_object *);
1307 struct oval_string_iterator *oval_object_get_notes(struct oval_object *);
1313 char *oval_object_get_comment(struct oval_object *);
1319 char *oval_object_get_id(struct oval_object *);
1320
1325 bool oval_object_get_deprecated(struct oval_object *);
1330 int oval_object_get_version(struct oval_object *);
1331
1335 oval_version_t oval_object_get_schema_version(struct oval_object *object);
1336
1343 struct oval_object_content_iterator *oval_object_get_object_contents(struct oval_object *);
1350 struct oval_behavior_iterator *oval_object_get_behaviors(struct oval_object *);
1367 bool oval_object_iterator_has_more(struct oval_object_iterator *);
1372 struct oval_object *oval_object_iterator_next(struct oval_object_iterator *);
1377 void oval_object_iterator_free(struct oval_object_iterator *);
1398 struct oval_state *oval_state_new(struct oval_definition_model *, const char *id);
1404 struct oval_state *oval_state_clone(struct oval_definition_model *new_model, struct oval_state *old_state);
1409 void oval_state_free(struct oval_state *);
1410
1424 void oval_state_set_subtype(struct oval_state *, oval_subtype_t subtype);
1430 void oval_state_add_note(struct oval_state *, char *note);
1436 void oval_state_set_comment(struct oval_state *, char *comment);
1441 void oval_state_set_deprecated(struct oval_state *, bool deprecated);
1450 void oval_state_set_version(struct oval_state *, int version);
1455 void oval_state_set_operator(struct oval_state *, oval_operator_t);
1468 void oval_state_add_content(struct oval_state *, struct oval_state_content *content);
1479 oval_family_t oval_state_get_family(struct oval_state *);
1485 const char *oval_state_get_name(struct oval_state *);
1490 oval_subtype_t oval_state_get_subtype(struct oval_state *);
1497 struct oval_string_iterator *oval_state_get_notes(struct oval_state *);
1503 char *oval_state_get_comment(struct oval_state *);
1509 char *oval_state_get_id(struct oval_state *);
1514 bool oval_state_get_deprecated(struct oval_state *);
1519 int oval_state_get_version(struct oval_state *);
1524 int oval_state_get_operator(struct oval_state *);
1531 struct oval_state_content_iterator *oval_state_get_contents(struct oval_state *);
1542 bool oval_state_iterator_has_more(struct oval_state_iterator *);
1547 struct oval_state *oval_state_iterator_next(struct oval_state_iterator *);
1552 void oval_state_iterator_free(struct oval_state_iterator *);
1585 struct oval_variable *oval_variable_new(struct oval_definition_model *model, const char *id, oval_variable_type_t type);
1591 struct oval_variable *oval_variable_clone(struct oval_definition_model *new_model, struct oval_variable *old_variable);
1596 void oval_variable_free(struct oval_variable *);
1597
1609 void oval_variable_set_comment(struct oval_variable *, char *comment);
1617 void oval_variable_set_version(struct oval_variable *, int version);
1623 void oval_variable_set_deprecated(struct oval_variable *, bool deprecated);
1631 void oval_variable_set_datatype(struct oval_variable *, oval_datatype_t);
1645 void oval_variable_add_value(struct oval_variable *, struct oval_value *); //type==OVAL_VARIABLE_CONSTANT
1646
1647 void oval_variable_clear_values(struct oval_variable *);
1660 void oval_variable_set_component(struct oval_variable *, struct oval_component *component); //type==OVAL_VARIABLE_LOCAL
1672 char *oval_variable_get_id(struct oval_variable *);
1678 char *oval_variable_get_comment(struct oval_variable *);
1683 int oval_variable_get_version(struct oval_variable *);
1688 bool oval_variable_get_deprecated(struct oval_variable *);
1693 oval_variable_type_t oval_variable_get_type(struct oval_variable *);
1698 oval_datatype_t oval_variable_get_datatype(struct oval_variable *);
1706 struct oval_value_iterator *oval_variable_get_values(struct oval_variable *); //type==OVAL_VARIABLE_CONSTANT
1713 struct oval_component *oval_variable_get_component(struct oval_variable *); //type==OVAL_VARIABLE_LOCAL
1718 const char *oval_component_type_get_text(oval_component_type_t type);
1729 bool oval_variable_iterator_has_more(struct oval_variable_iterator *);
1734 struct oval_variable *oval_variable_iterator_next(struct oval_variable_iterator *);
1739 void oval_variable_iterator_free(struct oval_variable_iterator *);
1752 struct oval_affected *oval_affected_new(struct oval_definition_model *);
1758 struct oval_affected *oval_affected_clone(struct oval_definition_model *new_model, struct oval_affected *old_affected);
1763 void oval_affected_free(struct oval_affected *);
1764
1773 void oval_affected_set_family(struct oval_affected *, oval_affected_family_t family);
1778 void oval_affected_add_platform(struct oval_affected *, char *platform_name);
1783 void oval_affected_add_product(struct oval_affected *, char *product_name);
1796 oval_affected_family_t oval_affected_get_family(struct oval_affected *);
1804 struct oval_string_iterator *oval_affected_get_platforms(struct oval_affected *);
1812 struct oval_string_iterator *oval_affected_get_products(struct oval_affected *);
1829 bool oval_affected_iterator_has_more(struct oval_affected_iterator *);
1834 struct oval_affected *oval_affected_iterator_next(struct oval_affected_iterator *);
1839 void oval_affected_iterator_free(struct oval_affected_iterator *);
1845 struct oval_reference *oval_reference_new(struct oval_definition_model *);
1850 struct oval_reference *oval_reference_clone
1851 (struct oval_definition_model *new_model, struct oval_reference *old_reference);
1855 void oval_reference_free(struct oval_reference *);
1856
1866 void oval_reference_set_source(struct oval_reference *, char *);
1870 void oval_reference_set_id(struct oval_reference *, char *);
1874 void oval_reference_set_url(struct oval_reference *, char *);
1886 char *oval_reference_get_source(struct oval_reference *);
1892 char *oval_reference_get_id(struct oval_reference *);
1898 char *oval_reference_get_url(struct oval_reference *);
1908 bool oval_reference_iterator_has_more(struct oval_reference_iterator *);
1912 struct oval_reference *oval_reference_iterator_next(struct oval_reference_iterator *);
1916 void oval_reference_iterator_free(struct oval_reference_iterator *);
1945 struct oval_criteria_node *oval_criteria_node_new(struct oval_definition_model *, oval_criteria_node_type_t type);
1951 struct oval_criteria_node *oval_criteria_node_clone
1952 (struct oval_definition_model *new_model, struct oval_criteria_node *old_node);
1957 void oval_criteria_node_free(struct oval_criteria_node *);
1958
1968 void oval_criteria_node_set_negate(struct oval_criteria_node *, bool negate);
1974 void oval_criteria_node_set_applicability_check(struct oval_criteria_node *, bool applicability_check);
1980 void oval_criteria_set_node_type(struct oval_criteria_node *node, oval_criteria_node_type_t type);
1986 void oval_criteria_node_set_comment(struct oval_criteria_node *, char *comment);
1994 void oval_criteria_node_set_operator(struct oval_criteria_node *, oval_operator_t op);
2005 void oval_criteria_node_add_subnode(struct oval_criteria_node *, struct oval_criteria_node *node);
2013 void oval_criteria_node_set_test(struct oval_criteria_node *, struct oval_test *);
2021 void oval_criteria_node_set_definition(struct oval_criteria_node *, struct oval_definition *); //type==NODETYPE_EXTENDDEF
2032 oval_criteria_node_type_t oval_criteria_node_get_type(struct oval_criteria_node *);
2037 bool oval_criteria_node_get_negate(struct oval_criteria_node *);
2042 bool oval_criteria_node_get_applicability_check(struct oval_criteria_node *);
2043
2049 char *oval_criteria_node_get_comment(struct oval_criteria_node *);
2055 oval_operator_t oval_criteria_node_get_operator(struct oval_criteria_node *);
2063 struct oval_criteria_node_iterator *oval_criteria_node_get_subnodes(struct oval_criteria_node *);
2070 struct oval_test *oval_criteria_node_get_test(struct oval_criteria_node *);
2077 struct oval_definition *oval_criteria_node_get_definition(struct oval_criteria_node *);
2088 bool oval_criteria_node_iterator_has_more(struct oval_criteria_node_iterator *);
2094 struct oval_criteria_node *oval_criteria_node_iterator_next(struct oval_criteria_node_iterator *);
2099 void oval_criteria_node_iterator_free(struct oval_criteria_node_iterator *);
2111 struct oval_object_content *oval_object_content_new(struct oval_definition_model *model, oval_object_content_type_t type);
2112
2117 struct oval_object_content *oval_object_content_clone
2118 (struct oval_definition_model *new_model, struct oval_object_content *old_content);
2119
2123 void oval_object_content_free(struct oval_object_content *);
2124
2133 void oval_object_content_set_type(struct oval_object_content *, oval_object_content_type_t);
2137 void oval_object_content_set_field_name(struct oval_object_content *, char *);
2141 void oval_object_content_set_entity(struct oval_object_content *, struct oval_entity *); //type == OVAL_OBJECTCONTENT_ENTITY
2145 void oval_object_content_set_varCheck(struct oval_object_content *, oval_check_t); //type == OVAL_OBJECTCONTENT_ENTITY
2149 void oval_object_content_set_setobject(struct oval_object_content *, struct oval_setobject *); //type == OVAL_OBJECTCONTENT_SET
2161 char *oval_object_content_get_field_name(struct oval_object_content *);
2166 oval_object_content_type_t oval_object_content_get_type(struct oval_object_content *);
2172 struct oval_entity *oval_object_content_get_entity(struct oval_object_content *); //type == OVAL_OBJECTCONTENT_ENTITY
2177 oval_check_t oval_object_content_get_varCheck(struct oval_object_content *); //type == OVAL_OBJECTCONTENT_ENTITY
2183 struct oval_setobject *oval_object_content_get_setobject(struct oval_object_content *); //type == OVAL_OBJECTCONTENT_SET
2193 bool oval_object_content_iterator_has_more(struct oval_object_content_iterator *);
2197 struct oval_object_content *oval_object_content_iterator_next(struct oval_object_content_iterator *);
2201 void oval_object_content_iterator_free(struct oval_object_content_iterator *);
2213 struct oval_behavior *oval_behavior_new(struct oval_definition_model *);
2214
2219 struct oval_behavior *oval_behavior_clone(struct oval_definition_model *new_model, struct oval_behavior *old_behavior);
2223 void oval_behavior_free(struct oval_behavior *);
2224
2232 void oval_behavior_set_keyval(struct oval_behavior *behavior, const char *key, const char *value);
2244 char *oval_behavior_get_key(struct oval_behavior *);
2250 char *oval_behavior_get_value(struct oval_behavior *);
2260 bool oval_behavior_iterator_has_more(struct oval_behavior_iterator *);
2264 struct oval_behavior *oval_behavior_iterator_next(struct oval_behavior_iterator *);
2268 void oval_behavior_iterator_free(struct oval_behavior_iterator *);
2280 struct oval_state_content *oval_state_content_new(struct oval_definition_model *);
2285 struct oval_state_content *oval_state_content_clone (struct oval_definition_model *new_model, struct oval_state_content *old_content);
2289 void oval_state_content_free(struct oval_state_content *);
2290
2298 void oval_state_content_set_entity(struct oval_state_content *, struct oval_entity *);
2302 void oval_state_content_add_record_field(struct oval_state_content *, struct oval_record_field *);
2306 void oval_state_content_set_varcheck(struct oval_state_content *, oval_check_t);
2310 void oval_state_content_set_entcheck(struct oval_state_content *, oval_check_t);
2322 struct oval_entity *oval_state_content_get_entity(struct oval_state_content *);
2326 struct oval_record_field_iterator *oval_state_content_get_record_fields(struct oval_state_content *);
2331 oval_check_t oval_state_content_get_var_check(struct oval_state_content *);
2336 oval_check_t oval_state_content_get_ent_check(struct oval_state_content *);
2347 bool oval_state_content_iterator_has_more(struct oval_state_content_iterator *);
2351 struct oval_state_content *oval_state_content_iterator_next(struct oval_state_content_iterator *);
2355 void oval_state_content_iterator_free(struct oval_state_content_iterator *);
2361 struct oval_value *oval_value_new(oval_datatype_t datatype, char *text_value);
2366 struct oval_value *oval_value_clone(struct oval_value *old_value);
2370 void oval_value_free(struct oval_value *);
2371
2379 void oval_value_set_datatype(struct oval_value *, oval_datatype_t);
2380
2389 oval_datatype_t oval_value_get_datatype(struct oval_value *);
2395 char *oval_value_get_text(struct oval_value *);
2400 unsigned char *oval_value_get_binary(struct oval_value *); //datatype==OVAL_DATATYPE_BINARY
2405 bool oval_value_get_boolean(struct oval_value *); //datatype==OVAL_DATATYPE_BOOLEAN
2410 float oval_value_get_float(struct oval_value *); //datatype==OVAL_DATATYPE_FLOAT
2415 long long oval_value_get_integer(struct oval_value *); //datatype==OVAL_DATATYPE_INTEGER
2425 bool oval_value_iterator_has_more(struct oval_value_iterator *);
2429 struct oval_value *oval_value_iterator_next(struct oval_value_iterator *);
2433 int oval_value_iterator_remaining(struct oval_value_iterator *iterator);
2437 void oval_value_iterator_free(struct oval_value_iterator *);
2449 struct oval_entity *oval_entity_new(struct oval_definition_model *);
2454 struct oval_entity *oval_entity_clone(struct oval_definition_model *model, struct oval_entity *old_entity);
2458 void oval_entity_free(struct oval_entity *);
2459
2467 void oval_entity_set_type(struct oval_entity *, oval_entity_type_t);
2471 void oval_entity_set_datatype(struct oval_entity *, oval_datatype_t);
2475 void oval_entity_set_mask(struct oval_entity *, int);
2479 void oval_entity_set_varref_type(struct oval_entity *, oval_entity_varref_type_t);
2483 void oval_entity_set_variable(struct oval_entity *, struct oval_variable *);
2487 void oval_entity_set_value(struct oval_entity *, struct oval_value *);
2491 void oval_entity_set_name(struct oval_entity *, char *);
2495 void oval_entity_set_operation(struct oval_entity *, oval_operation_t);
2507 char *oval_entity_get_name(struct oval_entity *);
2512 oval_entity_type_t oval_entity_get_type(struct oval_entity *);
2517 oval_datatype_t oval_entity_get_datatype(struct oval_entity *);
2522 oval_operation_t oval_entity_get_operation(struct oval_entity *);
2528 struct oval_variable *oval_entity_get_variable(struct oval_entity *);
2534 struct oval_value *oval_entity_get_value(struct oval_entity *);
2539 int oval_entity_get_mask(struct oval_entity *);
2544 oval_entity_varref_type_t oval_entity_get_varref_type(struct oval_entity *);
2554 bool oval_entity_iterator_has_more(struct oval_entity_iterator *);
2558 struct oval_entity *oval_entity_iterator_next(struct oval_entity_iterator *);
2562 void oval_entity_iterator_free(struct oval_entity_iterator *);
2574 struct oval_record_field *oval_record_field_new(oval_record_field_type_t);
2578 struct oval_record_field *oval_record_field_clone(struct oval_record_field *);
2582 void oval_record_field_free(struct oval_record_field *);
2583
2591 void oval_record_field_set_name(struct oval_record_field *, char *);
2595 void oval_record_field_set_value(struct oval_record_field *, char *);
2599 void oval_record_field_set_datatype(struct oval_record_field *, oval_datatype_t);
2603 void oval_record_field_set_mask(struct oval_record_field *, int);
2607 void oval_record_field_set_operation(struct oval_record_field *, oval_operation_t);
2611 void oval_record_field_set_variable(struct oval_record_field *, struct oval_variable *);
2615 void oval_record_field_set_var_check(struct oval_record_field *, oval_check_t);
2619 void oval_record_field_set_ent_check(struct oval_record_field *, oval_check_t);
2629 oval_record_field_type_t oval_record_field_get_type(struct oval_record_field *);
2633 char *oval_record_field_get_name(struct oval_record_field *);
2637 char *oval_record_field_get_value(struct oval_record_field *);
2641 oval_datatype_t oval_record_field_get_datatype(struct oval_record_field *);
2645 int oval_record_field_get_mask(struct oval_record_field *);
2649 oval_operation_t oval_record_field_get_operation(struct oval_record_field *);
2653 struct oval_variable *oval_record_field_get_variable(struct oval_record_field *);
2657 oval_check_t oval_record_field_get_var_check(struct oval_record_field *);
2661 oval_check_t oval_record_field_get_ent_check(struct oval_record_field *);
2671 bool oval_record_field_iterator_has_more(struct oval_record_field_iterator *);
2675 struct oval_record_field *oval_record_field_iterator_next(struct oval_record_field_iterator *);
2679 void oval_record_field_iterator_free(struct oval_record_field_iterator *);
2691 struct oval_filter *oval_filter_new(struct oval_definition_model *);
2695 void oval_filter_free(struct oval_filter *);
2699 struct oval_filter *oval_filter_clone(struct oval_definition_model *, struct oval_filter *);
2700
2708 void oval_filter_set_state(struct oval_filter *, struct oval_state *);
2712 void oval_filter_set_filter_action(struct oval_filter *, oval_filter_action_t );
2722 struct oval_state *oval_filter_get_state(struct oval_filter *);
2726 oval_filter_action_t oval_filter_get_filter_action(struct oval_filter *);
2736 bool oval_filter_iterator_has_more(struct oval_filter_iterator *);
2740 struct oval_filter *oval_filter_iterator_next(struct oval_filter_iterator *);
2744 void oval_filter_iterator_free(struct oval_filter_iterator *);
2756 struct oval_setobject *oval_setobject_new(struct oval_definition_model *);
2761 struct oval_setobject *oval_setobject_clone(struct oval_definition_model *new_model, struct oval_setobject *old_setobject);
2765 void oval_setobject_free(struct oval_setobject *);
2766
2773 void oval_setobject_set_type(struct oval_setobject *, oval_setobject_type_t);
2777 void oval_setobject_set_operation(struct oval_setobject *, oval_setobject_operation_t);
2781 void oval_setobject_add_subset(struct oval_setobject *, struct oval_setobject *); //type==OVAL_SET_AGGREGATE;
2785 void oval_setobject_add_object(struct oval_setobject *, struct oval_object *); //type==OVAL_SET_COLLECTIVE;
2789 void oval_setobject_add_filter(struct oval_setobject *, struct oval_filter *); //type==OVAL_SET_COLLECTIVE;
2800 oval_setobject_type_t oval_setobject_get_type(struct oval_setobject *);
2805 oval_setobject_operation_t oval_setobject_get_operation(struct oval_setobject *);
2813 struct oval_setobject_iterator *oval_setobject_get_subsets(struct oval_setobject *); //type==OVAL_SET_AGGREGATE;
2821 struct oval_object_iterator *oval_setobject_get_objects(struct oval_setobject *); //type==OVAL_SET_COLLECTIVE;
2829 struct oval_filter_iterator *oval_setobject_get_filters(struct oval_setobject *); //type==OVAL_SET_COLLECTIVE;
2839 bool oval_setobject_iterator_has_more(struct oval_setobject_iterator *);
2843 struct oval_setobject *oval_setobject_iterator_next(struct oval_setobject_iterator *);
2847 void oval_setobject_iterator_free(struct oval_setobject_iterator *);
2899 struct oval_component *oval_component_new(struct oval_definition_model *, oval_component_type_t type);
2905 struct oval_component *oval_component_clone(struct oval_definition_model *new_model,
2906 struct oval_component *old_component);
2911 void oval_component_free(struct oval_component *);
2912
2921 void oval_component_set_type(struct oval_component *component, oval_component_type_t type);
2927 void oval_component_set_object(struct oval_component *, struct oval_object *object);
2932 void oval_component_set_item_field(struct oval_component *, char *);
2937 void oval_component_set_record_field(struct oval_component *, char *);
2943 void oval_component_set_variable(struct oval_component *, struct oval_variable *variable);
2947 void oval_component_add_function_component(struct oval_component *, struct oval_component *); //type==OVAL_COMPONENT_FUNCTION
2951 void oval_component_set_arithmetic_operation(struct oval_component *, oval_arithmetic_operation_t); //type==OVAL_COMPONENT_ARITHMETIC
2955 void oval_component_set_prefix(struct oval_component *, char *); //type==OVAL_COMPONENT_BEGIN
2959 void oval_component_set_suffix(struct oval_component *, char *); //type==OVAL_COMPONENT_END
2963 void oval_component_set_split_delimiter(struct oval_component *, char *); //type==OVAL_COMPONENT_SPLIT
2967 void oval_component_set_substring_start(struct oval_component *, int); //type==OVAL_COMPONENT_SUBSTRING
2971 void oval_component_set_substring_length(struct oval_component *, int); //type==OVAL_COMPONENT_SUBSTRING
2975 void oval_component_set_timedif_format_1(struct oval_component *, oval_datetime_format_t); //type==OVAL_COMPONENT_TIMEDIF
2979 void oval_component_set_timedif_format_2(struct oval_component *, oval_datetime_format_t); //type==OVAL_COMPONENT_TIMEDIF
2983 void oval_component_set_regex_pattern(struct oval_component *, char *); //type==OVAL_COMPONENT_REGEX_CAPTURE
2987 void oval_component_set_literal_value(struct oval_component *, struct oval_value *); //type==OVAL_COMPONENT_LITERAL
2998 oval_component_type_t oval_component_get_type(struct oval_component *);
3006 struct oval_object *oval_component_get_object(struct oval_component *); //type==OVAL_COMPONENT_OBJECTREF
3013 char *oval_component_get_item_field(struct oval_component *);
3020 char *oval_component_get_record_field(struct oval_component *);
3028 struct oval_variable *oval_component_get_variable(struct oval_component *);
3036 struct oval_component_iterator *oval_component_get_function_components(struct oval_component *); //type==OVAL_COMPONENT_FUNCTION
3042 oval_arithmetic_operation_t oval_component_get_arithmetic_operation(struct oval_component *); //type==OVAL_COMPONENT_ARITHMETIC
3050 char *oval_component_get_prefix(struct oval_component *); //type==OVAL_COMPONENT_BEGIN
3058 char *oval_component_get_suffix(struct oval_component *); //type==OVAL_COMPONENT_END
3066 char *oval_component_get_split_delimiter(struct oval_component *); //type==OVAL_COMPONENT_SPLIT
3072 int oval_component_get_substring_start(struct oval_component *); //type==OVAL_COMPONENT_SUBSTRING
3078 int oval_component_get_substring_length(struct oval_component *); //type==OVAL_COMPONENT_SUBSTRING
3084 oval_datetime_format_t oval_component_get_timedif_format_1(struct oval_component *); //type==OVAL_COMPONENT_TIMEDIF
3090 oval_datetime_format_t oval_component_get_timedif_format_2(struct oval_component *); //type==OVAL_COMPONENT_TIMEDIF
3098 char *oval_component_get_regex_pattern(struct oval_component *); //type==OVAL_COMPONENT_REGEX_CAPTURE
3106 struct oval_value *oval_component_get_literal_value(struct oval_component *); //type==OVAL_COMPONENT_LITERAL
3117 bool oval_component_iterator_has_more(struct oval_component_iterator *);
3123 struct oval_component *oval_component_iterator_next(struct oval_component_iterator *);
3128 void oval_component_iterator_free(struct oval_component_iterator *);
3133 int oval_component_iterator_remaining(struct oval_component_iterator *);
3151 char *oval_determine_document_schema_version(const char *, oscap_document_type_t);
3152
3156 #endif