Open SCAP Library
oval_definitions.h
Go to the documentation of this file.
1 
16 /*
17  * Copyright 2009-2010 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_types.h"
43 #include "oval_version.h"
44 #include <stdbool.h>
45 #include <libxml/tree.h>
46 
47 
53 typedef enum {
54  OVAL_AFCFML_UNKNOWN = 0,
55  OVAL_AFCFML_CATOS = 1,
56  OVAL_AFCFML_IOS = 2,
57  OVAL_AFCFML_MACOS = 3,
58  OVAL_AFCFML_PIXOS = 4,
59  OVAL_AFCFML_UNDEFINED = 5,
60  OVAL_AFCFML_UNIX = 6,
61  OVAL_AFCFML_WINDOWS = 7
63 
65 typedef enum {
66  OVAL_NODETYPE_UNKNOWN = 0,
67  OVAL_NODETYPE_CRITERIA = 1,
68  OVAL_NODETYPE_CRITERION = 2,
69  OVAL_NODETYPE_EXTENDDEF = 3
71 
73 typedef enum {
74  OVAL_OPERATOR_UNKNOWN = 0,
75  OVAL_OPERATOR_AND = 1,
76  OVAL_OPERATOR_ONE = 2,
77  OVAL_OPERATOR_OR = 3,
78  OVAL_OPERATOR_XOR = 4
80 
82 typedef enum {
83  OVAL_OPERATION_UNKNOWN = 0,
84  OVAL_OPERATION_BITWISE_AND,
85  OVAL_OPERATION_BITWISE_OR,
86  OVAL_OPERATION_CASE_INSENSITIVE_EQUALS,
87  OVAL_OPERATION_CASE_INSENSITIVE_NOT_EQUAL,
88  OVAL_OPERATION_EQUALS,
89  OVAL_OPERATION_GREATER_THAN,
90  OVAL_OPERATION_GREATER_THAN_OR_EQUAL,
91  OVAL_OPERATION_LESS_THAN,
92  OVAL_OPERATION_LESS_THAN_OR_EQUAL,
93  OVAL_OPERATION_NOT_EQUAL,
94  OVAL_OPERATION_PATTERN_MATCH,
95  OVAL_OPERATION_SUBSET_OF,
96  OVAL_OPERATION_SUPERSET_OF,
98 
99 
101 typedef enum {
102  OVAL_EXISTENCE_UNKNOWN = 0,
103  OVAL_ALL_EXIST = 1,
104  OVAL_ANY_EXIST = 2,
105  OVAL_AT_LEAST_ONE_EXISTS = 3,
106  OVAL_ONLY_ONE_EXISTS = 4,
107  OVAL_NONE_EXIST = 5
109 
111 typedef enum {
112  OVAL_CHECK_UNKNOWN = 0,
113  OVAL_CHECK_ALL = 1,
114  OVAL_CHECK_AT_LEAST_ONE = 2,
115  OVAL_CHECK_NONE_EXIST = 3,
116  OVAL_CHECK_NONE_SATISFY = 4,
117  OVAL_CHECK_ONLY_ONE = 5
118 } oval_check_t;
119 
121 typedef enum {
122  OVAL_OBJECTCONTENT_UNKNOWN = 0,
123  OVAL_OBJECTCONTENT_ENTITY = 1,
124  OVAL_OBJECTCONTENT_SET = 2,
125  OVAL_OBJECTCONTENT_FILTER = 3
127 
129 typedef enum {
130  OVAL_ENTITY_TYPE_UNKNOWN,
131  OVAL_ENTITY_TYPE_ANY,
132  OVAL_ENTITY_TYPE_BINARY,
133  OVAL_ENTITY_TYPE_BOOLEAN,
134  OVAL_ENTITY_TYPE_FLOAT,
135  OVAL_ENTITY_TYPE_INTEGER,
136  OVAL_ENTITY_TYPE_STRING,
138 
140 typedef enum {
141  OVAL_FILTER_ACTION_UNKNOWN = 0,
142  OVAL_FILTER_ACTION_EXCLUDE,
143  OVAL_FILTER_ACTION_INCLUDE
145 
147 typedef enum {
148  OVAL_DATATYPE_UNKNOWN = 0,
149  OVAL_DATATYPE_BINARY,
150  OVAL_DATATYPE_BOOLEAN,
151  OVAL_DATATYPE_EVR_STRING,
152  OVAL_DATATYPE_FILESET_REVISION,
153  OVAL_DATATYPE_FLOAT,
154  OVAL_DATATYPE_INTEGER,
155  OVAL_DATATYPE_IOS_VERSION,
156  OVAL_DATATYPE_IPV4ADDR,
157  OVAL_DATATYPE_IPV6ADDR,
158  OVAL_DATATYPE_RECORD,
159  OVAL_DATATYPE_SEXP,
160  OVAL_DATATYPE_STRING,
161  OVAL_DATATYPE_STRING_M,
162  OVAL_DATATYPE_VERSION,
164 
166 typedef enum {
167  OVAL_ENTITY_VARREF_UNKNOWN,
168  OVAL_ENTITY_VARREF_NONE,
169  OVAL_ENTITY_VARREF_ATTRIBUTE,
170  OVAL_ENTITY_VARREF_ELEMENT
172 
174 typedef enum {
175  OVAL_SET_UNKNOWN,
176  OVAL_SET_AGGREGATE,
177  OVAL_SET_COLLECTIVE
179 
181 typedef enum {
182  OVAL_SET_OPERATION_UNKNOWN,
183  OVAL_SET_OPERATION_COMPLEMENT = 1,
184  OVAL_SET_OPERATION_INTERSECTION = 2,
185  OVAL_SET_OPERATION_UNION = 3
187 
189 typedef enum {
190  OVAL_VARIABLE_UNKNOWN,
191  OVAL_VARIABLE_EXTERNAL,
192  OVAL_VARIABLE_CONSTANT,
193  OVAL_VARIABLE_LOCAL
195 
196 #define OVAL_FUNCTION 4
197 
198 typedef enum {
199  OVAL_COMPONENT_UNKNOWN = 0,
200  OVAL_COMPONENT_LITERAL = 1,
201  OVAL_COMPONENT_OBJECTREF = 2,
202  OVAL_COMPONENT_VARREF = 3,
203  OVAL_COMPONENT_FUNCTION = 4,
204  OVAL_FUNCTION_BEGIN = OVAL_FUNCTION + 1,
205  OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2,
206  OVAL_FUNCTION_END = OVAL_FUNCTION + 3,
207  OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4,
208  OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5,
209  OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6,
210  OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7,
211  OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8,
212  OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9
214 
216 typedef enum {
217  OVAL_ARITHMETIC_UNKNOWN = 0,
218  OVAL_ARITHMETIC_ADD = 1,
219  OVAL_ARITHMETIC_MULTIPLY = 2,
220  OVAL_ARITHMETIC_SUBTRACT = 3, //NOT YET SUPPORTED BY OVAL
221  OVAL_ARITHMETIC_DIVIDE = 4 //NOT YET SUPPORTED BY OVAL
223 
225 typedef enum {
226  OVAL_DATETIME_UNKNOWN = 0,
227  OVAL_DATETIME_YEAR_MONTH_DAY = 1,
228  OVAL_DATETIME_MONTH_DAY_YEAR = 2,
229  OVAL_DATETIME_DAY_MONTH_YEAR = 3,
230  OVAL_DATETIME_WIN_FILETIME = 4,
231  OVAL_DATETIME_SECONDS_SINCE_EPOCH = 5
233 
234 typedef enum {
235  OVAL_RECORD_FIELD_UNKNOWN = 0,
236  OVAL_RECORD_FIELD_STATE = 1,
237  OVAL_RECORD_FIELD_ITEM = 2,
238 } oval_record_field_type_t;
239 
244 const char *oval_operator_get_text(oval_operator_t);
245 const char *oval_subtype_get_text(oval_subtype_t);
246 const char *oval_family_get_text(oval_family_t);
247 const char *oval_check_get_text(oval_check_t);
248 const char *oval_existence_get_text(oval_existence_t);
249 const char *oval_affected_family_get_text(oval_affected_family_t);
250 const char *oval_datatype_get_text(oval_datatype_t);
251 oval_datatype_t oval_datatype_from_text(const char *);
252 const char *oval_operation_get_text(oval_operation_t);
253 const char *oval_set_operation_get_text(oval_setobject_operation_t);
254 const char *oval_datetime_format_get_text(oval_datetime_format_t);
255 const char *oval_arithmetic_operation_get_text(oval_arithmetic_operation_t);
256 const char *oval_filter_action_get_text(oval_filter_action_t);
257 
258 
263 struct oval_definition_model;
264 
282 struct oval_test;
287 struct oval_test_iterator;
296 struct oval_object;
301 struct oval_object_iterator;
308 struct oval_state;
313 struct oval_state_iterator;
421 struct oval_value;
426 struct oval_value_iterator;
431 struct oval_entity;
435 struct oval_entity_iterator;
453 struct oval_setobject_iterator;
458 struct oval_filter;
462 struct oval_filter_iterator;
575 struct oval_string_iterator;
576 
580 struct oval_generator;
581 
582 struct oval_generator *oval_generator_new(void);
583 void oval_generator_free(struct oval_generator *generator);
584 struct oval_generator *oval_generator_clone(struct oval_generator *old_generator);
585 char *oval_generator_get_product_name(struct oval_generator *generator);
586 char *oval_generator_get_product_version(struct oval_generator *generator);
587 char *oval_generator_get_schema_version(struct oval_generator *generator);
588 char *oval_generator_get_timestamp(struct oval_generator *generator);
589 void oval_generator_set_product_name(struct oval_generator *generator, char *product_name);
590 void oval_generator_set_product_version(struct oval_generator *generator, char *product_version);
591 void oval_generator_set_schema_version(struct oval_generator *generator, char *schema_version);
592 void oval_generator_set_timestamp(struct oval_generator *generator, char *timestamp);
593 
605 struct oval_definition_model * oval_definition_model_import(const char *file);
606 
615 int oval_definition_model_merge(struct oval_definition_model *model, const char *file);
616 
628 int oval_definition_model_export(struct oval_definition_model *, const char *file);
634 
639 void oval_definition_model_set_generator(struct oval_definition_model *model, struct oval_generator *generator);
646 
647 void oval_definition_model_clear_external_variables(struct oval_definition_model *);
654 struct oval_generator *oval_definition_model_get_generator(struct oval_definition_model *model);
671 struct oval_test *oval_definition_model_get_test(struct oval_definition_model *model, const char *id);
680 struct oval_object *oval_definition_model_get_object(struct oval_definition_model *model, const char *id);
689 struct oval_state *oval_definition_model_get_state(struct oval_definition_model *model, const char *id);
698 struct oval_variable *oval_definition_model_get_variable(struct oval_definition_model *model, const char *id);
732 
738 const char * oval_definition_model_supported(void);
770 struct oval_definition *oval_definition_new(struct oval_definition_model *, const char *id);
771 
777 struct oval_definition *oval_definition_clone(struct oval_definition_model *new_model, struct oval_definition *old_definition);
778 
789 
801 void oval_definition_set_version(struct oval_definition *, int version);
815 void oval_definition_set_deprecated(struct oval_definition *, bool deprecated);
823 void oval_definition_set_title(struct oval_definition *, char *title);
831 void oval_definition_set_description(struct oval_definition *, char *description);
842 void oval_definition_add_affected(struct oval_definition *, struct oval_affected *affected);
853 void oval_definition_add_reference(struct oval_definition *, struct oval_reference *reference);
859 void oval_definition_add_note(struct oval_definition *, char *note);
873 void oval_definition_set_criteria(struct oval_definition *, struct oval_criteria_node *criteria);
997 struct oval_test *oval_test_new(struct oval_definition_model *, const char *id);
1003 struct oval_test *oval_test_clone(struct oval_definition_model *new_model, struct oval_test *old_test);
1008 void oval_test_free(struct oval_test *);
1009 
1023 void oval_test_set_subtype(struct oval_test *, oval_subtype_t subtype);
1029 void oval_test_add_note(struct oval_test *, char *note);
1035 void oval_test_set_comment(struct oval_test *, char *comment);
1040 void oval_test_set_deprecated(struct oval_test *, bool deprecated);
1049 void oval_test_set_version(struct oval_test *, int version);
1082 void oval_test_set_object(struct oval_test *, struct oval_object *);
1088 void oval_test_add_state(struct oval_test *, struct oval_state *);
1117 char *oval_test_get_comment(struct oval_test *);
1123 char *oval_test_get_id(struct oval_test *);
1128 bool oval_test_get_deprecated(struct oval_test *);
1133 int oval_test_get_version(struct oval_test *);
1154 struct oval_object *oval_test_get_object(struct oval_test *);
1162 
1210 struct oval_object *oval_object_new(struct oval_definition_model *, const char *id);
1216 struct oval_object *oval_object_clone(struct oval_definition_model *new_model, struct oval_object *old_object);
1221 void oval_object_free(struct oval_object *);
1222 
1236 void oval_object_set_subtype(struct oval_object *, oval_subtype_t subtype);
1242 void oval_object_add_note(struct oval_object *, char *note);
1243 
1249 void oval_object_set_comment(struct oval_object *, char *comment);
1250 
1255 void oval_object_set_deprecated(struct oval_object *, bool deprecated);
1264 void oval_object_set_version(struct oval_object *, int version);
1277 void oval_object_add_object_content(struct oval_object *, struct oval_object_content *content);
1290 void oval_object_add_behavior(struct oval_object *, struct oval_behavior *behavior);
1307 const char *oval_object_get_name(struct oval_object *);
1325 char *oval_object_get_comment(struct oval_object *);
1331 char *oval_object_get_id(struct oval_object *);
1332 
1342 int oval_object_get_version(struct oval_object *);
1343 
1347 oval_version_t oval_object_get_schema_version(struct oval_object *object);
1348 
1410 struct oval_state *oval_state_new(struct oval_definition_model *, const char *id);
1416 struct oval_state *oval_state_clone(struct oval_definition_model *new_model, struct oval_state *old_state);
1421 void oval_state_free(struct oval_state *);
1422 
1436 void oval_state_set_subtype(struct oval_state *, oval_subtype_t subtype);
1442 void oval_state_add_note(struct oval_state *, char *note);
1448 void oval_state_set_comment(struct oval_state *, char *comment);
1453 void oval_state_set_deprecated(struct oval_state *, bool deprecated);
1462 void oval_state_set_version(struct oval_state *, int version);
1480 void oval_state_add_content(struct oval_state *, struct oval_state_content *content);
1497 const char *oval_state_get_name(struct oval_state *);
1515 char *oval_state_get_comment(struct oval_state *);
1521 char *oval_state_get_id(struct oval_state *);
1526 bool oval_state_get_deprecated(struct oval_state *);
1531 int oval_state_get_version(struct oval_state *);
1536 int oval_state_get_operator(struct oval_state *);
1597 struct oval_variable *oval_variable_new(struct oval_definition_model *model, const char *id, oval_variable_type_t type);
1603 struct oval_variable *oval_variable_clone(struct oval_definition_model *new_model, struct oval_variable *old_variable);
1608 void oval_variable_free(struct oval_variable *);
1609 
1621 void oval_variable_set_comment(struct oval_variable *, char *comment);
1629 void oval_variable_set_version(struct oval_variable *, int version);
1635 void oval_variable_set_deprecated(struct oval_variable *, bool deprecated);
1657 void oval_variable_add_value(struct oval_variable *, struct oval_value *); //type==OVAL_VARIABLE_CONSTANT
1658 
1659 void oval_variable_clear_values(struct oval_variable *);
1672 void oval_variable_set_component(struct oval_variable *, struct oval_component *component); //type==OVAL_VARIABLE_LOCAL
1684 char *oval_variable_get_id(struct oval_variable *);
1718 struct oval_value_iterator *oval_variable_get_values(struct oval_variable *); //type==OVAL_VARIABLE_CONSTANT
1725 struct oval_component *oval_variable_get_component(struct oval_variable *); //type==OVAL_VARIABLE_LOCAL
1770 struct oval_affected *oval_affected_clone(struct oval_definition_model *new_model, struct oval_affected *old_affected);
1775 void oval_affected_free(struct oval_affected *);
1776 
1790 void oval_affected_add_platform(struct oval_affected *, char *platform_name);
1795 void oval_affected_add_product(struct oval_affected *, char *product_name);
1857 struct oval_reference *oval_reference_new(struct oval_definition_model *);
1863  (struct oval_definition_model *new_model, struct oval_reference *old_reference);
1867 void oval_reference_free(struct oval_reference *);
1868 
1878 void oval_reference_set_source(struct oval_reference *, char *);
1882 void oval_reference_set_id(struct oval_reference *, char *);
1886 void oval_reference_set_url(struct oval_reference *, char *);
1904 char *oval_reference_get_id(struct oval_reference *);
1910 char *oval_reference_get_url(struct oval_reference *);
1920 bool oval_reference_iterator_has_more(struct oval_reference_iterator *);
1924 struct oval_reference *oval_reference_iterator_next(struct oval_reference_iterator *);
1928 void oval_reference_iterator_free(struct oval_reference_iterator *);
1964  (struct oval_definition_model *new_model, struct oval_criteria_node *old_node);
1970 
1980 void oval_criteria_node_set_negate(struct oval_criteria_node *, bool negate);
1992 void oval_criteria_node_set_comment(struct oval_criteria_node *, char *comment);
2027 void oval_criteria_node_set_definition(struct oval_criteria_node *, struct oval_definition *); //type==NODETYPE_EXTENDDEF
2111 struct oval_object_content *oval_object_content_new(struct oval_definition_model *model, oval_object_content_type_t type);
2112 
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
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);
2326 struct oval_record_field_iterator *oval_state_content_get_record_fields(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 
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 *);
2534 struct oval_value *oval_entity_get_value(struct oval_entity *);
2539 int oval_entity_get_mask(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;
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 *);
2904  struct oval_component *old_component);
2909 void oval_component_free(struct oval_component *);
2910 
2919 void oval_component_set_type(struct oval_component *component, oval_component_type_t type);
2925 void oval_component_set_object(struct oval_component *, struct oval_object *object);
2930 void oval_component_set_item_field(struct oval_component *, char *);
2935 void oval_component_set_record_field(struct oval_component *, char *);
2941 void oval_component_set_variable(struct oval_component *, struct oval_variable *variable);
2945 void oval_component_add_function_component(struct oval_component *, struct oval_component *); //type==OVAL_COMPONENT_FUNCTION
2949 void oval_component_set_arithmetic_operation(struct oval_component *, oval_arithmetic_operation_t); //type==OVAL_COMPONENT_ARITHMETIC
2953 void oval_component_set_prefix(struct oval_component *, char *); //type==OVAL_COMPONENT_BEGIN
2957 void oval_component_set_suffix(struct oval_component *, char *); //type==OVAL_COMPONENT_END
2961 void oval_component_set_split_delimiter(struct oval_component *, char *); //type==OVAL_COMPONENT_SPLIT
2965 void oval_component_set_substring_start(struct oval_component *, int); //type==OVAL_COMPONENT_SUBSTRING
2969 void oval_component_set_substring_length(struct oval_component *, int); //type==OVAL_COMPONENT_SUBSTRING
2973 void oval_component_set_timedif_format_1(struct oval_component *, oval_datetime_format_t); //type==OVAL_COMPONENT_TIMEDIF
2977 void oval_component_set_timedif_format_2(struct oval_component *, oval_datetime_format_t); //type==OVAL_COMPONENT_TIMEDIF
2981 void oval_component_set_regex_pattern(struct oval_component *, char *); //type==OVAL_COMPONENT_REGEX_CAPTURE
2985 void oval_component_set_literal_value(struct oval_component *, struct oval_value *); //type==OVAL_COMPONENT_LITERAL
3004 struct oval_object *oval_component_get_object(struct oval_component *); //type==OVAL_COMPONENT_OBJECTREF
3034 struct oval_component_iterator *oval_component_get_function_components(struct oval_component *); //type==OVAL_COMPONENT_FUNCTION
3040 oval_arithmetic_operation_t oval_component_get_arithmetic_operation(struct oval_component *); //type==OVAL_COMPONENT_ARITHMETIC
3048 char *oval_component_get_prefix(struct oval_component *); //type==OVAL_COMPONENT_BEGIN
3056 char *oval_component_get_suffix(struct oval_component *); //type==OVAL_COMPONENT_END
3064 char *oval_component_get_split_delimiter(struct oval_component *); //type==OVAL_COMPONENT_SPLIT
3070 int oval_component_get_substring_start(struct oval_component *); //type==OVAL_COMPONENT_SUBSTRING
3076 int oval_component_get_substring_length(struct oval_component *); //type==OVAL_COMPONENT_SUBSTRING
3082 oval_datetime_format_t oval_component_get_timedif_format_1(struct oval_component *); //type==OVAL_COMPONENT_TIMEDIF
3088 oval_datetime_format_t oval_component_get_timedif_format_2(struct oval_component *); //type==OVAL_COMPONENT_TIMEDIF
3096 char *oval_component_get_regex_pattern(struct oval_component *); //type==OVAL_COMPONENT_REGEX_CAPTURE
3104 struct oval_value *oval_component_get_literal_value(struct oval_component *); //type==OVAL_COMPONENT_LITERAL
3176 
3180 #endif