Loading...
Searching...
No Matches
oval_session.h
Go to the documentation of this file.
/*
* Copyright 2015 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
*
* Author:
* Michal Šrubař <msrubar@redhat.com>
*/
#ifndef OVAL_SESSION_H_
#define OVAL_SESSION_H_
#include "oscap_download_cb.h"
#include "oscap_export.h"
struct oval_session;
OSCAP_API struct oval_session *oval_session_new(const char *filename);
OSCAP_API void oval_session_set_variables(struct oval_session *session, const char *filename);
OSCAP_API void oval_session_set_directives(struct oval_session *session, const char *filename);
OSCAP_API void oval_session_set_validation(struct oval_session *session, bool validate, bool full_validation);
OSCAP_API void oval_session_set_datastream_id(struct oval_session *session, const char *id);
OSCAP_API void oval_session_set_component_id(struct oval_session *session, const char *id);
OSCAP_API void oval_session_set_results_export(struct oval_session *session, const char *filename);
OSCAP_API void oval_session_set_report_export(struct oval_session *session, const char *filename);
OSCAP_API void oval_session_set_xml_reporter(struct oval_session *session, xml_reporter fn);
OSCAP_API int oval_session_load(struct oval_session *session);
OSCAP_API int oval_session_evaluate_id(struct oval_session *session, const char *id, oval_result_t *result);
OSCAP_API int oval_session_evaluate(struct oval_session *session, agent_reporter fn, void *arg);
OSCAP_API int oval_session_export(struct oval_session *session);
OSCAP_API void oval_session_set_export_system_characteristics(struct oval_session *session, bool export);
OSCAP_API OSCAP_DEPRECATED(void oval_session_set_remote_resources(struct oval_session *session, bool allowed, download_progress_calllback_t callback));
OSCAP_API void oval_session_configure_remote_resources(struct oval_session *session, bool allowed, const char *local_files, download_progress_calllback_t callback);
OSCAP_API void oval_session_free(struct oval_session *session);
#endif
OSCAP_DEPRECATED
#define OSCAP_DEPRECATED(func)
This macro will warn, when a deprecated function is used.
Definition oscap.h:50
oval_result_t
oval_result_t
Result values for the evaluation of an OVAL Definition or an OVAL Test.
Definition oval_types.h:445
oval_session::oval_session_set_xml_reporter
OSCAP_API void oval_session_set_xml_reporter(struct oval_session *session, xml_reporter fn)
Set XML validation reporter.
Definition oval_session.c:181
oval_session::oval_session_free
OSCAP_API void oval_session_free(struct oval_session *session)
Destructor of an oval_session.
Definition oval_session.c:468
oval_session::oval_session_new
OSCAP_API struct oval_session * oval_session_new(const char *filename)
Costructor of an oval_session.
Definition oval_session.c:91
oval_session::oval_session_export
OSCAP_API int oval_session_export(struct oval_session *session)
Export result to a file.
Definition oval_session.c:384
oval_session::oval_session_configure_remote_resources
OSCAP_API void oval_session_configure_remote_resources(struct oval_session *session, bool allowed, const char *local_files, download_progress_calllback_t callback)
Set property of remote content.
Definition oval_session.c:456
oval_session::oval_session_set_variables
OSCAP_API void oval_session_set_variables(struct oval_session *session, const char *filename)
Set OVAL Variables.
Definition oval_session.c:117
oval_session::oval_session_set_component_id
OSCAP_API void oval_session_set_component_id(struct oval_session *session, const char *id)
Set ID of a particular OVAL component if there are two OVALs in one source datastream.
Definition oval_session.c:157
oval_session::oval_session_set_remote_resources
OSCAP_API void oval_session_set_remote_resources(struct oval_session *session, bool allowed, download_progress_calllback_t callback)
Set property of remote content.
Definition oval_session.c:463
oval_session::oval_session_load
OSCAP_API int oval_session_load(struct oval_session *session)
Load OVAL Definitions and bind OVAL Variables to it if provided.
Definition oval_session.c:295
oval_session::oval_session_set_export_system_characteristics
OSCAP_API void oval_session_set_export_system_characteristics(struct oval_session *session, bool export)
Set exporting of system characteristics in OVAL results.
Definition oval_session.c:451
oval_session::oval_session_set_report_export
OSCAP_API void oval_session_set_report_export(struct oval_session *session, const char *filename)
Set a name of the file that the the OVAL Results, converted to HTML format, will be written into.
Definition oval_session.c:173
oval_session::oval_session_set_results_export
OSCAP_API void oval_session_set_results_export(struct oval_session *session, const char *filename)
Set a name of the file that the the OVAL Results will be written into.
Definition oval_session.c:165
oval_session::oval_session_evaluate_id
OSCAP_API int oval_session_evaluate_id(struct oval_session *session, const char *id, oval_result_t *result)
Evaluate a specific OVAL Definition.
Definition oval_session.c:340
oval_session::oval_session_evaluate
OSCAP_API int oval_session_evaluate(struct oval_session *session, agent_reporter fn, void *arg)
Evaluate OVAL Definitions.
Definition oval_session.c:365
oval_session::oval_session_set_datastream_id
OSCAP_API void oval_session_set_datastream_id(struct oval_session *session, const char *id)
Set ID of a specific OVAL Definition in an source datastream.
Definition oval_session.c:149
oval_session::oval_session_set_validation
OSCAP_API void oval_session_set_validation(struct oval_session *session, bool validate, bool full_validation)
Set XSD validation level.
Definition oval_session.c:141
oval_session::oval_session_set_directives
OSCAP_API void oval_session_set_directives(struct oval_session *session, const char *filename)
Set OVAL Directives.
Definition oval_session.c:129
oval_session
A structure encapsulating the context of OVAL operations.
Definition oval_session.c:53