Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Modules | Macros | Functions
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
 

Macros

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

Functions

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

Detailed Description

Definitions and functions common to all the OpenScap sublibraries.

Function Documentation

OSCAP_API 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.

OSCAP_API 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.

OSCAP_API 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.

OSCAP_API struct oscap_text* oscap_textlist_get_preferred_text ( struct oscap_text_iterator texts,
const char *  preferred_lang 
)

gets oscap_text representing given textlist

Similar to oscap_textlist_get_preferred_plaintext but returns oscap_text instead of just the plaintext.