00001 00019 /* 00020 * Copyright 2008 Red Hat Inc., Durham, North Carolina. 00021 * All Rights Reserved. 00022 * 00023 * This library is free software; you can redistribute it and/or 00024 * modify it under the terms of the GNU Lesser General Public 00025 * License as published by the Free Software Foundation; either 00026 * version 2.1 of the License, or (at your option) any later version. 00027 * 00028 * This library is distributed in the hope that it will be useful, 00029 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00031 * Lesser General Public License for more details. 00032 * 00033 * You should have received a copy of the GNU Lesser General Public 00034 * License along with this library; if not, write to the Free Software 00035 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00036 * 00037 * Authors: 00038 * Maros Barabas <mbarabas@redhat.com> 00039 */ 00040 00041 #ifndef CPELANG_PRIV_H_ 00042 #define CPELANG_PRIV_H_ 00043 00044 #include <libxml/xmlreader.h> 00045 #include <libxml/xmlwriter.h> 00046 00047 #include "cpelang.h" 00048 #include "../common/util.h" 00049 #include "../common/list.h" 00050 #include "../common/elements.h" 00051 #include "../common/public/oscap.h" 00052 00056 OSCAP_HIDDEN_START; 00057 /* @endcond */ 00058 00063 struct cpe_testexpr { 00064 struct xml_metadata xml; 00065 cpe_lang_oper_t oper; 00066 union { 00067 struct cpe_testexpr *expr; 00068 struct cpe_name *cpe; 00069 } meta; 00070 }; 00071 00076 struct cpe_lang_model; 00077 00082 struct cpe_platform; 00083 00096 struct cpe_lang_model *cpe_lang_model_parse_xml(const struct oscap_import_source *source); 00097 00103 struct cpe_lang_model *cpe_lang_model_parse(xmlTextReaderPtr reader); 00104 00111 struct cpe_platform *cpe_platform_parse(xmlTextReaderPtr reader); 00112 00119 struct cpe_testexpr *cpe_testexpr_parse(xmlTextReaderPtr reader); 00120 00135 void cpe_lang_model_export_xml(const struct cpe_lang_model *spec, struct oscap_export_target *target); 00136 00143 void cpe_lang_export(const struct cpe_lang_model *spec, xmlTextWriterPtr writer); 00144 00151 void cpe_platform_export(const struct cpe_platform *platform, xmlTextWriterPtr writer); 00152 00159 void cpe_testexpr_export(const struct cpe_testexpr expr, xmlTextWriterPtr writer); 00160 00166 OSCAP_HIDDEN_END; 00167 /* @endcond */ 00168 00172 00174 #endif