Loading...
Searching...
No Matches
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
* Lukas Kuklinek <lkuklinek@redhat.com>
* Peter Vrabec <pvrabec@redhat.com>
*/
#ifndef OSCAP_H_
#define OSCAP_H_
#include <stdbool.h>
#include "oscap_text.h"
#include "oscap_reference.h"
#include "oscap_export.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
OSCAP_API void oscap_init(void);
OSCAP_API void oscap_cleanup(void);
OSCAP_API const char *oscap_get_version(void);
typedef enum oscap_document_type {
OSCAP_DOCUMENT_UNKNOWN = 0,
OSCAP_DOCUMENT_OVAL_DEFINITIONS,
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_SCE_RESULT,
OSCAP_DOCUMENT_SDS,
OSCAP_DOCUMENT_ARF,
OSCAP_DOCUMENT_XCCDF_TAILORING,
OSCAP_DOCUMENT_OCIL,
// If you are adding a new enum here, make sure you add support for it
// to utils/oscap-info.c!
} oscap_document_type_t;
OSCAP_API 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);
OSCAP_API int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params);
OSCAP_API const char * oscap_path_to_schemas(void);
OSCAP_API const char * oscap_path_to_cpe(void);
/************************************************************/
#endif
oscap_init
OSCAP_API void oscap_init(void)
Initialize OpenSCAP library.
Definition oscapxml.c:112
oscap_get_version
OSCAP_API const char * oscap_get_version(void)
Get version of the OpenSCAP library.
Definition oscapxml.c:126
oscap_cleanup
OSCAP_API void oscap_cleanup(void)
Release library internal caches.
Definition oscapxml.c:119
oscap_document_type_t
enum oscap_document_type oscap_document_type_t
SCAP document type identifiers.
oscap_apply_xslt
OSCAP_API int oscap_apply_xslt(const char *xmlfile, const char *xsltfile, const char *outfile, const char **params)
Apply a XSLT stylesheet to a XML file.
Definition oscapxml.c:128
oscap_path_to_schemas
OSCAP_API const char * oscap_path_to_schemas(void)
Function returns path used to locate OpenSCAP XML schemas.
Definition oscapxml.c:99
oscap_document_type_to_string
OSCAP_API const char * oscap_document_type_to_string(oscap_document_type_t type)
Convert oscap_document_type_t constant to human readable (english) representation.
Definition oscapxml.c:136
oscap_document_type
oscap_document_type
SCAP document type identifiers.
Definition oscap.h:84
oscap_path_to_cpe
OSCAP_API const char * oscap_path_to_cpe(void)
Function returns path used to locate OpenSCAP Default CPE files.
Definition oscapxml.c:108
OSCAP_DOCUMENT_OCIL
@ OSCAP_DOCUMENT_OCIL
OCIL Definitions file.
Definition oscap.h:98
OSCAP_DOCUMENT_OVAL_VARIABLES
@ OSCAP_DOCUMENT_OVAL_VARIABLES
OVAL Variables.
Definition oscap.h:87
OSCAP_DOCUMENT_UNKNOWN
@ OSCAP_DOCUMENT_UNKNOWN
The type is unknown.
Definition oscap.h:85
OSCAP_DOCUMENT_CPE_DICTIONARY
@ OSCAP_DOCUMENT_CPE_DICTIONARY
CPE dictionary file.
Definition oscap.h:93
OSCAP_DOCUMENT_XCCDF
@ OSCAP_DOCUMENT_XCCDF
XCCDF benchmark file.
Definition oscap.h:91
OSCAP_DOCUMENT_ARF
@ OSCAP_DOCUMENT_ARF
Result Data Stream file.
Definition oscap.h:96
OSCAP_DOCUMENT_SCE_RESULT
@ OSCAP_DOCUMENT_SCE_RESULT
SCE result file.
Definition oscap.h:94
OSCAP_DOCUMENT_SDS
@ OSCAP_DOCUMENT_SDS
Source Data Stream file.
Definition oscap.h:95
OSCAP_DOCUMENT_CPE_LANGUAGE
@ OSCAP_DOCUMENT_CPE_LANGUAGE
CPE language file.
Definition oscap.h:92
OSCAP_DOCUMENT_OVAL_DIRECTIVES
@ OSCAP_DOCUMENT_OVAL_DIRECTIVES
OVAL directives file.
Definition oscap.h:90
OSCAP_DOCUMENT_XCCDF_TAILORING
@ OSCAP_DOCUMENT_XCCDF_TAILORING
XCCDF tailoring file.
Definition oscap.h:97
OSCAP_DOCUMENT_OVAL_SYSCHAR
@ OSCAP_DOCUMENT_OVAL_SYSCHAR
OVAL system characteristics file.
Definition oscap.h:88
OSCAP_DOCUMENT_OVAL_RESULTS
@ OSCAP_DOCUMENT_OVAL_RESULTS
OVAL results file.
Definition oscap.h:89
OSCAP_DOCUMENT_OVAL_DEFINITIONS
@ OSCAP_DOCUMENT_OVAL_DEFINITIONS
OVAL Definitions file.
Definition oscap.h:86
oscap_text.h
Multilingual text processing interface.