Loading...
Searching...
No Matches
scap_ds.h
Go to the documentation of this file.
/*
* Copyright 2012--2014 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:
* Martin Preisler <mpreisle@redhat.com>
*/
#ifndef OPENSCAP_DS_H
#define OPENSCAP_DS_H
#include "oscap.h"
#include "oscap_export.h"
OSCAP_API int ds_sds_compose_from_xccdf(const char* xccdf_file, const char* target_datastream);
OSCAP_API int ds_sds_compose_add_component(const char *target_datastream, const char *datastream_id, const char *new_component, bool extended);
OSCAP_API int ds_rds_create(const char* sds_file, const char* xccdf_result_file,
const char** oval_result_files, const char* target_file);
struct ds_stream_index;
OSCAP_API struct ds_stream_index* ds_stream_index_new(void);
OSCAP_API void ds_stream_index_free(struct ds_stream_index* s);
OSCAP_API const char* ds_stream_index_get_id(struct ds_stream_index* s);
OSCAP_API const char* ds_stream_index_get_timestamp(struct ds_stream_index* s);
OSCAP_API const char* ds_stream_index_get_version(struct ds_stream_index* s);
OSCAP_API struct oscap_string_iterator* ds_stream_index_get_checks(struct ds_stream_index* s);
OSCAP_API struct oscap_string_iterator* ds_stream_index_get_checklists(struct ds_stream_index* s);
OSCAP_API struct oscap_string_iterator* ds_stream_index_get_dictionaries(struct ds_stream_index* s);
struct ds_sds_index;
OSCAP_API struct ds_sds_index* ds_sds_index_new(void);
OSCAP_API void ds_sds_index_free(struct ds_sds_index* s);
OSCAP_API struct ds_stream_index* ds_sds_index_get_stream(struct ds_sds_index* s, const char* stream_id);
OSCAP_API struct ds_stream_index_iterator* ds_sds_index_get_streams(struct ds_sds_index* s);
OSCAP_API int ds_sds_index_select_checklist(struct ds_sds_index* s,
const char** datastream_id, const char** component_id);
OSCAP_API int ds_sds_index_select_checklist_by_benchmark_id(struct ds_sds_index* s,
const char *benchmark_id, const char **datastream_id, const char **component_ref_id);
struct ds_stream_index_iterator;
OSCAP_API struct ds_stream_index *ds_stream_index_iterator_next(struct ds_stream_index_iterator *it);
OSCAP_API bool ds_stream_index_iterator_has_more(struct ds_stream_index_iterator *it);
OSCAP_API void ds_stream_index_iterator_free(struct ds_stream_index_iterator *it);
struct rds_report_request_index;
OSCAP_API struct rds_report_request_index* rds_report_request_index_new(void);
OSCAP_API void rds_report_request_index_free(struct rds_report_request_index* s);
OSCAP_API const char* rds_report_request_index_get_id(struct rds_report_request_index* s);
struct rds_asset_index;
struct rds_report_index;
OSCAP_API struct rds_asset_index* rds_asset_index_new(void);
OSCAP_API void rds_asset_index_free(struct rds_asset_index* s);
OSCAP_API const char* rds_asset_index_get_id(struct rds_asset_index* s);
OSCAP_API void rds_asset_index_add_report_ref(struct rds_asset_index* s, struct rds_report_index* report);
OSCAP_API struct rds_report_index_iterator* rds_asset_index_get_reports(struct rds_asset_index* s);
OSCAP_API struct rds_report_index* rds_report_index_new(void);
OSCAP_API void rds_report_index_free(struct rds_report_index* s);
OSCAP_API const char* rds_report_index_get_id(struct rds_report_index* s);
OSCAP_API void rds_report_index_set_request(struct rds_report_index* s, struct rds_report_request_index *request);
OSCAP_API struct rds_report_request_index *rds_report_index_get_request(struct rds_report_index* s);
struct rds_report_request_index_iterator;
OSCAP_API struct rds_report_request_index *rds_report_request_index_iterator_next(struct rds_report_request_index_iterator *it);
OSCAP_API bool rds_report_request_index_iterator_has_more(struct rds_report_request_index_iterator *it);
OSCAP_API void rds_report_request_index_iterator_free(struct rds_report_request_index_iterator *it);
struct rds_asset_index_iterator;
OSCAP_API struct rds_asset_index *rds_asset_index_iterator_next(struct rds_asset_index_iterator *it);
OSCAP_API bool rds_asset_index_iterator_has_more(struct rds_asset_index_iterator *it);
OSCAP_API void rds_asset_index_iterator_free(struct rds_asset_index_iterator *it);
struct rds_report_index_iterator;
OSCAP_API struct rds_report_index *rds_report_index_iterator_next(struct rds_report_index_iterator *it);
OSCAP_API bool rds_report_index_iterator_has_more(struct rds_report_index_iterator *it);
OSCAP_API void rds_report_index_iterator_free(struct rds_report_index_iterator *it);
struct rds_index;
OSCAP_API struct rds_index* rds_index_new(void);
OSCAP_API void rds_index_free(struct rds_index *s);
OSCAP_API struct rds_report_request_index_iterator *rds_index_get_report_requests(struct rds_index *s);
OSCAP_API struct rds_asset_index_iterator *rds_index_get_assets(struct rds_index *s);
OSCAP_API struct rds_report_index_iterator *rds_index_get_reports(struct rds_index *s);
OSCAP_API struct rds_report_request_index *rds_index_get_report_request(struct rds_index *rds, const char *id);
OSCAP_API struct rds_asset_index *rds_index_get_asset(struct rds_index *rds, const char *id);
OSCAP_API struct rds_report_index *rds_index_get_report(struct rds_index *rds, const char *id);
OSCAP_API int rds_index_select_report(struct rds_index *s, const char **report_id);
/************************************************************/
#endif
ds_rds_create
OSCAP_API int ds_rds_create(const char *sds_file, const char *xccdf_result_file, const char **oval_result_files, const char *target_file)
takes given source data stream and XCCDF result file and makes a result data stream
Definition rds.c:865
ds_sds_compose_from_xccdf
OSCAP_API int ds_sds_compose_from_xccdf(const char *xccdf_file, const char *target_datastream)
takes given xccdf file and constructs a source datastream
Definition sds.c:1311
ds_sds_index_select_checklist
OSCAP_API int ds_sds_index_select_checklist(struct ds_sds_index *s, const char **datastream_id, const char **component_id)
chooses datastream and checklist id combination given the IDs
Definition sds_index.c:403
ds_stream_index::ds_stream_index_get_id
OSCAP_API const char * ds_stream_index_get_id(struct ds_stream_index *s)
Gets ID of the <data-stream> element the index represents.
Definition sds_index.c:85
ds_sds_index_select_checklist_by_benchmark_id
OSCAP_API int ds_sds_index_select_checklist_by_benchmark_id(struct ds_sds_index *s, const char *benchmark_id, const char **datastream_id, const char **component_ref_id)
chooses datastream and checklist component ref ID combination, given benchmark ID
Definition sds_index.c:451
ds_sds_compose_add_component
OSCAP_API int ds_sds_compose_add_component(const char *target_datastream, const char *datastream_id, const char *new_component, bool extended)
append a new given component to the existing source datastream
Definition sds.c:1174
ds_stream_index::ds_stream_index_get_timestamp
OSCAP_API const char * ds_stream_index_get_timestamp(struct ds_stream_index *s)
Timestamp of creation OR modification of the <data-stream> element the index represents.
Definition sds_index.c:90
ds_stream_index::ds_stream_index_get_version
OSCAP_API const char * ds_stream_index_get_version(struct ds_stream_index *s)
scap-version of the the <data-stream> element the index represents.
Definition sds_index.c:95
oscap.h
General OpenScap functions and types.
ds_sds_index
Retrieves iterator over all components inside the <extended-components> element.
Definition sds_index.c:209
ds_stream_index_iterator
ds_stream_index
Contains information about one particular "<data-stream>" element in the datastream collection (also ...
Definition sds_index.c:38
oscap_string_iterator
String iterator.
rds_asset_index_iterator
rds_asset_index
Definition rds_asset_index.c:39
rds_index
Represents <asset-report-collection> element - the root element of each result datastream in Asset Re...
Definition rds_index.c:40
rds_report_index_iterator
rds_report_index
Definition rds_report_index.c:37
rds_report_request_index_iterator
rds_report_request_index
Definition rds_report_request_index.c:37