00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #pragma once
00025 #ifndef OSCAP_TEXT_PRIV_H_
00026 #define OSCAP_TEXT_PRIV_H_
00027
00028 #include "public/text.h"
00029 #include "elements.h"
00030 #include <libxml/xmlreader.h>
00031 #include <libxml/xmlreader.h>
00032
00033 OSCAP_HIDDEN_START;
00034
00039 struct oscap_text_traits {
00040 bool override_given : 1;
00041 bool html : 1;
00042 bool can_override : 1;
00043 bool can_substitute : 1;
00044 bool overrides : 1;
00045 };
00046
00047 struct oscap_text {
00048 char *lang;
00049 char *text;
00050 struct oscap_text_traits traits;
00051 };
00052
00054 extern const struct oscap_text_traits OSCAP_TEXT_TRAITS_PLAIN;
00056 extern const struct oscap_text_traits OSCAP_TEXT_TRAITS_HTML;
00057
00064 struct oscap_text *oscap_text_new_full(struct oscap_text_traits traits, const char *string, const char *lang);
00065
00069 struct oscap_text *oscap_text_new_parse(struct oscap_text_traits traits, xmlTextReaderPtr reader);
00070
00071 xmlNode *oscap_text_to_dom(struct oscap_text *text, xmlNode *parent, const char *elname);
00072
00073 OSCAP_HIDDEN_END;
00074
00075 #endif