00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00033 #ifndef OSCAP_H_
00034 #define OSCAP_H_
00035 #include <stdbool.h>
00036 #include <wchar.h>
00037
00038 #include "oscap_text.h"
00039 #include "oscap_reference.h"
00040
00044 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
00045 # define OSCAP_DEPRECATED(func) func __attribute__ ((deprecated))
00046 #elif defined(_MSC_VER)
00047 # define OSCAP_DEPRECATED(func) __declspec(deprecated) func
00048 #else
00049 # pragma message("WARNING: You need to implement OSCAP_DEPRECATED for this compiler---in order to get deprecation warnings.")
00050 # define OSCAP_DEPRECATED(func) func
00051 #endif
00052
00062 void oscap_init(void);
00063
00071 void oscap_cleanup(void);
00072
00074 const char *oscap_get_version(void);
00075
00076
00083
00084 typedef enum oscap_document_type {
00085 OSCAP_DOCUMENT_UNKNOWN = 0,
00086 OSCAP_DOCUMENT_OVAL_DEFINITIONS,
00087 OSCAP_DOCUMENT_OVAL_VARIABLES,
00088 OSCAP_DOCUMENT_OVAL_SYSCHAR,
00089 OSCAP_DOCUMENT_OVAL_RESULTS,
00090 OSCAP_DOCUMENT_OVAL_DIRECTIVES,
00091 OSCAP_DOCUMENT_XCCDF,
00092 OSCAP_DOCUMENT_CPE_LANGUAGE,
00093 OSCAP_DOCUMENT_CPE_DICTIONARY,
00094 OSCAP_DOCUMENT_CVE_FEED,
00095 OSCAP_DOCUMENT_SCE_RESULT,
00096 OSCAP_DOCUMENT_SDS,
00097 OSCAP_DOCUMENT_ARF,
00098 OSCAP_DOCUMENT_XCCDF_TAILORING,
00099 OSCAP_DOCUMENT_OCIL,
00100 OSCAP_DOCUMENT_CVRF_FEED
00101
00102
00103 } oscap_document_type_t;
00104
00113 const char *oscap_document_type_to_string(oscap_document_type_t type);
00114
00115 typedef int (*xml_reporter)(const char *file, int line, const char *msg, void *arg);
00116
00135 OSCAP_DEPRECATED(int oscap_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, xml_reporter reporter, void *arg));
00136
00151 OSCAP_DEPRECATED(int oscap_schematron_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, const char *outfile));
00152
00165 int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params);
00166
00170 const char * oscap_path_to_schemas(void);
00171
00178 OSCAP_DEPRECATED(const char * oscap_path_to_schematron(void));
00179
00183 const char * oscap_path_to_cpe(void);
00184
00190 OSCAP_DEPRECATED(int oscap_determine_document_type(const char *document, oscap_document_type_t *doc_type));
00191
00192
00197 #endif