scap_ds.h
Go to the documentation of this file.
/*
* Copyright 2012 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:
* Martin Preisler <mpreisle@redhat.com>
*/
#ifndef OPENSCAP_DS_H
#define OPENSCAP_DS_H
#include "oscap.h"
int ds_sds_decompose(const char* input_file, const char* id, const char* xccdf_id,
const char* target_dir, const char* target_filename);
int ds_sds_decompose_custom(const char* input_file, const char* id, const char* target_dir,
const char* container_name, const char* component_id, const char* target_filename);
int ds_sds_compose_from_xccdf(const char* xccdf_file, const char* target_datastream);
int ds_sds_compose_add_component(const char *target_datastream, const char *datastream_id, const char *new_component, bool extended);
int ds_rds_decompose(const char* input_file, const char* report_id, const char* request_id, const char* target_dir);
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;
struct ds_stream_index* ds_stream_index_new(void);
void ds_stream_index_free(struct ds_stream_index* s);
const char* ds_stream_index_get_id(struct ds_stream_index* s);
const char* ds_stream_index_get_timestamp(struct ds_stream_index* s);
const char* ds_stream_index_get_version(struct ds_stream_index* s);
struct oscap_string_iterator* ds_stream_index_get_checks(struct ds_stream_index* s);
struct oscap_string_iterator* ds_stream_index_get_checklists(struct ds_stream_index* s);
struct oscap_string_iterator* ds_stream_index_get_dictionaries(struct ds_stream_index* s);
struct oscap_string_iterator* ds_stream_index_get_extended_components(struct ds_stream_index* s);
struct ds_sds_index;
struct ds_sds_index* ds_sds_index_new(void);
void ds_sds_index_free(struct ds_sds_index* s);
struct ds_stream_index* ds_sds_index_get_stream(struct ds_sds_index* s, const char* stream_id);
struct ds_stream_index_iterator* ds_sds_index_get_streams(struct ds_sds_index* s);
struct ds_sds_index *ds_sds_index_import(const char* file);
int ds_sds_index_select_checklist(struct ds_sds_index* s,
const char** datastream_id, const char** component_id);
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;
struct ds_stream_index *ds_stream_index_iterator_next(struct ds_stream_index_iterator *it);
bool ds_stream_index_iterator_has_more(struct ds_stream_index_iterator *it);
void ds_stream_index_iterator_free(struct ds_stream_index_iterator *it);
struct rds_report_request_index;
struct rds_report_request_index* rds_report_request_index_new(void);
void rds_report_request_index_free(struct rds_report_request_index* s);
const char* rds_report_request_index_get_id(struct rds_report_request_index* s);
struct rds_asset_index;
struct rds_report_index;
struct rds_asset_index* rds_asset_index_new(void);
void rds_asset_index_free(struct rds_asset_index* s);
const char* rds_asset_index_get_id(struct rds_asset_index* s);
void rds_asset_index_add_report_ref(struct rds_asset_index* s, struct rds_report_index* report);
struct rds_report_index_iterator* rds_asset_index_get_reports(struct rds_asset_index* s);
struct rds_report_index* rds_report_index_new(void);
void rds_report_index_free(struct rds_report_index* s);
const char* rds_report_index_get_id(struct rds_report_index* s);
void rds_report_index_set_request(struct rds_report_index* s, struct rds_report_request_index *request);
struct rds_report_request_index *rds_report_index_get_request(struct rds_report_index* s);
struct rds_report_request_index_iterator;
struct rds_report_request_index *rds_report_request_index_iterator_next(struct rds_report_request_index_iterator *it);
bool rds_report_request_index_iterator_has_more(struct rds_report_request_index_iterator *it);
void rds_report_request_index_iterator_free(struct rds_report_request_index_iterator *it);
struct rds_asset_index_iterator;
struct rds_asset_index *rds_asset_index_iterator_next(struct rds_asset_index_iterator *it);
bool rds_asset_index_iterator_has_more(struct rds_asset_index_iterator *it);
void rds_asset_index_iterator_free(struct rds_asset_index_iterator *it);
struct rds_report_index_iterator;
struct rds_report_index *rds_report_index_iterator_next(struct rds_report_index_iterator *it);
bool rds_report_index_iterator_has_more(struct rds_report_index_iterator *it);
void rds_report_index_iterator_free(struct rds_report_index_iterator *it);
struct rds_index;
struct rds_index* rds_index_new(void);
void rds_index_free(struct rds_index *s);
struct rds_report_request_index_iterator *rds_index_get_report_requests(struct rds_index *s);
struct rds_asset_index_iterator *rds_index_get_assets(struct rds_index *s);
struct rds_report_index_iterator *rds_index_get_reports(struct rds_index *s);
struct rds_report_request_index *rds_index_get_report_request(struct rds_index *rds, const char *id);
struct rds_asset_index *rds_index_get_asset(struct rds_index *rds, const char *id);
struct rds_report_index *rds_index_get_report(struct rds_index *rds, const char *id);
struct rds_index *rds_index_import(const char *file);
int rds_index_select_report(struct rds_index *s, const char **report_id);
/************************************************************/
#endif