oscap.h
Go to the documentation of this file.
/*
* Copyright 2009,2010,2011 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors:
* Lukas Kuklinek <lkuklinek@redhat.com>
* Peter Vrabec <pvrabec@redhat.com>
*/
#ifndef OSCAP_H_
#define OSCAP_H_
#include <stdbool.h>
#include <wchar.h>
#include "oscap_text.h"
#include "oscap_reference.h"
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define OSCAP_DEPRECATED(func) func __attribute__ ((deprecated))
#elif defined(_MSC_VER)
# define OSCAP_DEPRECATED(func) __declspec(deprecated) func
#else
# pragma message("WARNING: You need to implement OSCAP_DEPRECATED for this compiler---in order to get deprecation warnings.")
# define OSCAP_DEPRECATED(func) func
#endif
void oscap_init(void);
void oscap_cleanup(void);
const char *oscap_get_version(void);
typedef enum oscap_document_type {
OSCAP_DOCUMENT_OVAL_DEFINITIONS = 1,
OSCAP_DOCUMENT_OVAL_VARIABLES,
OSCAP_DOCUMENT_OVAL_SYSCHAR,
OSCAP_DOCUMENT_OVAL_RESULTS,
OSCAP_DOCUMENT_OVAL_DIRECTIVES,
OSCAP_DOCUMENT_XCCDF,
OSCAP_DOCUMENT_CPE_LANGUAGE,
OSCAP_DOCUMENT_CPE_DICTIONARY,
OSCAP_DOCUMENT_CVE_FEED,
OSCAP_DOCUMENT_SCE_RESULT,
OSCAP_DOCUMENT_SDS,
OSCAP_DOCUMENT_ARF,
OSCAP_DOCUMENT_XCCDF_TAILORING
// If you are adding a new enum here, make sure you add support for it
// to utils/oscap-info.c!
} oscap_document_type_t;
const char *oscap_document_type_to_string(oscap_document_type_t type);
typedef int (*xml_reporter)(const char *file, int line, const char *msg, void *arg);
int oscap_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, xml_reporter reporter, void *arg);
int oscap_schematron_validate_document(const char *xmlfile, oscap_document_type_t doctype, const char *version, const char *outfile);
int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params);
const char * oscap_path_to_schemas(void);
const char * oscap_path_to_schematron(void);
const char * oscap_path_to_cpe(void);
int oscap_determine_document_type(const char *document, oscap_document_type_t *doc_type);
/************************************************************/
#endif