00001 /* 00002 * Copyright 2009 Red Hat Inc., Durham, North Carolina. 00003 * All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 * Authors: 00020 * "David Niemoller" <David.Niemoller@g2-inc.com> 00021 * Lukas Kuklinek <lkuklinek@redhat.com> 00022 */ 00023 00037 #pragma once 00038 #ifndef OSCAP_TEXT_PRIV_H_ 00039 #define OSCAP_TEXT_PRIV_H_ 00040 00041 #include "public/text.h" 00042 #include "elements.h" 00043 #include <libxml/xmlreader.h> 00044 #include <libxml/xmlreader.h> 00045 00046 OSCAP_HIDDEN_START; 00047 00052 struct oscap_text_traits { 00053 bool html : 1; 00054 bool can_override : 1; 00055 bool can_substitute : 1; 00056 bool overrides : 1; 00057 }; 00058 00059 struct oscap_text { 00060 char *lang; 00061 char *text; 00062 struct oscap_text_traits traits; 00063 }; 00064 00066 extern const struct oscap_text_traits OSCAP_TEXT_TRAITS_PLAIN; 00068 extern const struct oscap_text_traits OSCAP_TEXT_TRAITS_HTML; 00069 00076 struct oscap_text *oscap_text_new_full(struct oscap_text_traits traits, const char *string, const char *lang); 00077 00081 struct oscap_text *oscap_text_new_parse(struct oscap_text_traits traits, xmlTextReaderPtr reader); 00082 00083 00084 OSCAP_HIDDEN_END; 00085 00086 #endif