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 00036 #pragma once 00037 #ifndef OSCAP_TEXT_H_ 00038 #define OSCAP_TEXT_H_ 00039 00040 00045 00046 extern const char * const OSCAP_LANG_ENGLISH; 00048 extern const char * const OSCAP_LANG_ENGLISH_US; 00050 extern const char * const OSCAP_LANG_DEFAULT; 00057 struct oscap_text; 00058 00065 struct oscap_text *oscap_text_new(void); 00066 00072 struct oscap_text *oscap_text_clone(const struct oscap_text * text); 00073 00080 struct oscap_text *oscap_text_new_html(void); 00081 00086 void oscap_text_free(struct oscap_text *); 00087 00089 const char *oscap_text_get_text(const struct oscap_text *text); 00091 bool oscap_text_set_text(struct oscap_text *text, const char * string); 00092 00094 const char *oscap_text_get_lang(const struct oscap_text *text); 00096 bool oscap_text_set_lang(struct oscap_text *text, const char *string); 00097 00102 bool oscap_text_get_is_html(const struct oscap_text *text); 00107 bool oscap_text_get_can_substitute(const struct oscap_text *text); 00112 bool oscap_text_get_can_override(const struct oscap_text *text); 00117 bool oscap_text_get_overrides(const struct oscap_text *text); 00122 bool oscap_text_set_overrides(struct oscap_text *text, bool overrides); 00123 00124 00129 struct oscap_text_iterator; 00131 struct oscap_text *oscap_text_iterator_next(struct oscap_text_iterator *it); 00133 bool oscap_text_iterator_has_more(struct oscap_text_iterator *it); 00135 void oscap_text_iterator_free(struct oscap_text_iterator *it); 00137 void oscap_text_iterator_remove(struct oscap_text_iterator *it); 00138 00139 #endif 00140