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 "text.h"
39 #include "reference.h"
40 #include "reporter.h"
41 
45 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
46 # define OSCAP_DEPRECATED(func) func __attribute__ ((deprecated))
47 #elif defined(_MSC_VER)
48 # define OSCAP_DEPRECATED(func) __declspec(deprecated) func
49 #else
50 # pragma message("WARNING: You need to implement OSCAP_DEPRECATED for this compiler---in order to get deprecation warnings.")
51 # define OSCAP_DEPRECATED(func) func
52 #endif
53 
63 void oscap_init(void);
64 
72 void oscap_cleanup(void);
73 
75 const char *oscap_get_version(void);
76 
77 
84 
85 typedef enum oscap_document_type {
98 
99 
116 int oscap_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, oscap_reporter reporter, void *arg);
117 
130 int oscap_schematron_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, const char *outfile);
131 
144 int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params);
145 
149 const char * oscap_path_to_schemas(void);
150 
154 const char * oscap_path_to_schematron(void);
155 
156 /************************************************************/
161 #endif