Open SCAP Library

elements.h

00001 
00005 /*
00006  * Copyright 2009--2014 Red Hat Inc., Durham, North Carolina.
00007  * All Rights Reserved.
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful, 
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software 
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022  *
00023  * Authors:
00024  *      Maros Barabas <mbarabas@redhat.com>
00025  */
00026 
00027 #ifndef OSCAP_ELEMENTS_H_
00028 #define OSCAP_ELEMENTS_H_
00029 
00030 #include <libxml/xmlreader.h>
00031 #include <libxml/xmlwriter.h>
00032 #include <stdbool.h>
00033 #include <time.h>
00034 #include "public/oscap.h"
00035 #include "util.h"
00036 
00037 #define OSCAP_XMLNS_XSI BAD_CAST "http://www.w3.org/2001/XMLSchema-instance"
00038 
00040 extern const struct oscap_string_map OSCAP_BOOL_MAP[];
00041 
00042 typedef void (*oscap_xml_value_consumer) (char *, void *);
00043 int oscap_parser_text_value(xmlTextReaderPtr reader, oscap_xml_value_consumer consumer, void *user);
00044 void oscap_text_consumer(char *text, void *user);
00045 
00047 bool oscap_to_start_element(xmlTextReaderPtr reader, int depth);
00049 char *oscap_element_string_copy(xmlTextReaderPtr reader);
00051 const char *oscap_element_string_get(xmlTextReaderPtr reader);
00053 int oscap_element_depth(xmlTextReaderPtr reader);
00055 char *oscap_get_xml(xmlTextReaderPtr reader);
00057 time_t oscap_get_date(const char *date);
00059 time_t oscap_get_datetime(const char *date);
00061 xmlNode *oscap_xmlstr_to_dom(xmlNode *parent, const char *elname, const char *content);
00062 
00069 int oscap_xml_save_filename(const char *filename, xmlDocPtr doc);
00070 
00077 int oscap_xml_save_filename_free(const char *filename, xmlDocPtr doc);
00078 
00079 xmlNs *lookup_xsi_ns(xmlDoc *doc);
00080 
00081 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines