00001
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef OVAL_DEFINITIONS
00040 #define OVAL_DEFINITIONS
00041
00042 #include "oscap.h"
00043 #include "oscap_source.h"
00044 #include "oval_adt.h"
00045 #include "oval_types.h"
00046 #include "oval_version.h"
00047 #include "oval_schema_version.h"
00048 #include <stdbool.h>
00049
00055 typedef enum {
00056 OVAL_AFCFML_UNKNOWN = 0,
00057 OVAL_AFCFML_CATOS = 1,
00058 OVAL_AFCFML_IOS = 2,
00059 OVAL_AFCFML_MACOS = 3,
00060 OVAL_AFCFML_PIXOS = 4,
00061 OVAL_AFCFML_UNDEFINED = 5,
00062 OVAL_AFCFML_UNIX = 6,
00063 OVAL_AFCFML_WINDOWS = 7
00064 } oval_affected_family_t;
00065
00067 typedef enum {
00068 OVAL_NODETYPE_UNKNOWN = 0,
00069 OVAL_NODETYPE_CRITERIA = 1,
00070 OVAL_NODETYPE_CRITERION = 2,
00071 OVAL_NODETYPE_EXTENDDEF = 3
00072 } oval_criteria_node_type_t;
00073
00075 typedef enum {
00076 OVAL_OPERATOR_UNKNOWN = 0,
00077 OVAL_OPERATOR_AND = 1,
00078 OVAL_OPERATOR_ONE = 2,
00079 OVAL_OPERATOR_OR = 3,
00080 OVAL_OPERATOR_XOR = 4
00081 } oval_operator_t;
00082
00084 typedef enum {
00085 OVAL_OPERATION_UNKNOWN = 0,
00086 OVAL_OPERATION_BITWISE_AND,
00087 OVAL_OPERATION_BITWISE_OR,
00088 OVAL_OPERATION_CASE_INSENSITIVE_EQUALS,
00089 OVAL_OPERATION_CASE_INSENSITIVE_NOT_EQUAL,
00090 OVAL_OPERATION_EQUALS,
00091 OVAL_OPERATION_GREATER_THAN,
00092 OVAL_OPERATION_GREATER_THAN_OR_EQUAL,
00093 OVAL_OPERATION_LESS_THAN,
00094 OVAL_OPERATION_LESS_THAN_OR_EQUAL,
00095 OVAL_OPERATION_NOT_EQUAL,
00096 OVAL_OPERATION_PATTERN_MATCH,
00097 OVAL_OPERATION_SUBSET_OF,
00098 OVAL_OPERATION_SUPERSET_OF,
00099 } oval_operation_t;
00100
00101
00103 typedef enum {
00104 OVAL_EXISTENCE_UNKNOWN = 0,
00105 OVAL_ALL_EXIST = 1,
00106 OVAL_ANY_EXIST = 2,
00107 OVAL_AT_LEAST_ONE_EXISTS = 3,
00108 OVAL_ONLY_ONE_EXISTS = 4,
00109 OVAL_NONE_EXIST = 5
00110 } oval_existence_t;
00111
00113 typedef enum {
00114 OVAL_CHECK_UNKNOWN = 0,
00115 OVAL_CHECK_ALL = 1,
00116 OVAL_CHECK_AT_LEAST_ONE = 2,
00117 OVAL_CHECK_NONE_EXIST = 3,
00118 OVAL_CHECK_NONE_SATISFY = 4,
00119 OVAL_CHECK_ONLY_ONE = 5
00120 } oval_check_t;
00121
00123 typedef enum {
00124 OVAL_OBJECTCONTENT_UNKNOWN = 0,
00125 OVAL_OBJECTCONTENT_ENTITY = 1,
00126 OVAL_OBJECTCONTENT_SET = 2,
00127 OVAL_OBJECTCONTENT_FILTER = 3
00128 } oval_object_content_type_t;
00129
00131 typedef enum {
00132 OVAL_ENTITY_TYPE_UNKNOWN,
00133 OVAL_ENTITY_TYPE_ANY,
00134 OVAL_ENTITY_TYPE_BINARY,
00135 OVAL_ENTITY_TYPE_BOOLEAN,
00136 OVAL_ENTITY_TYPE_FLOAT,
00137 OVAL_ENTITY_TYPE_INTEGER,
00138 OVAL_ENTITY_TYPE_STRING,
00139 } oval_entity_type_t;
00140
00142 typedef enum {
00143 OVAL_FILTER_ACTION_UNKNOWN = 0,
00144 OVAL_FILTER_ACTION_EXCLUDE,
00145 OVAL_FILTER_ACTION_INCLUDE
00146 } oval_filter_action_t;
00147
00149 typedef enum {
00150 OVAL_DATATYPE_UNKNOWN = 0,
00151 OVAL_DATATYPE_BINARY,
00152 OVAL_DATATYPE_BOOLEAN,
00153 OVAL_DATATYPE_EVR_STRING,
00154 OVAL_DATATYPE_FILESET_REVISION,
00155 OVAL_DATATYPE_FLOAT,
00156 OVAL_DATATYPE_INTEGER,
00157 OVAL_DATATYPE_IOS_VERSION,
00158 OVAL_DATATYPE_IPV4ADDR,
00159 OVAL_DATATYPE_IPV6ADDR,
00160 OVAL_DATATYPE_RECORD,
00161 OVAL_DATATYPE_SEXP,
00162 OVAL_DATATYPE_STRING,
00163 OVAL_DATATYPE_STRING_M,
00164 OVAL_DATATYPE_VERSION,
00165 OVAL_DATATYPE_DEBIAN_EVR_STRING
00166 } oval_datatype_t;
00167
00169 typedef enum {
00170 OVAL_ENTITY_VARREF_UNKNOWN,
00171 OVAL_ENTITY_VARREF_NONE,
00172 OVAL_ENTITY_VARREF_ATTRIBUTE,
00173 OVAL_ENTITY_VARREF_ELEMENT
00174 } oval_entity_varref_type_t;
00175
00177 typedef enum {
00178 OVAL_SET_UNKNOWN,
00179 OVAL_SET_AGGREGATE,
00180 OVAL_SET_COLLECTIVE
00181 } oval_setobject_type_t;
00182
00184 typedef enum {
00185 OVAL_SET_OPERATION_UNKNOWN,
00186 OVAL_SET_OPERATION_COMPLEMENT = 1,
00187 OVAL_SET_OPERATION_INTERSECTION = 2,
00188 OVAL_SET_OPERATION_UNION = 3
00189 } oval_setobject_operation_t;
00190
00192 typedef enum {
00193 OVAL_VARIABLE_UNKNOWN,
00194 OVAL_VARIABLE_EXTERNAL,
00195 OVAL_VARIABLE_CONSTANT,
00196 OVAL_VARIABLE_LOCAL
00197 } oval_variable_type_t;
00198
00199 #define OVAL_FUNCTION 4
00201 typedef enum {
00202 OVAL_COMPONENT_UNKNOWN = 0,
00203 OVAL_COMPONENT_LITERAL = 1,
00204 OVAL_COMPONENT_OBJECTREF = 2,
00205 OVAL_COMPONENT_VARREF = 3,
00206 OVAL_COMPONENT_FUNCTION = 4,
00207 OVAL_FUNCTION_BEGIN = OVAL_FUNCTION + 1,
00208 OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2,
00209 OVAL_FUNCTION_END = OVAL_FUNCTION + 3,
00210 OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4,
00211 OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5,
00212 OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6,
00213 OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7,
00214 OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8,
00215 OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9,
00216 OVAL_FUNCTION_COUNT = OVAL_FUNCTION + 10,
00217 OVAL_FUNCTION_UNIQUE = OVAL_FUNCTION + 11,
00218 OVAL_FUNCTION_GLOB_TO_REGEX = OVAL_FUNCTION + 12,
00219 OVAL_FUNCTION_LAST = OVAL_FUNCTION + 13
00220 } oval_component_type_t;
00221
00223 typedef enum {
00224 OVAL_ARITHMETIC_UNKNOWN = 0,
00225 OVAL_ARITHMETIC_ADD = 1,
00226 OVAL_ARITHMETIC_MULTIPLY = 2,
00227 OVAL_ARITHMETIC_SUBTRACT = 3,
00228 OVAL_ARITHMETIC_DIVIDE = 4
00229 } oval_arithmetic_operation_t;
00230
00232 typedef enum {
00233 OVAL_DATETIME_UNKNOWN = 0,
00234 OVAL_DATETIME_YEAR_MONTH_DAY = 1,
00235 OVAL_DATETIME_MONTH_DAY_YEAR = 2,
00236 OVAL_DATETIME_DAY_MONTH_YEAR = 3,
00237 OVAL_DATETIME_WIN_FILETIME = 4,
00238 OVAL_DATETIME_SECONDS_SINCE_EPOCH = 5,
00239 OVAL_DATETIME_CIM_DATETIME = 6
00240 } oval_datetime_format_t;
00241
00242 typedef enum {
00243 OVAL_RECORD_FIELD_UNKNOWN = 0,
00244 OVAL_RECORD_FIELD_STATE = 1,
00245 OVAL_RECORD_FIELD_ITEM = 2,
00246 } oval_record_field_type_t;
00247
00251 oval_family_t oval_subtype_get_family(oval_subtype_t);
00252 const char *oval_operator_get_text(oval_operator_t);
00253 const char *oval_subtype_get_text(oval_subtype_t);
00254 const char *oval_family_get_text(oval_family_t);
00255 const char *oval_check_get_text(oval_check_t);
00256 const char *oval_existence_get_text(oval_existence_t);
00257 const char *oval_affected_family_get_text(oval_affected_family_t);
00258 const char *oval_datatype_get_text(oval_datatype_t);
00259 oval_datatype_t oval_datatype_from_text(const char *);
00260 const char *oval_operation_get_text(oval_operation_t);
00261 const char *oval_set_operation_get_text(oval_setobject_operation_t);
00262 const char *oval_datetime_format_get_text(oval_datetime_format_t);
00263 const char *oval_arithmetic_operation_get_text(oval_arithmetic_operation_t);
00264 const char *oval_filter_action_get_text(oval_filter_action_t);
00265
00266
00271 struct oval_definition_model;
00272
00279 struct oval_definition;
00284 struct oval_definition_iterator;
00290 struct oval_test;
00295 struct oval_test_iterator;
00304 struct oval_object;
00309 struct oval_object_iterator;
00316 struct oval_state;
00321 struct oval_state_iterator;
00336 struct oval_variable;
00340 struct oval_variable_possible_value;
00341 struct oval_variable_possible_value_iterator;
00345 struct oval_variable_possible_restriction;
00346 struct oval_variable_possible_restriction_iterator;
00350 struct oval_variable_restriction;
00351 struct oval_variable_restriction_iterator;
00356 struct oval_variable_iterator;
00377 struct oval_affected;
00382 struct oval_affected_iterator;
00390 struct oval_reference;
00395 struct oval_reference_iterator;
00404 struct oval_criteria_node;
00409 struct oval_criteria_node_iterator;
00414 struct oval_object_content;
00419 struct oval_object_content_iterator;
00424 struct oval_behavior;
00429 struct oval_behavior_iterator;
00434 struct oval_state_content;
00439 struct oval_state_content_iterator;
00444 struct oval_value;
00449 struct oval_value_iterator;
00454 struct oval_entity;
00458 struct oval_entity_iterator;
00462 struct oval_record_field;
00466 struct oval_record_field_iterator;
00471 struct oval_setobject;
00476 struct oval_setobject_iterator;
00481 struct oval_filter;
00485 struct oval_filter_iterator;
00586 struct oval_component;
00591 struct oval_component_iterator;
00592
00596 struct oval_generator;
00597
00598 struct oval_generator *oval_generator_new(void);
00599 void oval_generator_free(struct oval_generator *generator);
00600 struct oval_generator *oval_generator_clone(struct oval_generator *old_generator);
00601 char *oval_generator_get_product_name(struct oval_generator *generator);
00602 char *oval_generator_get_product_version(struct oval_generator *generator);
00603 OSCAP_DEPRECATED(char *oval_generator_get_schema_version(struct oval_generator *generator));
00604 const char *oval_generator_get_core_schema_version(struct oval_generator *generator);
00605 char *oval_generator_get_timestamp(struct oval_generator *generator);
00606 const char *oval_generator_get_platform_schema_version (struct oval_generator *generator, const char *platform);
00607 void oval_generator_set_product_name(struct oval_generator *generator, const char *product_name);
00608 void oval_generator_set_product_version(struct oval_generator *generator, const char *product_version);
00609 OSCAP_DEPRECATED(void oval_generator_set_schema_version(struct oval_generator *generator, const char *schema_version));
00610 void oval_generator_set_core_schema_version(struct oval_generator *generator, const char *schema_version);
00611 void oval_generator_add_platform_schema_version(struct oval_generator *generator, const char *platform, const char *schema_version);
00612 void oval_generator_set_timestamp(struct oval_generator *generator, const char *timestamp);
00613 void oval_generator_update_timestamp(struct oval_generator *generator);
00614
00619 struct oval_definition_model *oval_definition_model_new(void);
00620
00627 struct oval_definition_model *oval_definition_model_import_source(struct oscap_source *source);
00628
00637 OSCAP_DEPRECATED(struct oval_definition_model *oval_definition_model_import(const char *file));
00638
00649 OSCAP_DEPRECATED(int oval_definition_model_merge(struct oval_definition_model *model, const char *file));
00650
00656 struct oval_definition_model *oval_definition_model_clone(struct oval_definition_model *);
00662 int oval_definition_model_export(struct oval_definition_model *, const char *file);
00667 void oval_definition_model_free(struct oval_definition_model *model);
00668
00673 void oval_definition_model_set_generator(struct oval_definition_model *model, struct oval_generator *generator);
00679 int oval_definition_model_bind_variable_model(struct oval_definition_model *, struct oval_variable_model *);
00680
00681 void oval_definition_model_clear_external_variables(struct oval_definition_model *);
00688 struct oval_generator *oval_definition_model_get_generator(struct oval_definition_model *model);
00696 struct oval_definition *oval_definition_model_get_definition(struct oval_definition_model *, const char *id);
00705 struct oval_test *oval_definition_model_get_test(struct oval_definition_model *model, const char *id);
00714 struct oval_object *oval_definition_model_get_object(struct oval_definition_model *model, const char *id);
00723 struct oval_state *oval_definition_model_get_state(struct oval_definition_model *model, const char *id);
00732 struct oval_variable *oval_definition_model_get_variable(struct oval_definition_model *model, const char *id);
00737 struct oval_definition_iterator *oval_definition_model_get_definitions(struct oval_definition_model *model);
00744 struct oval_test_iterator *oval_definition_model_get_tests(struct oval_definition_model *model);
00751 struct oval_object_iterator *oval_definition_model_get_objects(struct oval_definition_model *model);
00758 struct oval_state_iterator *oval_definition_model_get_states(struct oval_definition_model *model);
00765 struct oval_variable_iterator *oval_definition_model_get_variables(struct oval_definition_model *model);
00766
00772 const char * oval_definition_model_supported(void);
00778 struct oval_variable_model_iterator *oval_definition_model_get_variable_models(struct oval_definition_model *);
00804 struct oval_definition *oval_definition_new(struct oval_definition_model *, const char *id);
00805
00811 struct oval_definition *oval_definition_clone(struct oval_definition_model *new_model, struct oval_definition *old_definition);
00812
00822 void oval_definition_free(struct oval_definition *);
00823
00835 void oval_definition_set_version(struct oval_definition *, int version);
00843 void oval_definition_set_class(struct oval_definition *, oval_definition_class_t);
00849 void oval_definition_set_deprecated(struct oval_definition *, bool deprecated);
00857 void oval_definition_set_title(struct oval_definition *, char *title);
00865 void oval_definition_set_description(struct oval_definition *, char *description);
00876 void oval_definition_add_affected(struct oval_definition *, struct oval_affected *affected);
00887 void oval_definition_add_reference(struct oval_definition *, struct oval_reference *reference);
00893 void oval_definition_add_note(struct oval_definition *, char *note);
00907 void oval_definition_set_criteria(struct oval_definition *, struct oval_criteria_node *criteria);
00918 char *oval_definition_get_id(struct oval_definition *);
00924 int oval_definition_get_version(struct oval_definition *);
00929 oval_definition_class_t oval_definition_get_class(struct oval_definition *);
00934 bool oval_definition_get_deprecated(struct oval_definition *);
00940 char *oval_definition_get_title(struct oval_definition *);
00946 char *oval_definition_get_description(struct oval_definition *);
00953 struct oval_affected_iterator *oval_definition_get_affected(struct oval_definition *);
00960 struct oval_reference_iterator *oval_definition_get_references(struct oval_definition *);
00967 struct oval_string_iterator *oval_definition_get_notes(struct oval_definition *);
00973 struct oval_criteria_node *oval_definition_get_criteria(struct oval_definition *);
00990 bool oval_definition_iterator_has_more(struct oval_definition_iterator *);
00996 struct oval_definition *oval_definition_iterator_next(struct oval_definition_iterator *);
01001 void oval_definition_iterator_free(struct oval_definition_iterator *);
01024 struct oval_test *oval_test_new(struct oval_definition_model *, const char *id);
01030 struct oval_test *oval_test_clone(struct oval_definition_model *new_model, struct oval_test *old_test);
01035 void oval_test_free(struct oval_test *);
01036
01050 void oval_test_set_subtype(struct oval_test *, oval_subtype_t subtype);
01056 void oval_test_add_note(struct oval_test *, char *note);
01062 void oval_test_set_comment(struct oval_test *, char *comment);
01067 void oval_test_set_deprecated(struct oval_test *, bool deprecated);
01076 void oval_test_set_version(struct oval_test *, int version);
01081 void oval_test_set_state_operator(struct oval_test *, oval_operator_t);
01090 void oval_test_set_existence(struct oval_test *, oval_existence_t);
01100 void oval_test_set_check(struct oval_test *, oval_check_t);
01109 void oval_test_set_object(struct oval_test *, struct oval_object *);
01115 void oval_test_add_state(struct oval_test *, struct oval_state *);
01126 oval_family_t oval_test_get_family(struct oval_test *);
01131 oval_subtype_t oval_test_get_subtype(struct oval_test *);
01138 struct oval_string_iterator *oval_test_get_notes(struct oval_test *);
01144 char *oval_test_get_comment(struct oval_test *);
01150 char *oval_test_get_id(struct oval_test *);
01155 bool oval_test_get_deprecated(struct oval_test *);
01160 int oval_test_get_version(struct oval_test *);
01165 oval_operator_t oval_test_get_state_operator(struct oval_test *);
01170 oval_existence_t oval_test_get_existence(struct oval_test *);
01175 oval_check_t oval_test_get_check(struct oval_test *);
01181 struct oval_object *oval_test_get_object(struct oval_test *);
01188 struct oval_state_iterator *oval_test_get_states(struct oval_test *);
01189
01206 bool oval_test_iterator_has_more(struct oval_test_iterator *);
01211 struct oval_test *oval_test_iterator_next(struct oval_test_iterator *);
01216 void oval_test_iterator_free(struct oval_test_iterator *);
01237 struct oval_object *oval_object_new(struct oval_definition_model *, const char *id);
01243 struct oval_object *oval_object_clone(struct oval_definition_model *new_model, struct oval_object *old_object);
01248 void oval_object_free(struct oval_object *);
01249
01263 void oval_object_set_subtype(struct oval_object *, oval_subtype_t subtype);
01269 void oval_object_add_note(struct oval_object *, char *note);
01270
01276 void oval_object_set_comment(struct oval_object *, char *comment);
01277
01282 void oval_object_set_deprecated(struct oval_object *, bool deprecated);
01291 void oval_object_set_version(struct oval_object *, int version);
01304 void oval_object_add_object_content(struct oval_object *, struct oval_object_content *content);
01317 void oval_object_add_behavior(struct oval_object *, struct oval_behavior *behavior);
01328 oval_family_t oval_object_get_family(struct oval_object *);
01334 const char *oval_object_get_name(struct oval_object *);
01339 oval_subtype_t oval_object_get_subtype(struct oval_object *);
01346 struct oval_string_iterator *oval_object_get_notes(struct oval_object *);
01352 char *oval_object_get_comment(struct oval_object *);
01358 char *oval_object_get_id(struct oval_object *);
01359
01364 bool oval_object_get_deprecated(struct oval_object *);
01369 int oval_object_get_version(struct oval_object *);
01370
01374 OSCAP_DEPRECATED(oval_version_t oval_object_get_schema_version(struct oval_object *object));
01375
01380 oval_schema_version_t oval_object_get_platform_schema_version(struct oval_object *object);
01381
01388 struct oval_object_content_iterator *oval_object_get_object_contents(struct oval_object *);
01395 struct oval_behavior_iterator *oval_object_get_behaviors(struct oval_object *);
01412 bool oval_object_iterator_has_more(struct oval_object_iterator *);
01417 struct oval_object *oval_object_iterator_next(struct oval_object_iterator *);
01422 void oval_object_iterator_free(struct oval_object_iterator *);
01443 struct oval_state *oval_state_new(struct oval_definition_model *, const char *id);
01449 struct oval_state *oval_state_clone(struct oval_definition_model *new_model, struct oval_state *old_state);
01454 void oval_state_free(struct oval_state *);
01455
01469 void oval_state_set_subtype(struct oval_state *, oval_subtype_t subtype);
01475 void oval_state_add_note(struct oval_state *, char *note);
01481 void oval_state_set_comment(struct oval_state *, char *comment);
01486 void oval_state_set_deprecated(struct oval_state *, bool deprecated);
01495 void oval_state_set_version(struct oval_state *, int version);
01500 void oval_state_set_operator(struct oval_state *, oval_operator_t);
01513 void oval_state_add_content(struct oval_state *, struct oval_state_content *content);
01524 oval_family_t oval_state_get_family(struct oval_state *);
01530 const char *oval_state_get_name(struct oval_state *);
01535 oval_subtype_t oval_state_get_subtype(struct oval_state *);
01542 struct oval_string_iterator *oval_state_get_notes(struct oval_state *);
01548 char *oval_state_get_comment(struct oval_state *);
01554 char *oval_state_get_id(struct oval_state *);
01559 bool oval_state_get_deprecated(struct oval_state *);
01564 int oval_state_get_version(struct oval_state *);
01569 int oval_state_get_operator(struct oval_state *);
01576 struct oval_state_content_iterator *oval_state_get_contents(struct oval_state *);
01587 bool oval_state_iterator_has_more(struct oval_state_iterator *);
01592 struct oval_state *oval_state_iterator_next(struct oval_state_iterator *);
01597 void oval_state_iterator_free(struct oval_state_iterator *);
01630 struct oval_variable *oval_variable_new(struct oval_definition_model *model, const char *id, oval_variable_type_t type);
01636 struct oval_variable *oval_variable_clone(struct oval_definition_model *new_model, struct oval_variable *old_variable);
01641 void oval_variable_free(struct oval_variable *);
01642
01649 struct oval_variable_possible_value *oval_variable_possible_value_new(const char *hint, const char *value);
01650
01655 void oval_variable_possible_value_free(struct oval_variable_possible_value *pv);
01656
01661 char* oval_variable_possible_value_get_hint(struct oval_variable_possible_value* pv);
01662
01667 char* oval_variable_possible_value_get_value(struct oval_variable_possible_value* pv);
01668
01676 bool oval_variable_possible_value_iterator_has_more(struct oval_variable_possible_value_iterator*);
01680 struct oval_variable_possible_value *oval_variable_possible_value_iterator_next(struct oval_variable_possible_value_iterator*);
01684 int oval_variable_possible_value_iterator_remaining(struct oval_variable_possible_value_iterator*);
01688 void oval_variable_possible_value_iterator_free(struct oval_variable_possible_value_iterator*);
01698 struct oval_variable_possible_restriction *oval_variable_possible_restriction_new(oval_operator_t operator, const char *hint);
01699
01700
01705 void oval_variable_possible_restriction_free(struct oval_variable_possible_restriction *pr);
01706
01707
01715 bool oval_variable_possible_restriction_iterator_has_more(struct oval_variable_possible_restriction_iterator* iter);
01719 struct oval_variable_possible_restriction *oval_variable_possible_restriction_iterator_next(struct oval_variable_possible_restriction_iterator* iter);
01723 int oval_variable_possible_restriction_iterator_remaining(struct oval_variable_possible_restriction_iterator* iter);
01727 void oval_variable_possible_restriction_iterator_free(struct oval_variable_possible_restriction_iterator* iter);
01737 struct oval_variable_restriction *oval_variable_restriction_new(oval_operation_t operation, const char *value);
01738
01743 void oval_variable_restriction_free(struct oval_variable_restriction *r);
01744
01749 oval_operation_t oval_variable_restriction_get_operation(struct oval_variable_restriction* restriction);
01750
01755 char* oval_variable_restriction_get_value(struct oval_variable_restriction* restriction);
01756
01764 bool oval_variable_restriction_iterator_has_more(struct oval_variable_restriction_iterator*);
01768 struct oval_variable_restriction *oval_variable_restriction_iterator_next(struct oval_variable_restriction_iterator*);
01772 int oval_variable_restriction_iterator_remaining(struct oval_variable_restriction_iterator*);
01776 void oval_variable_restriction_iterator_free(struct oval_variable_restriction_iterator*);
01791 void oval_variable_set_comment(struct oval_variable *, char *comment);
01799 void oval_variable_set_version(struct oval_variable *, int version);
01805 void oval_variable_set_deprecated(struct oval_variable *, bool deprecated);
01813 void oval_variable_set_datatype(struct oval_variable *, oval_datatype_t);
01827 void oval_variable_add_value(struct oval_variable *, struct oval_value *);
01828
01829 void oval_variable_clear_values(struct oval_variable *);
01830
01837 void oval_variable_add_possible_value(struct oval_variable *variable, struct oval_variable_possible_value *pv);
01838
01845 void oval_variable_add_possible_restriction(struct oval_variable *variable, struct oval_variable_possible_restriction *pr);
01846
01853 void oval_variable_possible_restriction_add_restriction(struct oval_variable_possible_restriction *pr, struct oval_variable_restriction *r);
01854
01867 void oval_variable_set_component(struct oval_variable *, struct oval_component *component);
01879 char *oval_variable_get_id(struct oval_variable *);
01885 char *oval_variable_get_comment(struct oval_variable *);
01890 int oval_variable_get_version(struct oval_variable *);
01895 bool oval_variable_get_deprecated(struct oval_variable *);
01900 oval_variable_type_t oval_variable_get_type(struct oval_variable *);
01905 oval_datatype_t oval_variable_get_datatype(struct oval_variable *);
01913 struct oval_value_iterator *oval_variable_get_values(struct oval_variable *);
01920 struct oval_component *oval_variable_get_component(struct oval_variable *);
01921
01928 OSCAP_DEPRECATED(struct oval_iterator *oval_variable_get_possible_values(struct oval_variable *variable));
01929 struct oval_variable_possible_value_iterator *oval_variable_get_possible_values2(struct oval_variable *variable);
01930
01937 OSCAP_DEPRECATED(struct oval_iterator *oval_variable_get_possible_restrictions(struct oval_variable *variable));
01938 struct oval_variable_possible_restriction_iterator *oval_variable_get_possible_restrictions2(struct oval_variable *variable);
01939
01940
01947 OSCAP_DEPRECATED(struct oval_iterator *oval_variable_possible_restriction_get_restrictions(struct oval_variable_possible_restriction *possible_restriction));
01948 struct oval_variable_restriction_iterator *oval_variable_possible_restriction_get_restrictions2(struct oval_variable_possible_restriction *possible_restriction);
01949
01955 oval_operator_t oval_variable_possible_restriction_get_operator(struct oval_variable_possible_restriction *possible_restriction);
01956
01962 char* oval_variable_possible_restriction_get_hint(struct oval_variable_possible_restriction* possible_restriction);
01963
01968 const char *oval_component_type_get_text(oval_component_type_t type);
01979 bool oval_variable_iterator_has_more(struct oval_variable_iterator *);
01984 struct oval_variable *oval_variable_iterator_next(struct oval_variable_iterator *);
01989 void oval_variable_iterator_free(struct oval_variable_iterator *);
02002 struct oval_affected *oval_affected_new(struct oval_definition_model *);
02008 struct oval_affected *oval_affected_clone(struct oval_definition_model *new_model, struct oval_affected *old_affected);
02013 void oval_affected_free(struct oval_affected *);
02014
02023 void oval_affected_set_family(struct oval_affected *, oval_affected_family_t family);
02028 void oval_affected_add_platform(struct oval_affected *, char *platform_name);
02033 void oval_affected_add_product(struct oval_affected *, char *product_name);
02046 oval_affected_family_t oval_affected_get_family(struct oval_affected *);
02054 struct oval_string_iterator *oval_affected_get_platforms(struct oval_affected *);
02062 struct oval_string_iterator *oval_affected_get_products(struct oval_affected *);
02079 bool oval_affected_iterator_has_more(struct oval_affected_iterator *);
02084 struct oval_affected *oval_affected_iterator_next(struct oval_affected_iterator *);
02089 void oval_affected_iterator_free(struct oval_affected_iterator *);
02095 struct oval_reference *oval_reference_new(struct oval_definition_model *);
02100 struct oval_reference *oval_reference_clone
02101 (struct oval_definition_model *new_model, struct oval_reference *old_reference);
02105 void oval_reference_free(struct oval_reference *);
02106
02116 void oval_reference_set_source(struct oval_reference *, char *);
02120 void oval_reference_set_id(struct oval_reference *, char *);
02124 void oval_reference_set_url(struct oval_reference *, char *);
02136 char *oval_reference_get_source(struct oval_reference *);
02142 char *oval_reference_get_id(struct oval_reference *);
02148 char *oval_reference_get_url(struct oval_reference *);
02158 bool oval_reference_iterator_has_more(struct oval_reference_iterator *);
02162 struct oval_reference *oval_reference_iterator_next(struct oval_reference_iterator *);
02166 void oval_reference_iterator_free(struct oval_reference_iterator *);
02195 struct oval_criteria_node *oval_criteria_node_new(struct oval_definition_model *, oval_criteria_node_type_t type);
02201 struct oval_criteria_node *oval_criteria_node_clone
02202 (struct oval_definition_model *new_model, struct oval_criteria_node *old_node);
02207 void oval_criteria_node_free(struct oval_criteria_node *);
02208
02218 void oval_criteria_node_set_negate(struct oval_criteria_node *, bool negate);
02224 void oval_criteria_node_set_applicability_check(struct oval_criteria_node *, bool applicability_check);
02230 void oval_criteria_set_node_type(struct oval_criteria_node *node, oval_criteria_node_type_t type);
02236 void oval_criteria_node_set_comment(struct oval_criteria_node *, char *comment);
02244 void oval_criteria_node_set_operator(struct oval_criteria_node *, oval_operator_t op);
02255 void oval_criteria_node_add_subnode(struct oval_criteria_node *, struct oval_criteria_node *node);
02263 void oval_criteria_node_set_test(struct oval_criteria_node *, struct oval_test *);
02271 void oval_criteria_node_set_definition(struct oval_criteria_node *, struct oval_definition *);
02282 oval_criteria_node_type_t oval_criteria_node_get_type(struct oval_criteria_node *);
02287 bool oval_criteria_node_get_negate(struct oval_criteria_node *);
02292 bool oval_criteria_node_get_applicability_check(struct oval_criteria_node *);
02293
02299 char *oval_criteria_node_get_comment(struct oval_criteria_node *);
02305 oval_operator_t oval_criteria_node_get_operator(struct oval_criteria_node *);
02313 struct oval_criteria_node_iterator *oval_criteria_node_get_subnodes(struct oval_criteria_node *);
02320 struct oval_test *oval_criteria_node_get_test(struct oval_criteria_node *);
02327 struct oval_definition *oval_criteria_node_get_definition(struct oval_criteria_node *);
02338 bool oval_criteria_node_iterator_has_more(struct oval_criteria_node_iterator *);
02344 struct oval_criteria_node *oval_criteria_node_iterator_next(struct oval_criteria_node_iterator *);
02349 void oval_criteria_node_iterator_free(struct oval_criteria_node_iterator *);
02361 struct oval_object_content *oval_object_content_new(struct oval_definition_model *model, oval_object_content_type_t type);
02362
02367 struct oval_object_content *oval_object_content_clone
02368 (struct oval_definition_model *new_model, struct oval_object_content *old_content);
02369
02373 void oval_object_content_free(struct oval_object_content *);
02374
02383 void oval_object_content_set_type(struct oval_object_content *, oval_object_content_type_t);
02387 void oval_object_content_set_field_name(struct oval_object_content *, char *);
02391 void oval_object_content_set_entity(struct oval_object_content *, struct oval_entity *);
02395 void oval_object_content_set_varCheck(struct oval_object_content *, oval_check_t);
02399 void oval_object_content_set_setobject(struct oval_object_content *, struct oval_setobject *);
02403 void oval_object_content_set_filter(struct oval_object_content *, struct oval_filter *);
02415 char *oval_object_content_get_field_name(struct oval_object_content *);
02420 oval_object_content_type_t oval_object_content_get_type(struct oval_object_content *);
02426 struct oval_entity *oval_object_content_get_entity(struct oval_object_content *);
02431 oval_check_t oval_object_content_get_varCheck(struct oval_object_content *);
02437 struct oval_setobject *oval_object_content_get_setobject(struct oval_object_content *);
02443 struct oval_filter *oval_object_content_get_filter(struct oval_object_content *content);
02453 bool oval_object_content_iterator_has_more(struct oval_object_content_iterator *);
02457 struct oval_object_content *oval_object_content_iterator_next(struct oval_object_content_iterator *);
02461 void oval_object_content_iterator_free(struct oval_object_content_iterator *);
02473 struct oval_behavior *oval_behavior_new(struct oval_definition_model *);
02474
02479 struct oval_behavior *oval_behavior_clone(struct oval_definition_model *new_model, struct oval_behavior *old_behavior);
02483 void oval_behavior_free(struct oval_behavior *);
02484
02492 void oval_behavior_set_keyval(struct oval_behavior *behavior, const char *key, const char *value);
02504 char *oval_behavior_get_key(struct oval_behavior *);
02510 char *oval_behavior_get_value(struct oval_behavior *);
02520 bool oval_behavior_iterator_has_more(struct oval_behavior_iterator *);
02524 struct oval_behavior *oval_behavior_iterator_next(struct oval_behavior_iterator *);
02528 void oval_behavior_iterator_free(struct oval_behavior_iterator *);
02540 struct oval_state_content *oval_state_content_new(struct oval_definition_model *);
02545 struct oval_state_content *oval_state_content_clone (struct oval_definition_model *new_model, struct oval_state_content *old_content);
02549 void oval_state_content_free(struct oval_state_content *);
02550
02558 void oval_state_content_set_entity(struct oval_state_content *, struct oval_entity *);
02562 void oval_state_content_add_record_field(struct oval_state_content *, struct oval_record_field *);
02566 void oval_state_content_set_varcheck(struct oval_state_content *, oval_check_t);
02570 void oval_state_content_set_entcheck(struct oval_state_content *, oval_check_t);
02577 void oval_state_content_set_check_existence(struct oval_state_content *content, oval_existence_t existence);
02589 struct oval_entity *oval_state_content_get_entity(struct oval_state_content *);
02593 struct oval_record_field_iterator *oval_state_content_get_record_fields(struct oval_state_content *);
02598 oval_check_t oval_state_content_get_var_check(struct oval_state_content *);
02603 oval_check_t oval_state_content_get_ent_check(struct oval_state_content *);
02610 oval_existence_t oval_state_content_get_check_existence(struct oval_state_content *content);
02621 bool oval_state_content_iterator_has_more(struct oval_state_content_iterator *);
02625 struct oval_state_content *oval_state_content_iterator_next(struct oval_state_content_iterator *);
02629 void oval_state_content_iterator_free(struct oval_state_content_iterator *);
02635 struct oval_value *oval_value_new(oval_datatype_t datatype, char *text_value);
02640 struct oval_value *oval_value_clone(struct oval_value *old_value);
02644 void oval_value_free(struct oval_value *);
02645
02653 void oval_value_set_datatype(struct oval_value *, oval_datatype_t);
02654
02663 oval_datatype_t oval_value_get_datatype(struct oval_value *);
02669 char *oval_value_get_text(struct oval_value *);
02674 unsigned char *oval_value_get_binary(struct oval_value *);
02679 bool oval_value_get_boolean(struct oval_value *);
02684 float oval_value_get_float(struct oval_value *);
02689 long long oval_value_get_integer(struct oval_value *);
02699 bool oval_value_iterator_has_more(struct oval_value_iterator *);
02703 struct oval_value *oval_value_iterator_next(struct oval_value_iterator *);
02707 int oval_value_iterator_remaining(struct oval_value_iterator *iterator);
02711 void oval_value_iterator_free(struct oval_value_iterator *);
02723 struct oval_entity *oval_entity_new(struct oval_definition_model *);
02728 struct oval_entity *oval_entity_clone(struct oval_definition_model *model, struct oval_entity *old_entity);
02732 void oval_entity_free(struct oval_entity *);
02733
02741 void oval_entity_set_type(struct oval_entity *, oval_entity_type_t);
02745 void oval_entity_set_datatype(struct oval_entity *, oval_datatype_t);
02749 void oval_entity_set_mask(struct oval_entity *, int);
02753 void oval_entity_set_varref_type(struct oval_entity *, oval_entity_varref_type_t);
02757 void oval_entity_set_variable(struct oval_entity *, struct oval_variable *);
02761 void oval_entity_set_value(struct oval_entity *, struct oval_value *);
02765 void oval_entity_set_name(struct oval_entity *, char *);
02769 void oval_entity_set_operation(struct oval_entity *, oval_operation_t);
02781 char *oval_entity_get_name(struct oval_entity *);
02786 oval_entity_type_t oval_entity_get_type(struct oval_entity *);
02791 oval_datatype_t oval_entity_get_datatype(struct oval_entity *);
02796 oval_operation_t oval_entity_get_operation(struct oval_entity *);
02802 struct oval_variable *oval_entity_get_variable(struct oval_entity *);
02808 struct oval_value *oval_entity_get_value(struct oval_entity *);
02813 int oval_entity_get_mask(struct oval_entity *);
02818 oval_entity_varref_type_t oval_entity_get_varref_type(struct oval_entity *);
02828 bool oval_entity_iterator_has_more(struct oval_entity_iterator *);
02832 struct oval_entity *oval_entity_iterator_next(struct oval_entity_iterator *);
02836 void oval_entity_iterator_free(struct oval_entity_iterator *);
02848 struct oval_record_field *oval_record_field_new(oval_record_field_type_t);
02852 struct oval_record_field *oval_record_field_clone(struct oval_record_field *);
02856 void oval_record_field_free(struct oval_record_field *);
02857
02865 void oval_record_field_set_name(struct oval_record_field *, char *);
02869 void oval_record_field_set_value(struct oval_record_field *, char *);
02873 void oval_record_field_set_datatype(struct oval_record_field *, oval_datatype_t);
02877 void oval_record_field_set_mask(struct oval_record_field *, int);
02881 void oval_record_field_set_operation(struct oval_record_field *, oval_operation_t);
02885 void oval_record_field_set_variable(struct oval_record_field *, struct oval_variable *);
02889 void oval_record_field_set_var_check(struct oval_record_field *, oval_check_t);
02893 void oval_record_field_set_ent_check(struct oval_record_field *, oval_check_t);
02903 oval_record_field_type_t oval_record_field_get_type(struct oval_record_field *);
02907 char *oval_record_field_get_name(struct oval_record_field *);
02911 char *oval_record_field_get_value(struct oval_record_field *);
02915 oval_datatype_t oval_record_field_get_datatype(struct oval_record_field *);
02919 int oval_record_field_get_mask(struct oval_record_field *);
02923 oval_operation_t oval_record_field_get_operation(struct oval_record_field *);
02927 struct oval_variable *oval_record_field_get_variable(struct oval_record_field *);
02931 oval_check_t oval_record_field_get_var_check(struct oval_record_field *);
02935 oval_check_t oval_record_field_get_ent_check(struct oval_record_field *);
02945 bool oval_record_field_iterator_has_more(struct oval_record_field_iterator *);
02949 struct oval_record_field *oval_record_field_iterator_next(struct oval_record_field_iterator *);
02953 void oval_record_field_iterator_free(struct oval_record_field_iterator *);
02965 struct oval_filter *oval_filter_new(struct oval_definition_model *);
02969 void oval_filter_free(struct oval_filter *);
02973 struct oval_filter *oval_filter_clone(struct oval_definition_model *, struct oval_filter *);
02974
02982 void oval_filter_set_state(struct oval_filter *, struct oval_state *);
02986 void oval_filter_set_filter_action(struct oval_filter *, oval_filter_action_t );
02996 struct oval_state *oval_filter_get_state(struct oval_filter *);
03000 oval_filter_action_t oval_filter_get_filter_action(struct oval_filter *);
03010 bool oval_filter_iterator_has_more(struct oval_filter_iterator *);
03014 struct oval_filter *oval_filter_iterator_next(struct oval_filter_iterator *);
03018 void oval_filter_iterator_free(struct oval_filter_iterator *);
03030 struct oval_setobject *oval_setobject_new(struct oval_definition_model *);
03035 struct oval_setobject *oval_setobject_clone(struct oval_definition_model *new_model, struct oval_setobject *old_setobject);
03039 void oval_setobject_free(struct oval_setobject *);
03040
03047 void oval_setobject_set_type(struct oval_setobject *, oval_setobject_type_t);
03051 void oval_setobject_set_operation(struct oval_setobject *, oval_setobject_operation_t);
03055 void oval_setobject_add_subset(struct oval_setobject *, struct oval_setobject *);
03059 void oval_setobject_add_object(struct oval_setobject *, struct oval_object *);
03063 void oval_setobject_add_filter(struct oval_setobject *, struct oval_filter *);
03074 oval_setobject_type_t oval_setobject_get_type(struct oval_setobject *);
03079 oval_setobject_operation_t oval_setobject_get_operation(struct oval_setobject *);
03087 struct oval_setobject_iterator *oval_setobject_get_subsets(struct oval_setobject *);
03095 struct oval_object_iterator *oval_setobject_get_objects(struct oval_setobject *);
03103 struct oval_filter_iterator *oval_setobject_get_filters(struct oval_setobject *);
03113 bool oval_setobject_iterator_has_more(struct oval_setobject_iterator *);
03117 struct oval_setobject *oval_setobject_iterator_next(struct oval_setobject_iterator *);
03121 void oval_setobject_iterator_free(struct oval_setobject_iterator *);
03173 struct oval_component *oval_component_new(struct oval_definition_model *, oval_component_type_t type);
03179 struct oval_component *oval_component_clone(struct oval_definition_model *new_model,
03180 struct oval_component *old_component);
03185 void oval_component_free(struct oval_component *);
03186
03195 void oval_component_set_type(struct oval_component *component, oval_component_type_t type);
03201 void oval_component_set_object(struct oval_component *, struct oval_object *object);
03206 void oval_component_set_item_field(struct oval_component *, char *);
03211 void oval_component_set_record_field(struct oval_component *, char *);
03217 void oval_component_set_variable(struct oval_component *, struct oval_variable *variable);
03221 void oval_component_add_function_component(struct oval_component *, struct oval_component *);
03225 void oval_component_set_arithmetic_operation(struct oval_component *, oval_arithmetic_operation_t);
03229 void oval_component_set_prefix(struct oval_component *, char *);
03233 void oval_component_set_suffix(struct oval_component *, char *);
03237 void oval_component_set_split_delimiter(struct oval_component *, char *);
03241 void oval_component_set_glob_to_regex_glob_noescape(struct oval_component *, bool);
03245 void oval_component_set_substring_start(struct oval_component *, int);
03249 void oval_component_set_substring_length(struct oval_component *, int);
03253 void oval_component_set_timedif_format_1(struct oval_component *, oval_datetime_format_t);
03257 void oval_component_set_timedif_format_2(struct oval_component *, oval_datetime_format_t);
03261 void oval_component_set_regex_pattern(struct oval_component *, char *);
03265 void oval_component_set_literal_value(struct oval_component *, struct oval_value *);
03276 oval_component_type_t oval_component_get_type(struct oval_component *);
03284 struct oval_object *oval_component_get_object(struct oval_component *);
03291 char *oval_component_get_item_field(struct oval_component *);
03298 char *oval_component_get_record_field(struct oval_component *);
03306 struct oval_variable *oval_component_get_variable(struct oval_component *);
03314 struct oval_component_iterator *oval_component_get_function_components(struct oval_component *);
03320 oval_arithmetic_operation_t oval_component_get_arithmetic_operation(struct oval_component *);
03328 char *oval_component_get_prefix(struct oval_component *);
03336 char *oval_component_get_suffix(struct oval_component *);
03344 char *oval_component_get_split_delimiter(struct oval_component *);
03351 bool oval_component_get_glob_to_regex_glob_noescape(struct oval_component *);
03357 int oval_component_get_substring_start(struct oval_component *);
03363 int oval_component_get_substring_length(struct oval_component *);
03369 oval_datetime_format_t oval_component_get_timedif_format_1(struct oval_component *);
03375 oval_datetime_format_t oval_component_get_timedif_format_2(struct oval_component *);
03383 char *oval_component_get_regex_pattern(struct oval_component *);
03391 struct oval_value *oval_component_get_literal_value(struct oval_component *);
03402 bool oval_component_iterator_has_more(struct oval_component_iterator *);
03408 struct oval_component *oval_component_iterator_next(struct oval_component_iterator *);
03413 void oval_component_iterator_free(struct oval_component_iterator *);
03418 int oval_component_iterator_remaining(struct oval_component_iterator *);
03438 OSCAP_DEPRECATED(char *oval_determine_document_schema_version(const char *, oscap_document_type_t));
03439
03443 #endif