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 00073 struct oscap_text *oscap_text_new_html(void); 00074 00079 void oscap_text_free(struct oscap_text *); 00080 00082 const char *oscap_text_get_text(const struct oscap_text *text); 00084 bool oscap_text_set_text(struct oscap_text *text, const char * string); 00085 00087 const char *oscap_text_get_lang(const struct oscap_text *text); 00089 bool oscap_text_set_lang(struct oscap_text *text, const char *string); 00090 00095 bool oscap_text_get_is_html(const struct oscap_text *text); 00100 bool oscap_text_get_can_substitute(const struct oscap_text *text); 00105 bool oscap_text_get_can_override(const struct oscap_text *text); 00110 bool oscap_text_get_overrides(const struct oscap_text *text); 00115 bool oscap_text_set_overrides(struct oscap_text *text, bool overrides); 00116 00117 00122 struct oscap_text_iterator; 00124 struct oscap_text *oscap_text_iterator_next(struct oscap_text_iterator *it); 00126 bool oscap_text_iterator_has_more(struct oscap_text_iterator *it); 00128 void oscap_text_iterator_free(struct oscap_text_iterator *it); 00130 void oscap_text_iterator_remove(struct oscap_text_iterator *it); 00131 00132 #endif 00133