Open SCAP Library: oval_variables.h Source File

Open SCAP Library

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

- File List
- Globals

oval_variables.h
Go to the documentation of this file.
1
14 /*
15 * Copyright 2009-2014 Red Hat Inc., Durham, North Carolina.
16 * All Rights Reserved.
17 *
18 * This library is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU Lesser General Public
20 * License as published by the Free Software Foundation; either
21 * version 2.1 of the License, or (at your option) any later version.
22 *
23 * This library is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * Lesser General Public License for more details.
27 *
28 * You should have received a copy of the GNU Lesser General Public
29 * License along with this library; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 *
32 * Authors:
33 * "David Niemoller" <David.Niemoller@g2-inc.com>
34 */
35
36 #ifndef OVAL_VARIABLES_H_
37 #define OVAL_VARIABLES_H_
38
39 #include "oval_types.h"
40 #include "oscap.h"
41 #include "oscap_source.h"
42
47 struct oval_variable_model *oval_variable_model_new(void);
48
55 struct oval_variable_model *oval_variable_model_import_source(struct oscap_source *source);
56
66 OSCAP_DEPRECATED(struct oval_variable_model *oval_variable_model_import(const char *file));
67
73 struct oval_variable_model *oval_variable_model_clone(struct oval_variable_model *);
79 void oval_variable_model_free(struct oval_variable_model *);
84 int oval_variable_model_export (struct oval_variable_model *, const char *file);
85
86
91 void oval_variable_model_set_generator(struct oval_variable_model *model, struct oval_generator *generator);
99 void oval_variable_model_add(struct oval_variable_model *model, char *varid, const char *comment, oval_datatype_t datatype, char *value);
106 struct oval_generator *oval_variable_model_get_generator(struct oval_variable_model *model);
112 struct oval_string_iterator *oval_variable_model_get_variable_ids (struct oval_variable_model *);
113
120 bool oval_variable_model_has_variable(struct oval_variable_model *model, const char * id);
128 oval_datatype_t oval_variable_model_get_datatype (struct oval_variable_model *, char *);
136 const char *oval_variable_model_get_comment (struct oval_variable_model *, char *);
144 struct oval_value_iterator *oval_variable_model_get_values(struct oval_variable_model *, char *);
155 struct oval_variable_model_iterator;
160 bool oval_variable_model_iterator_has_more(struct oval_variable_model_iterator *);
165 struct oval_variable_model *oval_variable_model_iterator_next(struct oval_variable_model_iterator *);
170 void oval_variable_model_iterator_free(struct oval_variable_model_iterator *);
183 #endif /* OVAL_VARIABLES_H_ */
184
185
oval_variable_model::oval_variable_model_clone
struct oval_variable_model * oval_variable_model_clone(struct oval_variable_model *)
Clone an OVAL variable model.
Definition: oval_varModel.c:126
oscap.h
General OpenScap functions and types.
oval_variable_model::oval_variable_model_add
void oval_variable_model_add(struct oval_variable_model *model, char *varid, const char *comment, oval_datatype_t datatype, char *value)
Get the values bound to a specified external variable.
Definition: oval_varModel.c:169
oval_types.h
oval_variable_model::oval_variable_model_new
struct oval_variable_model * oval_variable_model_new(void)
Create a new empty OVAL variable model.
Definition: oval_varModel.c:116
oval_value_iterator
Definition: oval_definitions.h:441
oval_variable_model::oval_variable_model_get_datatype
oval_datatype_t oval_variable_model_get_datatype(struct oval_variable_model *, char *)
Get a specified external variable datatype.
Definition: oval_varModel.c:420
OSCAP_DEPRECATED
#define OSCAP_DEPRECATED(func)
This macro will warn, when a deprecated function is used.
Definition: oscap.h:50
oval_variable_model_iterator
oval_variable_model::oval_variable_model_get_values
struct oval_value_iterator * oval_variable_model_get_values(struct oval_variable_model *, char *)
Get the values bound to a specified external variable.
Definition: oval_varModel.c:435
oval_variable_model::oval_variable_model_get_comment
const char * oval_variable_model_get_comment(struct oval_variable_model *, char *)
Get a specified external variable comment.
Definition: oval_varModel.c:428
oval_datatype_t
oval_datatype_t
Datatypes.
Definition: oval_definitions.h:149
oval_string_iterator
oscap_source
Definition: oscap_source.c:62
oval_variable_model_iterator::oval_variable_model_iterator_has_more
bool oval_variable_model_iterator_has_more(struct oval_variable_model_iterator *)
Returns true if iterator not exhausted.
Definition: oval_varModel.c:85
oval_variable_model::oval_variable_model_free
void oval_variable_model_free(struct oval_variable_model *)
Free memory allocated to a specified oval_variable_model.
Definition: oval_varModel.c:148
oval_variable_model::oval_variable_model_import_source
struct oval_variable_model * oval_variable_model_import_source(struct oscap_source *source)
Import the content from the oscap_source into a new oval_variable_model.
Definition: oval_varModel.c:302
oval_variable_model::oval_variable_model_has_variable
bool oval_variable_model_has_variable(struct oval_variable_model *model, const char *id)
Return true if variable with ID is present in variable model, false otherwise.
Definition: oval_varModel.c:401
oval_variable_model
The OVAL variable model facilitates access to external variable value bindings used to to constrain t...
Definition: oval_varModel.c:56
oval_generator
Definition: oval_generator.c:44
oval_variable_model::oval_variable_model_export
int oval_variable_model_export(struct oval_variable_model *, const char *file)
Export the specified oval_variable_model into file.
Definition: oval_varModel.c:384
oval_variable_model_iterator::oval_variable_model_iterator_next
struct oval_variable_model * oval_variable_model_iterator_next(struct oval_variable_model_iterator *)
Returns next instance of oval_variable_model.
Definition: oval_varModel.c:90
oval_variable_model::oval_variable_model_get_variable_ids
struct oval_string_iterator * oval_variable_model_get_variable_ids(struct oval_variable_model *)
Get all external variables managed by a specified oval_variable_model.
Definition: oval_varModel.c:415
oval_variable_model_iterator::oval_variable_model_iterator_free
void oval_variable_model_iterator_free(struct oval_variable_model_iterator *)
Free iterator.
Definition: oval_varModel.c:95
oval_variable_model::oval_variable_model_import
struct oval_variable_model * oval_variable_model_import(const char *file)
Import the content from the file into a new oval_variable_model.
Definition: oval_varModel.c:322