Open SCAP Library

cpedict_priv.h

Go to the documentation of this file.
00001 
00008 /*
00009  * Copyright 2009--2014 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 CPEDICT_PRIV_H_
00031 #define CPEDICT_PRIV_H_
00032 
00033 #include <libxml/xmlreader.h>
00034 #include <libxml/xmlwriter.h>
00035 #include <stdlib.h>
00036 
00037 #include "cpe_name.h"
00038 #include "cpe_ctx_priv.h"
00039 #include "cpe_dict.h"
00040 
00041 #include "../common/public/oscap.h"
00042 #include "../common/util.h"
00043 #include "../common/elements.h"
00044 
00048 OSCAP_HIDDEN_START;
00049  /* @endcond */
00050 
00056 struct cpe_generator *cpe_generator_parse(struct cpe_parser_ctx *ctx);
00057 
00064 struct cpe_item *cpe_item_parse(struct cpe_parser_ctx *ctx);
00065 
00071 struct cpe_vendor *cpe_vendor_parse(xmlTextReaderPtr reader);
00072 
00079 struct cpe_dict_model *cpe_dict_model_parse(struct cpe_parser_ctx *ctx);
00080 
00086 char *cpe_dict_detect_version_priv(xmlTextReader *reader);
00087 
00093 void cpe_dict_model_export_xml(const struct cpe_dict_model *dict, const char *file);
00094 
00100 void cpe_dict_export(const struct cpe_dict_model *dict, xmlTextWriterPtr writer);
00101 
00107 void cpe_generator_export(const struct cpe_generator *generator, xmlTextWriterPtr writer);
00108 
00115 void cpe_item_export(const struct cpe_item *item, xmlTextWriterPtr writer, int base_version);
00116 
00122 void cpe_vendor_export(const struct cpe_vendor *vendor, xmlTextWriterPtr writer);
00123 
00124 /* <cpe-list>
00125  * */
00126 struct cpe_dict_model {         // the main node
00127         struct oscap_list *items;       // dictionary items
00128         struct oscap_list *vendors;
00129         int base_version;
00130         struct cpe_generator *generator;
00131         char* origin_file;
00132 };
00133 
00137 OSCAP_HIDDEN_END;
00138  /* @endcond */
00139 
00140 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines