oscap_text.h File Reference

Multilingual text processing interface. More...

#include <stdbool.h>

Go to the source code of this file.

Functions

struct oscap_textoscap_text_new (void)
 Create an internationalized text field.
struct oscap_textoscap_text_clone (const struct oscap_text *text)
 Clone an internationalized text field.
struct oscap_textoscap_text_new_html (void)
 Create an internationalized text field with HTML content.
void oscap_text_free (struct oscap_text *)
 Release an internationalized text field.
char * oscap_textlist_get_preferred_plaintext (struct oscap_text_iterator *texts, const char *preferred_lang)
 gets a plaintext string representing given textlist
struct oscap_textoscap_textlist_get_preferred_text (struct oscap_text_iterator *texts, const char *preferred_lang)
 gets oscap_text representing given textlist
Getters
Return value is pointer to structure's member.

Do not free unless you null the pointer in the structure. Use remove function otherwise.

struct oscap_string_iteratoroscap_stringlist_get_strings (const struct oscap_stringlist *list)
 oscap_stringlist
struct oscap_stringlistoscap_stringlist_clone (struct oscap_stringlist *list)
 oscap_stringlist
const char * oscap_text_get_text (const struct oscap_text *text)
 oscap_text
const char * oscap_text_get_lang (const struct oscap_text *text)
 oscap_text
char * oscap_text_get_plaintext (const struct oscap_text *text)
 Get plaintext representation of the text.
bool oscap_text_get_is_html (const struct oscap_text *text)
 Does this text posses a HTML content? oscap_text.
bool oscap_text_get_can_substitute (const struct oscap_text *text)
 Can this text contain substitutions? oscap_text.
bool oscap_text_get_can_override (const struct oscap_text *text)
 Can this text override parent content? oscap_text.
bool oscap_text_get_overrides (const struct oscap_text *text)
 Does this text override parent content? oscap_text.
Setters
For lists use add functions.

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

bool oscap_text_set_overrides (struct oscap_text *text, bool overrides)
 Set whether this text overrides parent content.
bool oscap_text_set_text (struct oscap_text *text, const char *string)
 oscap_text
bool oscap_text_set_lang (struct oscap_text *text, const char *string)
 oscap_text
bool oscap_stringlist_add_string (struct oscap_stringlist *list, const char *str)
 oscap_stringlist
struct oscap_stringlistoscap_stringlist_new (void)
 oscap_stringlist
void oscap_stringlist_free (struct oscap_stringlist *list)
 oscap_stringlist
Iterators
struct oscap_textoscap_text_iterator_next (struct oscap_text_iterator *it)
 oscap_text_iterator
bool oscap_text_iterator_has_more (struct oscap_text_iterator *it)
 oscap_text_iterator
void oscap_text_iterator_free (struct oscap_text_iterator *it)
 oscap_text_iterator
void oscap_text_iterator_remove (struct oscap_text_iterator *it)
 oscap_text_iterator
void oscap_text_iterator_reset (struct oscap_text_iterator *it)
 oscap_text_iterator
const char * oscap_string_iterator_next (struct oscap_string_iterator *it)
 oscap_string_iterator
bool oscap_string_iterator_has_more (struct oscap_string_iterator *it)
 oscap_string_iterator
void oscap_string_iterator_free (struct oscap_string_iterator *it)
 oscap_string_iterator
void oscap_string_iterator_remove (struct oscap_string_iterator *it)
 oscap_string_iterator
void oscap_string_iterator_reset (struct oscap_string_iterator *it)
 oscap_string_iterator
struct oscap_stringlistoscap_stringlist_iterator_next (struct oscap_stringlist_iterator *it)
 oscap_stringlist_iterator
bool oscap_stringlist_iterator_has_more (struct oscap_stringlist_iterator *it)
 oscap_stringlist_iterator
void oscap_stringlist_iterator_free (struct oscap_stringlist_iterator *it)
 oscap_stringlist_iterator
void oscap_stringlist_iterator_remove (struct oscap_stringlist_iterator *it)
 oscap_stringlist_iterator
void oscap_stringlist_iterator_reset (struct oscap_stringlist_iterator *it)
 oscap_stringlist_iterator

Variables

Common language codes
const char *const OSCAP_LANG_ENGLISH
 English.
const char *const OSCAP_LANG_ENGLISH_US
 American English.
const char *const OSCAP_LANG_DEFAULT
 Default language (i.e. American English).


Detailed Description

Multilingual text processing interface.

Author:
Lukas Kuklinek <lkuklinek@redhat.com>

David Niemoller <David.Niemoller@g2-inc.com>


Generated on Tue Nov 14 12:18:55 2017 for Open SCAP Library by  doxygen 1.5.6