00001 00008 /* 00009 * Copyright 2009 Red Hat Inc., Durham, North Carolina. 00010 * All Rights Reserved. 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 * Authors: 00027 * Maros Barabas <mbarabas@redhat.com> 00028 */ 00029 00030 #ifndef CPELANG_PRIV_H_ 00031 #define CPELANG_PRIV_H_ 00032 00033 #include <libxml/xmlreader.h> 00034 #include <libxml/xmlwriter.h> 00035 00036 #include "cpelang.h" 00037 #include "../common/util.h" 00038 #include "../common/list.h" 00039 #include "../common/elements.h" 00040 #include "../common/public/oscap.h" 00041 00045 OSCAP_HIDDEN_START; 00046 /* @endcond */ 00047 00052 struct cpe_testexpr { 00053 struct xml_metadata xml; 00054 cpe_lang_oper_t oper; 00055 union { 00056 struct oscap_list *expr; 00057 struct cpe_name *cpe; 00058 } meta; 00059 }; 00060 00065 struct cpe_lang_model; 00066 00071 struct cpe_platform; 00072 00077 struct cpe_lang_model *cpe_lang_model_parse_xml(const char *file); 00078 00083 struct cpe_lang_model *cpe_lang_model_parse(xmlTextReaderPtr reader); 00084 00090 struct cpe_platform *cpe_platform_parse(xmlTextReaderPtr reader); 00091 00097 struct cpe_testexpr *cpe_testexpr_parse(xmlTextReaderPtr reader); 00098 00104 void cpe_lang_model_export_xml(const struct cpe_lang_model *spec, const char *file); 00105 00111 void cpe_lang_export(const struct cpe_lang_model *spec, xmlTextWriterPtr writer); 00112 00118 void cpe_platform_export(const struct cpe_platform *platform, xmlTextWriterPtr writer); 00119 00125 void cpe_testexpr_export(const struct cpe_testexpr *expr, xmlTextWriterPtr writer); 00126 00130 OSCAP_HIDDEN_END; 00131 /* @endcond */ 00132 00133 #endif