Open SCAP Library: elements.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

common/elements.h
1
5 /*
6 * Copyright 2009 Red Hat Inc., Durham, North Carolina.
7 * All Rights Reserved.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 * Authors:
24 * Maros Barabas <mbarabas@redhat.com>
25 */
26
27 #ifndef OSCAP_ELEMENTS_H_
28 #define OSCAP_ELEMENTS_H_
29
30 #include <libxml/xmlreader.h>
31 #include <libxml/xmlwriter.h>
32 #include <stdbool.h>
33 #include <time.h>
34 #include "public/oscap.h"
35 #include "util.h"
36
38 extern const struct oscap_string_map OSCAP_BOOL_MAP[];
39
41 bool oscap_to_start_element(xmlTextReaderPtr reader, int depth);
43 char *oscap_element_string_copy(xmlTextReaderPtr reader);
45 const char *oscap_element_string_get(xmlTextReaderPtr reader);
47 int oscap_element_depth(xmlTextReaderPtr reader);
49 char *oscap_get_xml(xmlTextReaderPtr reader);
51 time_t oscap_get_date(const char *date);
53 time_t oscap_get_datetime(const char *date);
55 xmlNode *oscap_xmlstr_to_dom(xmlNode *parent, const char *elname, const char *content);
56
63 int oscap_xml_save_filename(const char *filename, xmlDocPtr doc);
64
72 void libxml_error_handler(void *user, const char *message, xmlParserSeverities severity, xmlTextReaderLocatorPtr locator);
73
74 #endif