|
Open SCAP Library
|
00001 /* 00002 * Copyright 2009,2010,2011 Red Hat Inc., Durham, North Carolina. 00003 * All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 * Authors: 00020 * Lukas Kuklinek <lkuklinek@redhat.com> 00021 * Peter Vrabec <pvrabec@redhat.com> 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 // If you are adding a new enum here, make sure you add support for it 00102 // to utils/oscap-info.c! 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
1.7.3