• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

/home/pvrabec/project/openscap/openscap-0.7.2/src/OVAL/public/oval_definitions.h

Go to the documentation of this file.
00001 
00016 /*
00017  * Copyright 2009-2010 Red Hat Inc., Durham, North Carolina.
00018  * All Rights Reserved.
00019  *
00020  * This library is free software; you can redistribute it and/or
00021  * modify it under the terms of the GNU Lesser General Public
00022  * License as published by the Free Software Foundation; either
00023  * version 2.1 of the License, or (at your option) any later version.
00024  *
00025  * This library is distributed in the hope that it will be useful,
00026  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00027  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00028  * Lesser General Public License for more details.
00029  *
00030  * You should have received a copy of the GNU Lesser General Public
00031  * License along with this library; if not, write to the Free Software
00032  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00033  *
00034  * Authors:
00035  *      "David Niemoller" <David.Niemoller@g2-inc.com>
00036  */
00037 
00038 
00039 #ifndef OVAL_DEFINITIONS
00040 #define OVAL_DEFINITIONS
00041 
00042 #include "oval_types.h"
00043 #include <stdbool.h>
00044 #include <libxml/tree.h>
00045 
00046 
00052 typedef enum {
00053         OVAL_AFCFML_UNKNOWN = 0,
00054         OVAL_AFCFML_CATOS = 1,
00055         OVAL_AFCFML_IOS = 2,
00056         OVAL_AFCFML_MACOS = 3,
00057         OVAL_AFCFML_PIXOS = 4,
00058         OVAL_AFCFML_UNDEFINED = 5,
00059         OVAL_AFCFML_UNIX = 6,
00060         OVAL_AFCFML_WINDOWS = 7
00061 } oval_affected_family_t;
00062 
00064 typedef enum {
00065         OVAL_NODETYPE_UNKNOWN = 0,
00066         OVAL_NODETYPE_CRITERIA = 1,
00067         OVAL_NODETYPE_CRITERION = 2,
00068         OVAL_NODETYPE_EXTENDDEF = 3
00069 } oval_criteria_node_type_t;
00070 
00072 typedef enum {
00073         OVAL_OPERATOR_UNKNOWN = 0,
00074         OVAL_OPERATOR_AND = 1,
00075         OVAL_OPERATOR_ONE = 2,
00076         OVAL_OPERATOR_OR = 3,
00077         OVAL_OPERATOR_XOR = 4
00078 } oval_operator_t;
00079 
00081 typedef enum {
00082         OVAL_OPERATION_UNKNOWN = 0,
00083         OVAL_OPERATION_EQUALS = 1,
00084         OVAL_OPERATION_NOT_EQUAL = 2,
00085         OVAL_OPERATION_CASE_INSENSITIVE_EQUALS = 3,
00086         OVAL_OPERATION_CASE_INSENSITIVE_NOT_EQUAL = 4,
00087         OVAL_OPERATION_GREATER_THAN = 5,
00088         OVAL_OPERATION_LESS_THAN = 6,
00089         OVAL_OPERATION_GREATER_THAN_OR_EQUAL = 7,
00090         OVAL_OPERATION_LESS_THAN_OR_EQUAL = 8,
00091         OVAL_OPERATION_BITWISE_AND = 9,
00092         OVAL_OPERATION_BITWISE_OR = 10,
00093         OVAL_OPERATION_PATTERN_MATCH = 11
00094 } oval_operation_t;
00095 
00097 typedef enum { OVAL_CLASS_UNKNOWN = 0, OVAL_CLASS_COMPLIANCE = 1, OVAL_CLASS_INVENTORY = 2, OVAL_CLASS_MISCELLANEOUS = 3, OVAL_CLASS_PATCH = 4, OVAL_CLASS_VULNERABILITY = 5,
00104 } oval_definition_class_t;
00105 
00107 typedef enum {
00108         OVAL_EXISTENCE_UNKNOWN = 0,
00109         OVAL_ALL_EXIST = 1,
00110         OVAL_ANY_EXIST = 2,
00111         OVAL_AT_LEAST_ONE_EXISTS = 3,
00112         OVAL_ONLY_ONE_EXISTS = 4,
00113         OVAL_NONE_EXIST = 5
00114 } oval_existence_t;
00115 
00117 typedef enum {
00118         OVAL_CHECK_UNKNOWN = 0,
00119         OVAL_CHECK_ALL = 1,
00120         OVAL_CHECK_AT_LEAST_ONE = 2,
00121         OVAL_CHECK_NONE_EXIST = 3,
00122         OVAL_CHECK_NONE_SATISFY = 4,
00123         OVAL_CHECK_ONLY_ONE = 5
00124 } oval_check_t;
00125 
00127 typedef enum {
00128         OVAL_OBJECTCONTENT_UNKNOWN = 0,
00129         OVAL_OBJECTCONTENT_ENTITY = 1,
00130         OVAL_OBJECTCONTENT_SET = 2,
00131         OVAL_OBJECTCONTENT_FILTER = 3
00132 } oval_object_content_type_t;
00133 
00135 typedef enum {
00136         OVAL_ENTITY_TYPE_UNKNOWN,
00137         OVAL_ENTITY_TYPE_ANY,
00138         OVAL_ENTITY_TYPE_BINARY,
00139         OVAL_ENTITY_TYPE_BOOLEAN,
00140         OVAL_ENTITY_TYPE_FLOAT,
00141         OVAL_ENTITY_TYPE_INTEGER,
00142         OVAL_ENTITY_TYPE_STRING,
00143 } oval_entity_type_t;
00144 
00146 typedef enum {
00147         OVAL_FILTER_ACTION_UNKNOWN = 0,
00148         OVAL_FILTER_ACTION_EXCLUDE,
00149         OVAL_FILTER_ACTION_INCLUDE
00150 } oval_filter_action_t;
00151 
00153 typedef enum {
00154         OVAL_DATATYPE_UNKNOWN = 0,
00155         OVAL_DATATYPE_BINARY = 1,
00156         OVAL_DATATYPE_BOOLEAN = 2,
00157         OVAL_DATATYPE_EVR_STRING = 3,
00158         OVAL_DATATYPE_FILESET_REVISION = 4,
00159         OVAL_DATATYPE_FLOAT = 5,
00160         OVAL_DATATYPE_IOS_VERSION = 6,
00161         OVAL_DATATYPE_VERSION = 7,
00162         OVAL_DATATYPE_INTEGER = 8,
00163         OVAL_DATATYPE_STRING = 9,
00164         OVAL_DATATYPE_RECORD = 10,
00165         OVAL_DATATYPE_SEXP = 11
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
00200 
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_component_type_t;
00217 
00219 typedef enum {
00220         OVAL_ARITHMETIC_UNKNOWN = 0,
00221         OVAL_ARITHMETIC_ADD = 1,
00222         OVAL_ARITHMETIC_MULTIPLY = 2,
00223         OVAL_ARITHMETIC_SUBTRACT = 3,   //NOT YET SUPPORTED BY OVAL
00224         OVAL_ARITHMETIC_DIVIDE = 4      //NOT YET SUPPORTED BY OVAL
00225 } oval_arithmetic_operation_t;
00226 
00228 typedef enum {
00229         OVAL_DATETIME_UNKNOWN = 0,
00230         OVAL_DATETIME_YEAR_MONTH_DAY = 1,
00231         OVAL_DATETIME_MONTH_DAY_YEAR = 2,
00232         OVAL_DATETIME_DAY_MONTH_YEAR = 3,
00233         OVAL_DATETIME_WIN_FILETIME = 4,
00234         OVAL_DATETIME_SECONDS_SINCE_EPOCH = 5
00235 } oval_datetime_format_t;
00236 
00237 typedef enum {
00238         OVAL_RECORD_FIELD_UNKNOWN = 0,
00239         OVAL_RECORD_FIELD_STATE = 1,
00240         OVAL_RECORD_FIELD_ITEM = 2,
00241 } oval_record_field_type_t;
00242 
00246 oval_family_t oval_subtype_get_family(oval_subtype_t);
00247 const char *oval_operator_get_text(oval_operator_t);
00248 const char *oval_subtype_get_text(oval_subtype_t);
00249 const char *oval_family_get_text(oval_family_t);
00250 const char *oval_check_get_text(oval_check_t);
00251 const char *oval_existence_get_text(oval_existence_t);
00252 const char *oval_affected_family_get_text(oval_affected_family_t);
00253 const char *oval_datatype_get_text(oval_datatype_t);
00254 oval_datatype_t oval_datatype_from_text(const char *);
00255 const char *oval_operation_get_text(oval_operation_t);
00256 const char *oval_set_operation_get_text(oval_setobject_operation_t);
00257 const char *oval_datetime_format_get_text(oval_datetime_format_t);
00258 const char *oval_arithmetic_operation_get_text(oval_arithmetic_operation_t);
00259 
00260 
00265 struct oval_definition_model;
00266 
00273 struct oval_definition;
00278 struct oval_definition_iterator;
00284 struct oval_test;
00289 struct oval_test_iterator;
00298 struct oval_object;
00303 struct oval_object_iterator;
00310 struct oval_state;
00315 struct oval_state_iterator;
00330 struct oval_variable;
00335 struct oval_variable_iterator;
00356 struct oval_affected;
00361 struct oval_affected_iterator;
00369 struct oval_reference;
00374 struct oval_reference_iterator;
00383 struct oval_criteria_node;
00388 struct oval_criteria_node_iterator;
00393 struct oval_object_content;
00398 struct oval_object_content_iterator;
00403 struct oval_behavior;
00408 struct oval_behavior_iterator;
00413 struct oval_state_content;
00418 struct oval_state_content_iterator;
00423 struct oval_value;
00428 struct oval_value_iterator;
00433 struct oval_entity;
00437 struct oval_entity_iterator;
00441 struct oval_record_field;
00445 struct oval_record_field_iterator;
00450 struct oval_setobject;
00455 struct oval_setobject_iterator;
00460 struct oval_filter;
00464 struct oval_filter_iterator;
00562 struct oval_component;
00567 struct oval_component_iterator;
00577 struct oval_string_iterator;
00578 
00582 struct oval_generator;
00583 
00584 struct oval_generator *oval_generator_new(void);
00585 void oval_generator_free(struct oval_generator *generator);
00586 struct oval_generator *oval_generator_clone(struct oval_generator *old_generator);
00587 char *oval_generator_get_product_name(struct oval_generator *generator);
00588 char *oval_generator_get_product_version(struct oval_generator *generator);
00589 char *oval_generator_get_schema_version(struct oval_generator *generator);
00590 char *oval_generator_get_timestamp(struct oval_generator *generator);
00591 bool oval_generator_is_valid(struct oval_generator *generator);
00592 void oval_generator_set_product_name(struct oval_generator *generator, char *product_name);
00593 void oval_generator_set_product_version(struct oval_generator *generator, char *product_version);
00594 void oval_generator_set_schema_version(struct oval_generator *generator, char *schema_version);
00595 void oval_generator_set_timestamp(struct oval_generator *generator, char *timestamp);
00596 
00601 struct oval_definition_model *oval_definition_model_new(void);
00608 struct oval_definition_model * oval_definition_model_import(const char *file);
00609 
00618 int oval_definition_model_merge(struct oval_definition_model *model, const char *file);
00619 
00625 struct oval_definition_model *oval_definition_model_clone(struct oval_definition_model *);
00631 int oval_definition_model_export(struct oval_definition_model *, const char *file);
00636 void oval_definition_model_free(struct oval_definition_model *model);
00637 
00642 void oval_definition_model_set_generator(struct oval_definition_model *model, struct oval_generator *generator);
00648 int oval_definition_model_bind_variable_model(struct oval_definition_model *, struct oval_variable_model *);
00649 
00650 void oval_definition_model_clear_external_variables(struct oval_definition_model *);
00657 void oval_definition_model_lock(struct oval_definition_model *definition_model);
00664 struct oval_generator *oval_definition_model_get_generator(struct oval_definition_model *model);
00672 struct oval_definition *oval_definition_model_get_definition(struct oval_definition_model *, const char *id);
00681 struct oval_test *oval_definition_model_get_test(struct oval_definition_model *model, const char *id);
00690 struct oval_object *oval_definition_model_get_object(struct oval_definition_model *model, const char *id);
00699 struct oval_state *oval_definition_model_get_state(struct oval_definition_model *model, const char *id);
00708 struct oval_variable *oval_definition_model_get_variable(struct oval_definition_model *model, const char *id);
00713 struct oval_definition_iterator *oval_definition_model_get_definitions(struct oval_definition_model *model);
00720 struct oval_test_iterator *oval_definition_model_get_tests(struct oval_definition_model *model);
00727 struct oval_object_iterator *oval_definition_model_get_objects(struct oval_definition_model *model);
00734 struct oval_state_iterator *oval_definition_model_get_states(struct oval_definition_model *model);
00741 struct oval_variable_iterator *oval_definition_model_get_variables(struct oval_definition_model *model);
00747 bool oval_definition_model_is_locked(struct oval_definition_model *definition_model);
00748 
00754 const char * oval_definition_model_supported(void);
00771 bool oval_definition_model_is_valid(struct oval_definition_model *definition_model);
00790 struct oval_definition *oval_definition_new(struct oval_definition_model *, const char *id);
00791 
00797 struct oval_definition *oval_definition_clone(struct oval_definition_model *new_model, struct oval_definition *old_definition);
00798 
00808 void oval_definition_free(struct oval_definition *);
00809 
00821 void oval_definition_set_version(struct oval_definition *, int version);
00829 void oval_definition_set_class(struct oval_definition *, oval_definition_class_t);
00835 void oval_definition_set_deprecated(struct oval_definition *, bool deprecated);
00843 void oval_definition_set_title(struct oval_definition *, char *title);
00851 void oval_definition_set_description(struct oval_definition *, char *description);
00862 void oval_definition_add_affected(struct oval_definition *, struct oval_affected *affected);
00873 void oval_definition_add_reference(struct oval_definition *, struct oval_reference *reference);
00879 void oval_definition_add_note(struct oval_definition *, char *note);
00893 void oval_definition_set_criteria(struct oval_definition *, struct oval_criteria_node *criteria);
00904 char *oval_definition_get_id(struct oval_definition *);
00910 int oval_definition_get_version(struct oval_definition *);
00915 oval_definition_class_t oval_definition_get_class(struct oval_definition *);
00920 bool oval_definition_get_deprecated(struct oval_definition *);
00926 char *oval_definition_get_title(struct oval_definition *);
00932 char *oval_definition_get_description(struct oval_definition *);
00939 struct oval_affected_iterator *oval_definition_get_affected(struct oval_definition *);
00946 struct oval_reference_iterator *oval_definition_get_references(struct oval_definition *);
00953 struct oval_string_iterator *oval_definition_get_notes(struct oval_definition *);
00960 xmlNode *oval_definition_get_metadata(struct oval_definition *);
00966 struct oval_criteria_node *oval_definition_get_criteria(struct oval_definition *);
00972 bool oval_definition_is_locked(struct oval_definition *definition);
00973 
00986 bool oval_definition_is_valid(struct oval_definition *definition);
00997 bool oval_definition_iterator_has_more(struct oval_definition_iterator *);
01003 struct oval_definition *oval_definition_iterator_next(struct oval_definition_iterator *);
01008 void oval_definition_iterator_free(struct oval_definition_iterator *);
01031 struct oval_test *oval_test_new(struct oval_definition_model *, const char *id);
01037 struct oval_test *oval_test_clone(struct oval_definition_model *new_model, struct oval_test *old_test);
01042 void oval_test_free(struct oval_test *);
01043 
01057 void oval_test_set_subtype(struct oval_test *, oval_subtype_t subtype);
01063 void oval_test_add_note(struct oval_test *, char *note);
01069 void oval_test_set_comment(struct oval_test *, char *comment);
01074 void oval_test_set_deprecated(struct oval_test *, bool deprecated);
01083 void oval_test_set_version(struct oval_test *, int version);
01088 void oval_test_set_state_operator(struct oval_test *, oval_operator_t);
01097 void oval_test_set_existence(struct oval_test *, oval_existence_t);
01107 void oval_test_set_check(struct oval_test *, oval_check_t);
01116 void oval_test_set_object(struct oval_test *, struct oval_object *);
01122 void oval_test_add_state(struct oval_test *, struct oval_state *);
01133 oval_family_t oval_test_get_family(struct oval_test *);
01138 oval_subtype_t oval_test_get_subtype(struct oval_test *);
01145 struct oval_string_iterator *oval_test_get_notes(struct oval_test *);
01151 char *oval_test_get_comment(struct oval_test *);
01157 char *oval_test_get_id(struct oval_test *);
01162 bool oval_test_get_deprecated(struct oval_test *);
01167 int oval_test_get_version(struct oval_test *);
01172 oval_operator_t oval_test_get_state_operator(struct oval_test *);
01177 oval_existence_t oval_test_get_existence(struct oval_test *);
01182 oval_check_t oval_test_get_check(struct oval_test *);
01188 struct oval_object *oval_test_get_object(struct oval_test *);
01195 struct oval_state_iterator *oval_test_get_states(struct oval_test *);
01201 bool oval_test_is_locked(struct oval_test *test);
01202 
01218 bool oval_test_is_valid(struct oval_test *);
01229 bool oval_test_iterator_has_more(struct oval_test_iterator *);
01234 struct oval_test *oval_test_iterator_next(struct oval_test_iterator *);
01239 void oval_test_iterator_free(struct oval_test_iterator *);
01260 struct oval_object *oval_object_new(struct oval_definition_model *, const char *id);
01266 struct oval_object *oval_object_clone(struct oval_definition_model *new_model, struct oval_object *old_object);
01271 void oval_object_free(struct oval_object *);
01272 
01286 void oval_object_set_subtype(struct oval_object *, oval_subtype_t subtype);
01292 void oval_object_add_note(struct oval_object *, char *note);
01293 
01299 void oval_object_set_comment(struct oval_object *, char *comment);
01300 
01305 void oval_object_set_deprecated(struct oval_object *, bool deprecated);
01314 void oval_object_set_version(struct oval_object *, int version);
01327 void oval_object_add_object_content(struct oval_object *, struct oval_object_content *content);
01340 void oval_object_add_behavior(struct oval_object *, struct oval_behavior *behavior);
01351 oval_family_t oval_object_get_family(struct oval_object *);
01357 const char *oval_object_get_name(struct oval_object *);
01362 oval_subtype_t oval_object_get_subtype(struct oval_object *);
01369 struct oval_string_iterator *oval_object_get_notes(struct oval_object *);
01375 char *oval_object_get_comment(struct oval_object *);
01381 char *oval_object_get_id(struct oval_object *);
01382 
01387 bool oval_object_get_deprecated(struct oval_object *);
01392 int oval_object_get_version(struct oval_object *);
01399 struct oval_object_content_iterator *oval_object_get_object_contents(struct oval_object *);
01406 struct oval_behavior_iterator *oval_object_get_behaviors(struct oval_object *);
01412 bool oval_object_is_locked(struct oval_object *object);
01426 bool oval_object_is_valid(struct oval_object *object);
01437 bool oval_object_iterator_has_more(struct oval_object_iterator *);
01442 struct oval_object *oval_object_iterator_next(struct oval_object_iterator *);
01447 void oval_object_iterator_free(struct oval_object_iterator *);
01468 struct oval_state *oval_state_new(struct oval_definition_model *, const char *id);
01474 struct oval_state *oval_state_clone(struct oval_definition_model *new_model, struct oval_state *old_state);
01479 void oval_state_free(struct oval_state *);
01480 
01494 void oval_state_set_subtype(struct oval_state *, oval_subtype_t subtype);
01500 void oval_state_add_note(struct oval_state *, char *note);
01506 void oval_state_set_comment(struct oval_state *, char *comment);
01511 void oval_state_set_deprecated(struct oval_state *, bool deprecated);
01520 void oval_state_set_version(struct oval_state *, int version);
01525 void oval_state_set_operator(struct oval_state *, oval_operator_t);
01538 void oval_state_add_content(struct oval_state *, struct oval_state_content *content);
01549 oval_family_t oval_state_get_family(struct oval_state *);
01555 const char *oval_state_get_name(struct oval_state *);
01560 oval_subtype_t oval_state_get_subtype(struct oval_state *);
01567 struct oval_string_iterator *oval_state_get_notes(struct oval_state *);
01573 char *oval_state_get_comment(struct oval_state *);
01579 char *oval_state_get_id(struct oval_state *);
01584 bool oval_state_get_deprecated(struct oval_state *);
01589 int oval_state_get_version(struct oval_state *);
01594 int oval_state_get_operator(struct oval_state *);
01601 struct oval_state_content_iterator *oval_state_get_contents(struct oval_state *);
01607 bool oval_state_is_locked(struct oval_state *state);
01618 bool oval_state_iterator_has_more(struct oval_state_iterator *);
01623 struct oval_state *oval_state_iterator_next(struct oval_state_iterator *);
01628 void oval_state_iterator_free(struct oval_state_iterator *);
01641 bool oval_state_is_valid(struct oval_state *state);
01668 struct oval_variable *oval_variable_new(struct oval_definition_model *model, const char *id, oval_variable_type_t type);
01674 struct oval_variable *oval_variable_clone(struct oval_definition_model *new_model, struct oval_variable *old_variable);
01679 void oval_variable_free(struct oval_variable *);
01680 
01692 void oval_variable_set_comment(struct oval_variable *, char *comment);
01700 void oval_variable_set_version(struct oval_variable *, int version);
01706 void oval_variable_set_deprecated(struct oval_variable *, bool deprecated);
01714 void oval_variable_set_datatype(struct oval_variable *, oval_datatype_t);
01728 void oval_variable_add_value(struct oval_variable *, struct oval_value *);      //type==OVAL_VARIABLE_CONSTANT
01729 
01730 void oval_variable_clear_values(struct oval_variable *);
01743 void oval_variable_set_component(struct oval_variable *, struct oval_component *component);     //type==OVAL_VARIABLE_LOCAL
01755 char *oval_variable_get_id(struct oval_variable *);
01761 char *oval_variable_get_comment(struct oval_variable *);
01766 int oval_variable_get_version(struct oval_variable *);
01771 bool oval_variable_get_deprecated(struct oval_variable *);
01776 oval_variable_type_t oval_variable_get_type(struct oval_variable *);
01781 oval_datatype_t oval_variable_get_datatype(struct oval_variable *);
01789 struct oval_value_iterator *oval_variable_get_values(struct oval_variable *);   //type==OVAL_VARIABLE_CONSTANT
01796 struct oval_component *oval_variable_get_component(struct oval_variable *);     //type==OVAL_VARIABLE_LOCAL
01801 const char *oval_component_type_get_text(oval_component_type_t type);
01807 bool oval_variable_is_locked(struct oval_variable *variable);
01818 bool oval_variable_iterator_has_more(struct oval_variable_iterator *);
01823 struct oval_variable *oval_variable_iterator_next(struct oval_variable_iterator *);
01828 void oval_variable_iterator_free(struct oval_variable_iterator *);
01849 bool oval_variable_is_valid(struct oval_variable *);
01856 struct oval_affected *oval_affected_new(struct oval_definition_model *);
01862 struct oval_affected *oval_affected_clone(struct oval_definition_model *new_model, struct oval_affected *old_affected);
01867 void oval_affected_free(struct oval_affected *);
01868 
01877 void oval_affected_set_family(struct oval_affected *, oval_affected_family_t family);
01882 void oval_affected_add_platform(struct oval_affected *, char *platform_name);
01887 void oval_affected_add_product(struct oval_affected *, char *product_name);
01900 oval_affected_family_t oval_affected_get_family(struct oval_affected *);
01908 struct oval_string_iterator *oval_affected_get_platforms(struct oval_affected *);
01916 struct oval_string_iterator *oval_affected_get_products(struct oval_affected *);
01922 bool oval_affected_is_locked(struct oval_affected *);
01933 bool oval_affected_is_valid(struct oval_affected *);
01944 bool oval_affected_iterator_has_more(struct oval_affected_iterator *);
01949 struct oval_affected *oval_affected_iterator_next(struct oval_affected_iterator *);
01954 void oval_affected_iterator_free(struct oval_affected_iterator *);
01960 struct oval_reference *oval_reference_new(struct oval_definition_model *);
01965 struct oval_reference *oval_reference_clone
01966     (struct oval_definition_model *new_model, struct oval_reference *old_reference);
01970 void oval_reference_free(struct oval_reference *);
01971 
01981 void oval_reference_set_source(struct oval_reference *, char *);
01985 void oval_reference_set_id(struct oval_reference *, char *);
01989 void oval_reference_set_url(struct oval_reference *, char *);
02001 char *oval_reference_get_source(struct oval_reference *);
02007 char *oval_reference_get_id(struct oval_reference *);
02013 char *oval_reference_get_url(struct oval_reference *);
02019 bool oval_reference_is_locked(struct oval_reference *reference);
02029 bool oval_reference_iterator_has_more(struct oval_reference_iterator *);
02033 struct oval_reference *oval_reference_iterator_next(struct oval_reference_iterator *);
02037 void oval_reference_iterator_free(struct oval_reference_iterator *);
02048 bool oval_reference_is_valid(struct oval_reference *reference);
02071 struct oval_criteria_node *oval_criteria_node_new(struct oval_definition_model *, oval_criteria_node_type_t type);
02077 struct oval_criteria_node *oval_criteria_node_clone
02078     (struct oval_definition_model *new_model, struct oval_criteria_node *old_node);
02083 void oval_criteria_node_free(struct oval_criteria_node *);
02084 
02094 void oval_criteria_node_set_negate(struct oval_criteria_node *, bool negate);
02100 void oval_criteria_set_node_type(struct oval_criteria_node *node, oval_criteria_node_type_t type);
02106 void oval_criteria_node_set_comment(struct oval_criteria_node *, char *comment);
02114 void oval_criteria_node_set_operator(struct oval_criteria_node *, oval_operator_t op);
02125 void oval_criteria_node_add_subnode(struct oval_criteria_node *, struct oval_criteria_node *node);
02133 void oval_criteria_node_set_test(struct oval_criteria_node *, struct oval_test *);
02141 void oval_criteria_node_set_definition(struct oval_criteria_node *, struct oval_definition *);  //type==NODETYPE_EXTENDDEF
02152 oval_criteria_node_type_t oval_criteria_node_get_type(struct oval_criteria_node *);
02157 bool oval_criteria_node_get_negate(struct oval_criteria_node *);
02163 char *oval_criteria_node_get_comment(struct oval_criteria_node *);
02169 oval_operator_t oval_criteria_node_get_operator(struct oval_criteria_node *);
02177 struct oval_criteria_node_iterator *oval_criteria_node_get_subnodes(struct oval_criteria_node *);
02184 struct oval_test *oval_criteria_node_get_test(struct oval_criteria_node *);
02191 struct oval_definition *oval_criteria_node_get_definition(struct oval_criteria_node *);
02197 bool oval_criteria_node_is_locked(struct oval_criteria_node *);
02208 bool oval_criteria_node_iterator_has_more(struct oval_criteria_node_iterator *);
02214 struct oval_criteria_node *oval_criteria_node_iterator_next(struct oval_criteria_node_iterator *);
02219 void oval_criteria_node_iterator_free(struct oval_criteria_node_iterator *);
02238 bool oval_criteria_node_is_valid(struct oval_criteria_node *);
02244 struct oval_object_content *oval_object_content_new(struct oval_definition_model *model, oval_object_content_type_t type);
02245 
02250 struct oval_object_content *oval_object_content_clone
02251     (struct oval_definition_model *new_model, struct oval_object_content *old_content);
02252 
02256 void oval_object_content_free(struct oval_object_content *);
02257 
02266 void oval_object_content_set_type(struct oval_object_content *, oval_object_content_type_t);
02270 void oval_object_content_set_field_name(struct oval_object_content *, char *);
02274 void oval_object_content_set_entity(struct oval_object_content *, struct oval_entity *);        //type == OVAL_OBJECTCONTENT_ENTITY
02278 void oval_object_content_set_varCheck(struct oval_object_content *, oval_check_t);      //type == OVAL_OBJECTCONTENT_ENTITY
02282 void oval_object_content_set_setobject(struct oval_object_content *, struct oval_setobject *);  //type == OVAL_OBJECTCONTENT_SET
02294 char *oval_object_content_get_field_name(struct oval_object_content *);
02299 oval_object_content_type_t oval_object_content_get_type(struct oval_object_content *);
02305 struct oval_entity *oval_object_content_get_entity(struct oval_object_content *);       //type == OVAL_OBJECTCONTENT_ENTITY
02310 oval_check_t oval_object_content_get_varCheck(struct oval_object_content *);    //type == OVAL_OBJECTCONTENT_ENTITY
02316 struct oval_setobject *oval_object_content_get_setobject(struct oval_object_content *); //type == OVAL_OBJECTCONTENT_SET
02322 bool oval_object_content_is_locked(struct oval_object_content *object_content);
02332 bool oval_object_content_iterator_has_more(struct oval_object_content_iterator *);
02336 struct oval_object_content *oval_object_content_iterator_next(struct oval_object_content_iterator *);
02340 void oval_object_content_iterator_free(struct oval_object_content_iterator *);
02356 bool oval_object_content_is_valid(struct oval_object_content *object_content);
02362 struct oval_behavior *oval_behavior_new(struct oval_definition_model *);
02363 
02368 struct oval_behavior *oval_behavior_clone(struct oval_definition_model *new_model, struct oval_behavior *old_behavior);
02372 void oval_behavior_free(struct oval_behavior *);
02373 
02381 void oval_behavior_set_keyval(struct oval_behavior *behavior, const char *key, const char *value);
02393 char *oval_behavior_get_key(struct oval_behavior *);
02399 char *oval_behavior_get_value(struct oval_behavior *);
02405 bool oval_behavior_is_locked(struct oval_behavior *behavior);
02415 bool oval_behavior_iterator_has_more(struct oval_behavior_iterator *);
02419 struct oval_behavior *oval_behavior_iterator_next(struct oval_behavior_iterator *);
02423 void oval_behavior_iterator_free(struct oval_behavior_iterator *);
02434 bool oval_behavior_is_valid(struct oval_behavior *behavior);
02440 struct oval_state_content *oval_state_content_new(struct oval_definition_model *);
02445 struct oval_state_content *oval_state_content_clone (struct oval_definition_model *new_model, struct oval_state_content *old_content);
02449 void oval_state_content_free(struct oval_state_content *);
02450 
02458 void oval_state_content_set_entity(struct oval_state_content *, struct oval_entity *);
02462 void oval_state_content_add_record_field(struct oval_state_content *, struct oval_record_field *);
02466 void oval_state_content_set_varcheck(struct oval_state_content *, oval_check_t);
02470 void oval_state_content_set_entcheck(struct oval_state_content *, oval_check_t);
02482 struct oval_entity *oval_state_content_get_entity(struct oval_state_content *);
02486 struct oval_record_field_iterator *oval_state_content_get_record_fields(struct oval_state_content *);
02491 oval_check_t oval_state_content_get_var_check(struct oval_state_content *);
02496 oval_check_t oval_state_content_get_ent_check(struct oval_state_content *);
02502 bool oval_state_content_is_locked(struct oval_state_content *);
02513 bool oval_state_content_iterator_has_more(struct oval_state_content_iterator *);
02517 struct oval_state_content *oval_state_content_iterator_next(struct oval_state_content_iterator *);
02521 void oval_state_content_iterator_free(struct oval_state_content_iterator *);
02527 struct oval_value *oval_value_new(oval_datatype_t datatype, char *text_value);
02532 struct oval_value *oval_value_clone(struct oval_value *old_value);
02536 void oval_value_free(struct oval_value *);
02537 
02546 oval_datatype_t oval_value_get_datatype(struct oval_value *);
02552 char *oval_value_get_text(struct oval_value *);
02557 unsigned char *oval_value_get_binary(struct oval_value *);      //datatype==OVAL_DATATYPE_BINARY
02562 bool oval_value_get_boolean(struct oval_value *);       //datatype==OVAL_DATATYPE_BOOLEAN
02567 float oval_value_get_float(struct oval_value *);        //datatype==OVAL_DATATYPE_FLOAT
02572 long oval_value_get_integer(struct oval_value *);       //datatype==OVAL_DATATYPE_INTEGER
02578 bool oval_value_is_locked(struct oval_value *value);
02588 bool oval_value_iterator_has_more(struct oval_value_iterator *);
02592 struct oval_value *oval_value_iterator_next(struct oval_value_iterator *);
02596 int oval_value_iterator_remaining(struct oval_value_iterator *iterator);
02600 void oval_value_iterator_free(struct oval_value_iterator *);
02611 bool oval_value_is_valid(struct oval_value *value);
02617 struct oval_entity *oval_entity_new(struct oval_definition_model *);
02622 struct oval_entity *oval_entity_clone(struct oval_definition_model *model, struct oval_entity *old_entity);
02626 void oval_entity_free(struct oval_entity *);
02627 
02635 void oval_entity_set_type(struct oval_entity *, oval_entity_type_t);
02639 void oval_entity_set_datatype(struct oval_entity *, oval_datatype_t);
02643 void oval_entity_set_mask(struct oval_entity *, int);
02647 void oval_entity_set_varref_type(struct oval_entity *, oval_entity_varref_type_t);
02651 void oval_entity_set_variable(struct oval_entity *, struct oval_variable *);
02655 void oval_entity_set_value(struct oval_entity *, struct oval_value *);
02659 void oval_entity_set_name(struct oval_entity *, char *);
02663 void oval_entity_set_operation(struct oval_entity *, oval_operation_t);
02675 char *oval_entity_get_name(struct oval_entity *);
02680 oval_entity_type_t oval_entity_get_type(struct oval_entity *);
02685 oval_datatype_t oval_entity_get_datatype(struct oval_entity *);
02690 oval_operation_t oval_entity_get_operation(struct oval_entity *);
02696 struct oval_variable *oval_entity_get_variable(struct oval_entity *);
02702 struct oval_value *oval_entity_get_value(struct oval_entity *);
02707 int oval_entity_get_mask(struct oval_entity *);
02712 oval_entity_varref_type_t oval_entity_get_varref_type(struct oval_entity *);
02718 bool oval_entity_is_locked(struct oval_entity *entity);
02728 bool oval_entity_iterator_has_more(struct oval_entity_iterator *);
02732 struct oval_entity *oval_entity_iterator_next(struct oval_entity_iterator *);
02736 void oval_entity_iterator_free(struct oval_entity_iterator *);
02747 bool oval_entity_is_valid(struct oval_entity *entity);
02753 struct oval_record_field *oval_record_field_new(oval_record_field_type_t);
02757 struct oval_record_field *oval_record_field_clone(struct oval_record_field *);
02761 void oval_record_field_free(struct oval_record_field *);
02762 
02770 void oval_record_field_set_name(struct oval_record_field *, char *);
02774 void oval_record_field_set_value(struct oval_record_field *, char *);
02778 void oval_record_field_set_datatype(struct oval_record_field *, oval_datatype_t);
02782 void oval_record_field_set_mask(struct oval_record_field *, int);
02786 void oval_record_field_set_operation(struct oval_record_field *, oval_operation_t);
02790 void oval_record_field_set_variable(struct oval_record_field *, struct oval_variable *);
02794 void oval_record_field_set_var_check(struct oval_record_field *, oval_check_t);
02798 void oval_record_field_set_ent_check(struct oval_record_field *, oval_check_t);
02808 oval_record_field_type_t oval_record_field_get_type(struct oval_record_field *);
02812 char *oval_record_field_get_name(struct oval_record_field *);
02816 char *oval_record_field_get_value(struct oval_record_field *);
02820 oval_datatype_t oval_record_field_get_datatype(struct oval_record_field *);
02824 int oval_record_field_get_mask(struct oval_record_field *);
02828 oval_operation_t oval_record_field_get_operation(struct oval_record_field *);
02832 struct oval_variable *oval_record_field_get_variable(struct oval_record_field *);
02836 oval_check_t oval_record_field_get_var_check(struct oval_record_field *);
02840 oval_check_t oval_record_field_get_ent_check(struct oval_record_field *);
02850 bool oval_record_field_iterator_has_more(struct oval_record_field_iterator *);
02854 struct oval_record_field *oval_record_field_iterator_next(struct oval_record_field_iterator *);
02858 void oval_record_field_iterator_free(struct oval_record_field_iterator *);
02865 bool oval_record_field_is_valid(struct oval_record_field *);
02871 struct oval_filter *oval_filter_new(struct oval_definition_model *);
02875 void oval_filter_free(struct oval_filter *);
02879 struct oval_filter *oval_filter_clone(struct oval_definition_model *, struct oval_filter *);
02880 
02888 void oval_filter_set_state(struct oval_filter *, struct oval_state *);
02892 void oval_filter_set_filter_action(struct oval_filter *, oval_filter_action_t );
02902 bool oval_filter_is_locked(struct oval_filter *);
02906 struct oval_state *oval_filter_get_state(struct oval_filter *);
02910 oval_filter_action_t oval_filter_get_filter_action(struct oval_filter *);
02920 bool oval_filter_iterator_has_more(struct oval_filter_iterator *);
02924 struct oval_filter *oval_filter_iterator_next(struct oval_filter_iterator *);
02928 void oval_filter_iterator_free(struct oval_filter_iterator *);
02938 bool oval_filter_is_valid(struct oval_filter *);
02944 struct oval_setobject *oval_setobject_new(struct oval_definition_model *);
02949 struct oval_setobject *oval_setobject_clone(struct oval_definition_model *new_model, struct oval_setobject *old_setobject);
02953 void oval_setobject_free(struct oval_setobject *);
02954 
02961 void oval_setobject_set_type(struct oval_setobject *, oval_setobject_type_t);
02965 void oval_setobject_set_operation(struct oval_setobject *, oval_setobject_operation_t);
02969 void oval_setobject_add_subset(struct oval_setobject *, struct oval_setobject *);       //type==OVAL_SET_AGGREGATE;
02973 void oval_setobject_add_object(struct oval_setobject *, struct oval_object *);  //type==OVAL_SET_COLLECTIVE;
02977 void oval_setobject_add_filter(struct oval_setobject *, struct oval_filter *);  //type==OVAL_SET_COLLECTIVE;
02988 oval_setobject_type_t oval_setobject_get_type(struct oval_setobject *);
02993 oval_setobject_operation_t oval_setobject_get_operation(struct oval_setobject *);
03001 struct oval_setobject_iterator *oval_setobject_get_subsets(struct oval_setobject *);    //type==OVAL_SET_AGGREGATE;
03009 struct oval_object_iterator *oval_setobject_get_objects(struct oval_setobject *);       //type==OVAL_SET_COLLECTIVE;
03017 struct oval_filter_iterator *oval_setobject_get_filters(struct oval_setobject *);       //type==OVAL_SET_COLLECTIVE;
03023 bool oval_setobject_is_locked(struct oval_setobject *setobject);
03033 bool oval_setobject_iterator_has_more(struct oval_setobject_iterator *);
03037 struct oval_setobject *oval_setobject_iterator_next(struct oval_setobject_iterator *);
03041 void oval_setobject_iterator_free(struct oval_setobject_iterator *);
03061 bool oval_setobject_is_valid(struct oval_setobject *setobject);
03105 struct oval_component *oval_component_new(struct oval_definition_model *, oval_component_type_t type);
03111 struct oval_component *oval_component_clone(struct oval_definition_model *new_model,
03112                                             struct oval_component *old_component);
03117 void oval_component_free(struct oval_component *);
03118 
03127 void oval_component_set_type(struct oval_component *component, oval_component_type_t type);
03133 void oval_component_set_object(struct oval_component *, struct oval_object *object);
03138 void oval_component_set_item_field(struct oval_component *, char *);
03143 void oval_component_set_record_field(struct oval_component *, char *);
03149 void oval_component_set_variable(struct oval_component *, struct oval_variable *variable);
03153 void oval_component_add_function_component(struct oval_component *, struct oval_component *);   //type==OVAL_COMPONENT_FUNCTION
03157 void oval_component_set_arithmetic_operation(struct oval_component *, oval_arithmetic_operation_t);     //type==OVAL_COMPONENT_ARITHMETIC
03161 void oval_component_set_prefix(struct oval_component *, char *);        //type==OVAL_COMPONENT_BEGIN
03165 void oval_component_set_suffix(struct oval_component *, char *);        //type==OVAL_COMPONENT_END
03169 void oval_component_set_split_delimiter(struct oval_component *, char *);       //type==OVAL_COMPONENT_SPLIT
03173 void oval_component_set_substring_start(struct oval_component *, int);  //type==OVAL_COMPONENT_SUBSTRING
03177 void oval_component_set_substring_length(struct oval_component *, int); //type==OVAL_COMPONENT_SUBSTRING
03181 void oval_component_set_timedif_format_1(struct oval_component *, oval_datetime_format_t);      //type==OVAL_COMPONENT_TIMEDIF
03185 void oval_component_set_timedif_format_2(struct oval_component *, oval_datetime_format_t);      //type==OVAL_COMPONENT_TIMEDIF
03189 void oval_component_set_regex_pattern(struct oval_component *, char *); //type==OVAL_COMPONENT_REGEX_CAPTURE
03193 void oval_component_set_literal_value(struct oval_component *, struct oval_value *);    //type==OVAL_COMPONENT_LITERAL
03204 oval_component_type_t oval_component_get_type(struct oval_component *);
03212 struct oval_object *oval_component_get_object(struct oval_component *); //type==OVAL_COMPONENT_OBJECTREF
03219 char *oval_component_get_item_field(struct oval_component *);
03226 char *oval_component_get_record_field(struct oval_component *);
03234 struct oval_variable *oval_component_get_variable(struct oval_component *);
03242 struct oval_component_iterator *oval_component_get_function_components(struct oval_component *);        //type==OVAL_COMPONENT_FUNCTION
03248 oval_arithmetic_operation_t oval_component_get_arithmetic_operation(struct oval_component *);   //type==OVAL_COMPONENT_ARITHMETIC
03256 char *oval_component_get_prefix(struct oval_component *);       //type==OVAL_COMPONENT_BEGIN
03264 char *oval_component_get_suffix(struct oval_component *);       //type==OVAL_COMPONENT_END
03272 char *oval_component_get_split_delimiter(struct oval_component *);      //type==OVAL_COMPONENT_SPLIT
03278 int oval_component_get_substring_start(struct oval_component *);        //type==OVAL_COMPONENT_SUBSTRING
03284 int oval_component_get_substring_length(struct oval_component *);       //type==OVAL_COMPONENT_SUBSTRING
03290 oval_datetime_format_t oval_component_get_timedif_format_1(struct oval_component *);    //type==OVAL_COMPONENT_TIMEDIF
03296 oval_datetime_format_t oval_component_get_timedif_format_2(struct oval_component *);    //type==OVAL_COMPONENT_TIMEDIF
03304 char *oval_component_get_regex_pattern(struct oval_component *);        //type==OVAL_COMPONENT_REGEX_CAPTURE
03312 struct oval_value *oval_component_get_literal_value(struct oval_component *);   //type==OVAL_COMPONENT_LITERAL
03318 bool oval_component_is_locked(struct oval_component *component);
03329 bool oval_component_iterator_has_more(struct oval_component_iterator *);
03335 struct oval_component *oval_component_iterator_next(struct oval_component_iterator *);
03340 void oval_component_iterator_free(struct oval_component_iterator *);
03345 int oval_component_iterator_remaining(struct oval_component_iterator *);
03400 bool oval_component_is_valid(struct oval_component *);
03411 bool oval_string_iterator_has_more(struct oval_string_iterator *);
03416 char *oval_string_iterator_next(struct oval_string_iterator *);
03421 int oval_string_iterator_remaining(struct oval_string_iterator *);
03426 void oval_string_iterator_free(struct oval_string_iterator *);
03433 #endif

Generated on Wed Apr 20 2011 for Open SCAP Library by  doxygen 1.7.1