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 "cpe_lang.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 cpe_lang_oper_t oper; 00054 union { 00055 struct oscap_list *expr; 00056 struct cpe_name *cpe; 00057 struct { 00058 char* system; 00059 char* href; 00060 char* id; 00061 } check; 00062 } meta; 00063 }; 00064 00069 struct cpe_lang_model; 00070 00075 struct cpe_platform; 00076 00081 struct cpe_lang_model *cpe_lang_model_parse_xml(const char *file); 00082 00087 struct cpe_lang_model *cpe_lang_model_parse(xmlTextReaderPtr reader); 00088 00094 struct cpe_platform *cpe_platform_parse(xmlTextReaderPtr reader); 00095 00101 struct cpe_testexpr *cpe_testexpr_parse(xmlTextReaderPtr reader); 00102 00108 void cpe_lang_model_export_xml(const struct cpe_lang_model *spec, const char *file); 00109 00115 void cpe_lang_export(const struct cpe_lang_model *spec, xmlTextWriterPtr writer); 00116 00122 void cpe_platform_export(const struct cpe_platform *platform, xmlTextWriterPtr writer); 00123 00129 void cpe_testexpr_export(const struct cpe_testexpr *expr, xmlTextWriterPtr writer); 00130 00134 OSCAP_HIDDEN_END; 00135 /* @endcond */ 00136 00137 #endif