Common

Definitions and functions common to all the OpenScap sublibraries. More...

## Modules

| Iterators & collections
| String manipulation
| Functions to access and manipulate textual data.
| Validation
| XML schema based validation of XML representations of SCAP documents.
| Errors
| Error checking mechanism.
| Reporters
| Debug
| Memory
| Memory allocation wrapper functions used in library.

## Macros

#define | OSCAP_DEPRECATED(func) func
| This macro will warn, when a deprecated function is used.

## Functions

void | oscap_init (void)
| Initialize OpenSCAP library. More...
void | oscap_cleanup (void)
| Release library internal caches. More...
const char * | oscap_get_version (void)
| Get version of the OpenSCAP library.
char * | oscap_textlist_get_preferred_plaintext (struct oscap_text_iterator *texts, const char *preferred_lang)
| gets a plaintext string representing given textlist More...

## Detailed Description

Definitions and functions common to all the OpenScap sublibraries.

## Function Documentation

void oscap_cleanup | ( | void |  | ) |

Release library internal caches.

This function should be called once you finish working with any of the libraries included in OpenScap framework. It frees internally allocated memory, e.g. cache of the XML parser.

void oscap_init | ( | void |  | ) |

Initialize OpenSCAP library.

This is currently needed only in multithreaded applications (needs to be called before any child threads are spawned) or applications using the XSLT facility w/ EXSLT extensions. However, it is a good practice to call this function always at the beginning of the program execution.

char* oscap_textlist_get_preferred_plaintext | ( | struct oscap_text_iterator * | texts,
|  | const char * | preferred_lang
| ) |  |

gets a plaintext string representing given textlist

Iterates through given texts and looks at each to see if the language matches given preferred_lang. If preferred_lang is NULL, OSCAP_DEFAULT_LANG is matched.

If a match is found it, a copy of plaintext representation of that text is returned. If nothing is found, plaintext representation of the first text in the list is returned. If the textlist is empty, NULL is returned.