| oval_definitions.h | | oval_definitions.h | |
| | | | |
| skipping to change at line 214 | | skipping to change at line 214 | |
| OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2, | | OVAL_FUNCTION_CONCAT = OVAL_FUNCTION + 2, | |
| OVAL_FUNCTION_END = OVAL_FUNCTION + 3, | | OVAL_FUNCTION_END = OVAL_FUNCTION + 3, | |
| OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4, | | OVAL_FUNCTION_SPLIT = OVAL_FUNCTION + 4, | |
| OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5, | | OVAL_FUNCTION_SUBSTRING = OVAL_FUNCTION + 5, | |
| OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6, | | OVAL_FUNCTION_TIMEDIF = OVAL_FUNCTION + 6, | |
| OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7, | | OVAL_FUNCTION_ESCAPE_REGEX = OVAL_FUNCTION + 7, | |
| OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8, | | OVAL_FUNCTION_REGEX_CAPTURE = OVAL_FUNCTION + 8, | |
| OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9, | | OVAL_FUNCTION_ARITHMETIC = OVAL_FUNCTION + 9, | |
| OVAL_FUNCTION_COUNT = OVAL_FUNCTION + 10, | | OVAL_FUNCTION_COUNT = OVAL_FUNCTION + 10, | |
| OVAL_FUNCTION_UNIQUE = OVAL_FUNCTION + 11, | | OVAL_FUNCTION_UNIQUE = OVAL_FUNCTION + 11, | |
|
| OVAL_FUNCTION_LAST = OVAL_FUNCTION + 12 | | OVAL_FUNCTION_GLOB_TO_REGEX = OVAL_FUNCTION + 12, | |
| | | OVAL_FUNCTION_LAST = OVAL_FUNCTION + 13 | |
| } oval_component_type_t; | | } oval_component_type_t; | |
| | | | |
| /// Arithmetic format enumeration | | /// Arithmetic format enumeration | |
| typedef enum { | | typedef enum { | |
| OVAL_ARITHMETIC_UNKNOWN = 0, | | OVAL_ARITHMETIC_UNKNOWN = 0, | |
| OVAL_ARITHMETIC_ADD = 1, | | OVAL_ARITHMETIC_ADD = 1, | |
| OVAL_ARITHMETIC_MULTIPLY = 2, | | OVAL_ARITHMETIC_MULTIPLY = 2, | |
| OVAL_ARITHMETIC_SUBTRACT = 3, //NOT YET SUPPORTED BY OVAL | | OVAL_ARITHMETIC_SUBTRACT = 3, //NOT YET SUPPORTED BY OVAL | |
| OVAL_ARITHMETIC_DIVIDE = 4 //NOT YET SUPPORTED BY OVAL | | OVAL_ARITHMETIC_DIVIDE = 4 //NOT YET SUPPORTED BY OVAL | |
| } oval_arithmetic_operation_t; | | } oval_arithmetic_operation_t; | |
| | | | |
| skipping to change at line 331 | | skipping to change at line 332 | |
| * - The value stream is determined by a set of specified const
ants (see @ref oval_variable_add_value) | | * - The value stream is determined by a set of specified const
ants (see @ref oval_variable_add_value) | |
| * - if @ref oval_variable_type == @ref OVAL_VARIABLE_LOCAL | | * - if @ref oval_variable_type == @ref OVAL_VARIABLE_LOCAL | |
| * - The value stream is specified by either a single component
or a complex function, meaning that a value can be as simple as a literal
string or as | | * - The value stream is specified by either a single component
or a complex function, meaning that a value can be as simple as a literal
string or as | |
| * complex as multiple registry keys concatenated together. | | * complex as multiple registry keys concatenated together. | |
| * Note that if an individual component is used and it returns
multiple values, then there will be multiple values associated with the Ova
l_local. | | * Note that if an individual component is used and it returns
multiple values, then there will be multiple values associated with the Ova
l_local. | |
| * For example, if an object is specified as the local source a
nd it references a file object that identifies a set of 5 files, | | * For example, if an object is specified as the local source a
nd it references a file object that identifies a set of 5 files, | |
| * then the local variable would represent these 5 values. | | * then the local variable would represent these 5 values. | |
| */ | | */ | |
| struct oval_variable; | | struct oval_variable; | |
| /** | | /** | |
|
| | | * @struct oval_variable_possible_value | |
| | | */ | |
| | | struct oval_variable_possible_value; | |
| | | /** | |
| | | * @struct oval_variable_possible_restriction | |
| | | */ | |
| | | struct oval_variable_possible_restriction; | |
| | | /** | |
| | | * @struct oval_variable_restriction | |
| | | */ | |
| | | struct oval_variable_restriction; | |
| | | /** | |
| * @struct oval_variable_iterator | | * @struct oval_variable_iterator | |
| * @see oval_definition_model_get_variables | | * @see oval_definition_model_get_variables | |
| */ | | */ | |
| struct oval_variable_iterator; | | struct oval_variable_iterator; | |
| /** | | /** | |
| * @struct oval_affected | | * @struct oval_affected | |
| * Each OVAL Definition specifies certain type of affected system(s). The f
amily, platform(s), | | * Each OVAL Definition specifies certain type of affected system(s). The f
amily, platform(s), | |
| * and product(s) of this target are described by the Oval_affected compone
nt whose main purpose is to provide hints | | * and product(s) of this target are described by the Oval_affected compone
nt whose main purpose is to provide hints | |
| * for tools using OVAL Definitions. For instance, to help a reporting tool
only use Windows definitions, | | * for tools using OVAL Definitions. For instance, to help a reporting tool
only use Windows definitions, | |
| * or to preselect only Red Hat definitions to be evaluated. Note, the incl
usion of a particular platform | | * or to preselect only Red Hat definitions to be evaluated. Note, the incl
usion of a particular platform | |
| | | | |
| skipping to change at line 1611 | | skipping to change at line 1624 | |
| * @memberof oval_variable | | * @memberof oval_variable | |
| */ | | */ | |
| struct oval_variable *oval_variable_clone(struct oval_definition_model *new
_model, struct oval_variable *old_variable); | | struct oval_variable *oval_variable_clone(struct oval_definition_model *new
_model, struct oval_variable *old_variable); | |
| /** | | /** | |
| * Free instance of @ref oval_variable. | | * Free instance of @ref oval_variable. | |
| * @memberof oval_variable | | * @memberof oval_variable | |
| */ | | */ | |
| void oval_variable_free(struct oval_variable *); | | void oval_variable_free(struct oval_variable *); | |
| | | | |
| /** | | /** | |
|
| | | * Construct new instance of possible_value element. | |
| | | * @param hint A short description of what the value means or represents. | |
| | | * @param value An expected value of an external variable | |
| | | * @memberof oval_variable_possible_value | |
| | | */ | |
| | | struct oval_variable_possible_value *oval_variable_possible_value_new(const | |
| | | char *hint, const char *value); | |
| | | | |
| | | /** | |
| | | * Free instance of possible_value | |
| | | * @memberof oval_variable_possible_value | |
| | | */ | |
| | | void oval_variable_possible_value_free(struct oval_variable_possible_value | |
| | | *pv); | |
| | | | |
| | | /** | |
| | | * Construct new instance of possible_restriction element. | |
| | | * @param operator Operator to evaluation | |
| | | * @param hint A short description of what the value means or represents. | |
| | | * @memberof oval_variable_possible_restriction | |
| | | */ | |
| | | struct oval_variable_possible_restriction *oval_variable_possible_restricti | |
| | | on_new(oval_operator_t operator, const char *hint); | |
| | | | |
| | | /** | |
| | | * Free instance of possible_restriction | |
| | | * @memberof oval_variable_possible_restriction | |
| | | */ | |
| | | void oval_variable_possible_restriction_free(struct oval_variable_possible_ | |
| | | restriction *pr); | |
| | | | |
| | | /** | |
| | | * Construct new instance of restriction element. | |
| | | * @param operation Operation of restriction. | |
| | | * @param value Restriction placed on expected values for an external varia | |
| | | ble. | |
| | | * @memberof oval_variable_restriction | |
| | | */ | |
| | | struct oval_variable_restriction *oval_variable_restriction_new(oval_operat | |
| | | ion_t operation, const char *value); | |
| | | | |
| | | /** | |
| | | * Free instance of restriction element. | |
| | | * @memberof oval_variable_restriction | |
| | | */ | |
| | | void oval_variable_restriction_free(struct oval_variable_restriction *r); | |
| | | | |
| | | /** | |
| * @name Setters | | * @name Setters | |
| * @{ | | * @{ | |
| */ | | */ | |
| /** | | /** | |
| * set attribute @ref oval_variable->comment. | | * set attribute @ref oval_variable->comment. | |
| * If attribute oval_variable->comment == NULL this method shall overwrite
the attribute with a copy of the comment parameter. | | * If attribute oval_variable->comment == NULL this method shall overwrite
the attribute with a copy of the comment parameter. | |
| * Otherwise the variable state shall be unchanged. | | * Otherwise the variable state shall be unchanged. | |
| * @param comm - (Not NULL) a copy of the comment parameter is set as the
comment attribute. | | * @param comm - (Not NULL) a copy of the comment parameter is set as the
comment attribute. | |
| * @memberof oval_variable | | * @memberof oval_variable | |
| */ | | */ | |
| | | | |
| skipping to change at line 1660 | | skipping to change at line 1715 | |
| * @note When a value is appended to an Oval_constant by an application, th
at value should not be subsequently | | * @note When a value is appended to an Oval_constant by an application, th
at value should not be subsequently | |
| * freed by the application using @ref oval_value_free. | | * freed by the application using @ref oval_value_free. | |
| * @note An application should not append an Oval_value to more than one Ov
al_constant, and that | | * @note An application should not append an Oval_value to more than one Ov
al_constant, and that | |
| * an Oval_value should not be bound more than once to a single Oval_consta
nt. | | * an Oval_value should not be bound more than once to a single Oval_consta
nt. | |
| * @param value - the required value. | | * @param value - the required value. | |
| * @memberof oval_variable | | * @memberof oval_variable | |
| */ | | */ | |
| void oval_variable_add_value(struct oval_variable *, struct oval_value *);
//type==OVAL_VARIABLE_CONSTANT | | void oval_variable_add_value(struct oval_variable *, struct oval_value *);
//type==OVAL_VARIABLE_CONSTANT | |
| | | | |
| void oval_variable_clear_values(struct oval_variable *); | | void oval_variable_clear_values(struct oval_variable *); | |
|
| | | | |
| | | /** | |
| | | * Add a new possible value to an external variable. | |
| | | * @param variable Variable to add. | |
| | | * @param pv The new possible_value. | |
| | | * @memberof oval_variable | |
| | | */ | |
| | | void oval_variable_add_possible_value(struct oval_variable *variable, struc | |
| | | t oval_variable_possible_value *pv); | |
| | | | |
| | | /** | |
| | | * Add a new possible restriction to an external variable. | |
| | | * @param variable Variable to add. | |
| | | * @param pr The new possible_restriction. | |
| | | * @memberof oval_variable | |
| | | */ | |
| | | void oval_variable_add_possible_restriction(struct oval_variable *variable, | |
| | | struct oval_variable_possible_restriction *pr); | |
| | | | |
| | | /** | |
| | | * Add a restriction to the list of possible restrictions. | |
| | | * @param pr A possible_restriction type | |
| | | * @param r Restriction which will be added | |
| | | * @memberof oval_variable_possible_restriction | |
| | | */ | |
| | | void oval_variable_possible_restriction_add_restriction(struct oval_variabl | |
| | | e_possible_restriction *pr, struct oval_variable_restriction *r); | |
| | | | |
| /** | | /** | |
| * Bind an instance of @ref Oval_component to the attribute @ref Oval_local
->component. | | * Bind an instance of @ref Oval_component to the attribute @ref Oval_local
->component. | |
| * If attribute type <> @ref OVAL_VARIABLE_LOCAL, the component attribute <
> NULL or the component parameter is NULL the state of the oval_variable sh
all not be changed by this | | * If attribute type <> @ref OVAL_VARIABLE_LOCAL, the component attribute <
> NULL or the component parameter is NULL the state of the oval_variable sh
all not be changed by this | |
| * method. | | * method. | |
| * Otherwise, The component parameter shall be bound to the component attri
bute and shall be freed by the API when the Oval_local is freed | | * Otherwise, The component parameter shall be bound to the component attri
bute and shall be freed by the API when the Oval_local is freed | |
| * | | * | |
| * @note When an Oval_component is bound to an Oval_local by an application
, the Oval_component should not be subsequently | | * @note When an Oval_component is bound to an Oval_local by an application
, the Oval_component should not be subsequently | |
| * freed by the application using @ref oval_component_free. | | * freed by the application using @ref oval_component_free. | |
| * @note An application should not bind a single Oval_component to more tha
n one Oval_local or to an Oval_local and an @ref Oval_function. | | * @note An application should not bind a single Oval_component to more tha
n one Oval_local or to an Oval_local and an @ref Oval_function. | |
| * @param component - the required component. | | * @param component - the required component. | |
| | | | |
| skipping to change at line 1726 | | skipping to change at line 1806 | |
| * @memberof oval_variable | | * @memberof oval_variable | |
| */ | | */ | |
| struct oval_value_iterator *oval_variable_get_values(struct oval_variable *
); //type==OVAL_VARIABLE_CONSTANT | | struct oval_value_iterator *oval_variable_get_values(struct oval_variable *
); //type==OVAL_VARIABLE_CONSTANT | |
| /** | | /** | |
| * Returns attribute @ref Oval_local->component. | | * Returns attribute @ref Oval_local->component. | |
| * If attribute type <> @ref OVAL_VARIABLE_LOCAL this method shall return N
ULL. | | * If attribute type <> @ref OVAL_VARIABLE_LOCAL this method shall return N
ULL. | |
| * @return A pointer to the component attribute of the specified @ref oval_
variable. | | * @return A pointer to the component attribute of the specified @ref oval_
variable. | |
| * @memberof oval_variable | | * @memberof oval_variable | |
| */ | | */ | |
| struct oval_component *oval_variable_get_component(struct oval_variable *);
//type==OVAL_VARIABLE_LOCAL | | struct oval_component *oval_variable_get_component(struct oval_variable *);
//type==OVAL_VARIABLE_LOCAL | |
|
| | | | |
| | | /** | |
| | | * Get list of allowed values for an external variable. | |
| | | * @return A new iterator for the possible_value attribute of the specified | |
| | | @ref oval_variable. | |
| | | * It should be freed after use by the calling application. | |
| | | * @memberof oval_variable | |
| | | */ | |
| | | struct oval_iterator *oval_variable_get_possible_values(struct oval_variabl | |
| | | e *variable); | |
| | | | |
| | | /** | |
| | | * Get list of constraints for an external variable. | |
| | | * @return A new iterator for the possible_restriction attribute of the spe | |
| | | cified @ref oval_variable. | |
| | | * It should be freed after use by the calling application. | |
| | | * @memberof oval_variable | |
| | | */ | |
| | | struct oval_iterator *oval_variable_get_possible_restrictions(struct oval_v | |
| | | ariable *variable); | |
| | | | |
| | | /** | |
| | | * Get restrictions from one possible_restriction element. | |
| | | * @return A new iterator for the restriction attribute of possible_restric | |
| | | tion. | |
| | | * It should be freed after use by the calling application. | |
| | | * @memberof oval_variable_possible_restriction | |
| | | */ | |
| | | struct oval_iterator *oval_variable_possible_restriction_get_restrictions(s | |
| | | truct oval_variable_possible_restriction *possible_restriction); | |
| | | | |
| | | /** | |
| | | * Get operator of possible_restriction element | |
| | | * @return operator | |
| | | * @memberof oval_variable_possible_restriction | |
| | | */ | |
| | | oval_operator_t oval_variable_possible_restriction_get_operator(struct oval | |
| | | _variable_possible_restriction *possible_restriction); | |
| | | | |
| /** | | /** | |
| * Returns attribute @ref Oval_component_type->text. | | * Returns attribute @ref Oval_component_type->text. | |
| * @memberof oval_variable | | * @memberof oval_variable | |
| */ | | */ | |
| const char *oval_component_type_get_text(oval_component_type_t type); | | const char *oval_component_type_get_text(oval_component_type_t type); | |
| /** @} */ | | /** @} */ | |
| | | | |
| /** | | /** | |
| * @name Iterators | | * @name Iterators | |
| * @{ | | * @{ | |
| | | | |
| skipping to change at line 2979 | | skipping to change at line 3091 | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
| void oval_component_set_suffix(struct oval_component *, char *); //ty
pe==OVAL_COMPONENT_END | | void oval_component_set_suffix(struct oval_component *, char *); //ty
pe==OVAL_COMPONENT_END | |
| /** | | /** | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
| void oval_component_set_split_delimiter(struct oval_component *, char *);
//type==OVAL_COMPONENT_SPLIT | | void oval_component_set_split_delimiter(struct oval_component *, char *);
//type==OVAL_COMPONENT_SPLIT | |
| /** | | /** | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
|
| | | void oval_component_set_glob_to_regex_glob_noescape(struct oval_component * | |
| | | , bool); //type==OVAL_COMPONENT_GLOB | |
| | | /** | |
| | | * @memberof oval_component | |
| | | */ | |
| void oval_component_set_substring_start(struct oval_component *, int); //ty
pe==OVAL_COMPONENT_SUBSTRING | | void oval_component_set_substring_start(struct oval_component *, int); //ty
pe==OVAL_COMPONENT_SUBSTRING | |
| /** | | /** | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
| void oval_component_set_substring_length(struct oval_component *, int);
//type==OVAL_COMPONENT_SUBSTRING | | void oval_component_set_substring_length(struct oval_component *, int);
//type==OVAL_COMPONENT_SUBSTRING | |
| /** | | /** | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
| void oval_component_set_timedif_format_1(struct oval_component *, oval_date
time_format_t); //type==OVAL_COMPONENT_TIMEDIF | | void oval_component_set_timedif_format_1(struct oval_component *, oval_date
time_format_t); //type==OVAL_COMPONENT_TIMEDIF | |
| /** | | /** | |
| | | | |
| skipping to change at line 3080 | | skipping to change at line 3196 | |
| char *oval_component_get_suffix(struct oval_component *); //type==OVAL
_COMPONENT_END | | char *oval_component_get_suffix(struct oval_component *); //type==OVAL
_COMPONENT_END | |
| /** | | /** | |
| * Returns attribute @ref Oval_function_SPLIT->delimiter. | | * Returns attribute @ref Oval_function_SPLIT->delimiter. | |
| * IF component->type <> @ref OVAL_FUNCTION_SPLIT, this method shall return
NULL | | * IF component->type <> @ref OVAL_FUNCTION_SPLIT, this method shall return
NULL | |
| * @return A pointer to the attribute of the specified @ref oval_component. | | * @return A pointer to the attribute of the specified @ref oval_component. | |
| * @note applications should not free the char* returned by this method | | * @note applications should not free the char* returned by this method | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
| char *oval_component_get_split_delimiter(struct oval_component *); //ty
pe==OVAL_COMPONENT_SPLIT | | char *oval_component_get_split_delimiter(struct oval_component *); //ty
pe==OVAL_COMPONENT_SPLIT | |
| /** | | /** | |
|
| | | * Returns attribute @ref Oval_function_GLOB_TO_REGEX->glob_noescape. | |
| | | * IF component->type <> @ref OVAL_FUNCTION_GLOB_TO_REGEX, this method shal | |
| | | l return false | |
| | | * @return An attribute of the specified @ref oval_component. | |
| | | * @memberof oval_component | |
| | | */ | |
| | | bool oval_component_get_glob_to_regex_glob_noescape(struct oval_component * | |
| | | ); //type==OVAL_COMPONENT_GLOB | |
| | | /** | |
| * Returns attribute @ref Oval_function_SUBSTRING->start. | | * Returns attribute @ref Oval_function_SUBSTRING->start. | |
| * IF component->type <> @ref OVAL_FUNCTION_SUBSTRING, this method shall re
turn 0 | | * IF component->type <> @ref OVAL_FUNCTION_SUBSTRING, this method shall re
turn 0 | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
| int oval_component_get_substring_start(struct oval_component *); //ty
pe==OVAL_COMPONENT_SUBSTRING | | int oval_component_get_substring_start(struct oval_component *); //ty
pe==OVAL_COMPONENT_SUBSTRING | |
| /** | | /** | |
| * Returns attribute @ref Oval_function_SUBSTRING->length. | | * Returns attribute @ref Oval_function_SUBSTRING->length. | |
| * IF component->type <> @ref OVAL_FUNCTION_SUBSTRING, this method shall re
turn 0 | | * IF component->type <> @ref OVAL_FUNCTION_SUBSTRING, this method shall re
turn 0 | |
| * @memberof oval_component | | * @memberof oval_component | |
| */ | | */ | |
| | | | |
End of changes. 7 change blocks. |
| 1 lines changed or deleted | | 143 lines changed or added | |
|