OVAL External Variable Binding
[OVAL]

Interface to Variable model. More...

Files

file  oval_variables.h

Data Structures

struct  oval_variable_model
 The OVAL variable model facilitates access to external variable value bindings used to to constrain the evaluation of OVAL objects. More...
struct  oval_variable_model_iterator

Setters

void oval_variable_model_set_generator (struct oval_variable_model *model, struct oval_generator *generator)
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.

Getters

struct oval_generator * oval_variable_model_get_generator (struct oval_variable_model *model)
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.
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.
oval_datatype_t oval_variable_model_get_datatype (struct oval_variable_model *, char *)
 Get a specified external variable datatype.
const char * oval_variable_model_get_comment (struct oval_variable_model *, char *)
 Get a specified external variable comment.
struct oval_value_iteratoroval_variable_model_get_values (struct oval_variable_model *, char *)
 Get the values bound to a specified external variable.

Iterators

bool oval_variable_model_iterator_has_more (struct oval_variable_model_iterator *)
 Returns true if iterator not exhausted.
struct oval_variable_modeloval_variable_model_iterator_next (struct oval_variable_model_iterator *)
 Returns next instance of oval_variable_model.
void oval_variable_model_iterator_free (struct oval_variable_model_iterator *)
 Free iterator.

Functions

struct oval_variable_modeloval_variable_model_new (void)
 Create a new empty OVAL variable model oval_variable_model.
struct oval_variable_modeloval_variable_model_import_source (struct oscap_source *source)
 Import the content from the oscap_source into a new oval_variable_model.
struct oval_variable_modeloval_variable_model_import (const char *file)
 Import the content from the file into a new oval_variable_model.
struct oval_variable_modeloval_variable_model_clone (struct oval_variable_model *)
 Clone an OVAL variable model.
void oval_variable_model_free (struct oval_variable_model *)
 Free memory allocated to a specified oval_variable_model.
int oval_variable_model_export (struct oval_variable_model *, const char *file)
 Export the specified oval_variable_model into file oval_variable_model.

Detailed Description

Interface to Variable model.


Function Documentation

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.

If the varid does not resolve to a managed external variable, this method returns NULL.

Parameters:
variable_model the specified oval_variable_model.
varid the identifier of the required oval_variable. oval_variable_model

struct oval_variable_model* oval_variable_model_clone ( struct oval_variable_model  )  [read]

Clone an OVAL variable model.

Returns:
A copy of the specified oval_variable_model. oval_variable_model

void oval_variable_model_free ( struct oval_variable_model  ) 

Free memory allocated to a specified oval_variable_model.

Parameters:
variable_model the specified oval_variable_model oval_variable_model

const char* oval_variable_model_get_comment ( struct oval_variable_model ,
char *   
)

Get a specified external variable comment.

If the varid does not resolve to a managed external variable, this method returns NULL.

Parameters:
variable_model the specified oval_variable_model.
varid the identifier of the required oval_variable. oval_variable_model

oval_datatype_t oval_variable_model_get_datatype ( struct oval_variable_model ,
char *   
)

Get a specified external variable datatype.

If the varid does not resolve to a managed external variable, this method returns 0.

Parameters:
variable_model the specified oval_variable_model.
varid the identifier of the required oval_variable. oval_variable_model

struct oval_value_iterator* oval_variable_model_get_values ( struct oval_variable_model ,
char *   
) [read]

Get the values bound to a specified external variable.

If the varid does not resolve to a managed external variable, this method returns NULL.

Parameters:
variable_model the specified oval_variable_model.
varid the identifier of the required oval_variable. oval_variable_model

struct oval_string_iterator* oval_variable_model_get_variable_ids ( struct oval_variable_model  )  [read]

Get all external variables managed by a specified oval_variable_model.

Parameters:
variable_model the specified oval_variable_model. oval_variable_model

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.

Parameters:
model Variable model
id ID of variable oval_variable_model

struct oval_variable_model* oval_variable_model_import ( const char *  file  )  [read]

Import the content from the file into a new oval_variable_model.

Parameters:
file filename
Returns:
new oval_variable_model, or NULL if an error occurred oval_variable_model
Deprecated:
This function has been deprecated and it may be dropped from later OpenSCAP releases. Please use oval_variable_model_import_source instead.

struct oval_variable_model* oval_variable_model_import_source ( struct oscap_source *  source  )  [read]

Import the content from the oscap_source into a new oval_variable_model.

Parameters:
source The oscap_source to import from.
Returns:
new oval_variable_model, or NULL if an error occurred oval_variable_model

void oval_variable_model_iterator_free ( struct oval_variable_model_iterator  ) 

bool oval_variable_model_iterator_has_more ( struct oval_variable_model_iterator  ) 

Returns true if iterator not exhausted.

oval_variable_model_iterator

struct oval_variable_model* oval_variable_model_iterator_next ( struct oval_variable_model_iterator  )  [read]


Generated on Tue Nov 14 12:19:00 2017 for Open SCAP Library by  doxygen 1.5.6