Open SCAP Library
oscap.h
Go to the documentation of this file.
1 /*
2  * Copyright 2009,2010,2011 Red Hat Inc., Durham, North Carolina.
3  * All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors:
20  * Lukas Kuklinek <lkuklinek@redhat.com>
21  * Peter Vrabec <pvrabec@redhat.com>
22  */
23 
33 #ifndef OSCAP_H_
34 #define OSCAP_H_
35 #include <stdbool.h>
36 #include <wchar.h>
37 
38 #include "oscap_text.h"
39 #include "oscap_reference.h"
40 
44 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
45 # define OSCAP_DEPRECATED(func) func __attribute__ ((deprecated))
46 #elif defined(_MSC_VER)
47 # define OSCAP_DEPRECATED(func) __declspec(deprecated) func
48 #else
49 # pragma message("WARNING: You need to implement OSCAP_DEPRECATED for this compiler---in order to get deprecation warnings.")
50 # define OSCAP_DEPRECATED(func) func
51 #endif
52 
62 void oscap_init(void);
63 
71 void oscap_cleanup(void);
72 
74 const char *oscap_get_version(void);
75 
76 
83 
84 typedef enum oscap_document_type {
99 
109 
110 typedef int (*xml_reporter)(const char *file, int line, const char *msg, void *arg);
111 
128 int oscap_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, xml_reporter reporter, void *arg);
129 
142 int oscap_schematron_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, const char *outfile);
143 
156 int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params);
157 
161 const char * oscap_path_to_schemas(void);
162 
166 const char * oscap_path_to_schematron(void);
167 
171 const char * oscap_path_to_cpe(void);
172 
176 int oscap_determine_document_type(const char *document, oscap_document_type_t *doc_type);
177 
178 /************************************************************/
183 #endif