Open SCAP Library

oscap.h

Go to the documentation of this file.
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         // If you are adding a new enum here, make sure you add support for it
00101         // to utils/oscap-info.c!
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
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines