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
00101
00102 } oscap_document_type_t;
00103
00112 const char *oscap_document_type_to_string(oscap_document_type_t type);
00113
00114 typedef int (*xml_reporter)(const char *file, int line, const char *msg, void *arg);
00115
00134 OSCAP_DEPRECATED(int oscap_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, xml_reporter reporter, void *arg));
00135
00150 OSCAP_DEPRECATED(int oscap_schematron_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, const char *outfile));
00151
00164 int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params);
00165
00169 const char * oscap_path_to_schemas(void);
00170
00177 OSCAP_DEPRECATED(const char * oscap_path_to_schematron(void));
00178
00182 const char * oscap_path_to_cpe(void);
00183
00189 OSCAP_DEPRECATED(int oscap_determine_document_type(const char *document, oscap_document_type_t *doc_type));
00190
00191
00196 #endif