cpe_lang_model Struct Reference
[Private membersCPE Language]

CPE platform specification. More...

#include <cpelang_priv.h>

Data Fields

struct xml_metadata xml
struct oscap_listxmlns
char * ns_prefix
struct oscap_listplatforms
struct oscap_htableitem

Related Functions

(Note that these are not member functions.)



Parse functions

Functions for parsing structures from XML.

Return value is new structure filled by content of XML file represented by XML reader or import source structure. Structure needs to be freed by the caller.



struct cpe_lang_modelcpe_lang_model_parse_xml (const struct oscap_import_source *source)
 Function for parsing XML CPE language file.
struct cpe_lang_modelcpe_lang_model_parse (xmlTextReaderPtr reader)
 Parse function for CPE Lang model.
Export functions

Functions for export structures to XML by XML writer.

Exported structures need to be freed by the caller.



void cpe_lang_model_export_xml (const struct cpe_lang_model *spec, struct oscap_export_target *target)
 Function for export CPE language model to XML.
void cpe_lang_export (const struct cpe_lang_model *spec, xmlTextWriterPtr writer)
 Function for export CPE language top element.
Get functions

Functions for getting attributes from CVE model structures.

Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. Use remove function otherwise.



const char * cpe_lang_model_get_ns_prefix (const struct cpe_lang_model *item)
 cpe_lang_model function to get namespace prefix
struct cpe_platform_iteratorcpe_lang_model_get_platforms (const struct cpe_lang_model *item)
 cpe_lang_model function to get CPE platforms
struct xml_metadata_iteratorcpe_lang_model_get_xmlns (const struct cpe_lang_model *item)
 cpe_lang_model function to get xmlns attribute
Add functions

Get XML namespace from CPE lang model

Functions to add member to list. Return value is true if added succesfuly or false in case of error.



bool cpe_lang_model_add_platform (struct cpe_lang_model *lang, struct cpe_platform *platform)
 Add platform to CPE lang model.
bool cpe_lang_model_add_xml (struct cpe_lang_model *lang, struct xml_metadata *xml)
 Add xml metadata to CPE lang model.
New functions

Constructors of CVE model structures.

Free function returns new empty allocated structure. If returns non NULL it need to be freed by the caller.



struct cpe_lang_modelcpe_lang_model_new (void)
 Constructor of CPE Language model.
Set functions

Set functions assign values to members of structures except lists.

For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller.



bool cpe_lang_model_set_ns_prefix (struct cpe_lang_model *model, const char *new_prefix)
 Set ns_prefix to CPE lang model.
Free functions

Destructors of CVE model structures.

Functions free structures with all members recursively. For simple deletion of entity use remove functions.



void cpe_lang_model_free (struct cpe_lang_model *platformspec)
 Free function of CPE test expression.
Other functions



bool cpe_platform_match_cpe (struct cpe_name **cpe, size_t n, const struct cpe_platform *platform)
 Function to match cpe in platform.
struct cpe_lang_modelcpe_lang_model_import (const struct oscap_import_source *source)
 Load CPE language model from a XML document.
void cpe_lang_model_export (const struct cpe_lang_model *spec, struct oscap_export_target *target)
 Write the lang_model to a file.

Detailed Description

CPE platform specification.


The documentation for this struct was generated from the following files:

Generated on 4 Jan 2010 for Open SCAP Library by  doxygen 1.6.1