Open SCAP Library

scap_ds.h

Go to the documentation of this file.
00001 
00010 /*
00011  * Copyright 2012--2014 Red Hat Inc., Durham, North Carolina.
00012  * All Rights Reserved.
00013  *
00014  * This library is free software; you can redistribute it and/or
00015  * modify it under the terms of the GNU Lesser General Public
00016  * License as published by the Free Software Foundation; either
00017  * version 2.1 of the License, or (at your option) any later version.
00018  *
00019  * This library is distributed in the hope that it will be useful, 
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022  * Lesser General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public
00025  * License along with this library; if not, write to the Free Software 
00026  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  *
00028  * Authors:
00029  *      Martin Preisler <mpreisle@redhat.com>
00030  */
00031 
00032 #ifndef OPENSCAP_DS_H
00033 #define OPENSCAP_DS_H
00034 
00035 #include "oscap.h"
00036 
00072 OSCAP_DEPRECATED(int ds_sds_decompose(const char* input_file, const char* id, const char* xccdf_id, const char* target_dir, const char* target_filename));
00073 
00092 OSCAP_DEPRECATED(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));
00093 
00109 int ds_sds_compose_from_xccdf(const char* xccdf_file, const char* target_datastream);
00110 
00127 int ds_sds_compose_add_component(const char *target_datastream, const char *datastream_id, const char *new_component, bool extended);
00128 
00133 OSCAP_DEPRECATED(int ds_rds_decompose(const char* input_file, const char* report_id, const char* request_id, const char* target_dir));
00134 
00157 int ds_rds_create(const char* sds_file, const char* xccdf_result_file,
00158         const char** oval_result_files, const char* target_file);
00159 
00176 struct ds_stream_index;
00177 
00179 struct ds_stream_index* ds_stream_index_new(void);
00181 void ds_stream_index_free(struct ds_stream_index* s);
00182 
00188 const char* ds_stream_index_get_id(struct ds_stream_index* s);
00189 
00195 const char* ds_stream_index_get_timestamp(struct ds_stream_index* s);
00196 
00202 const char* ds_stream_index_get_version(struct ds_stream_index* s);
00203 
00209 struct oscap_string_iterator* ds_stream_index_get_checks(struct ds_stream_index* s);
00210 
00216 struct oscap_string_iterator* ds_stream_index_get_checklists(struct ds_stream_index* s);
00217 
00223 struct oscap_string_iterator* ds_stream_index_get_dictionaries(struct ds_stream_index* s);
00224 
00230 struct oscap_string_iterator* ds_stream_index_get_extended_components(struct ds_stream_index* s);
00231 
00243 struct ds_sds_index;
00244 
00246 struct ds_sds_index* ds_sds_index_new(void);
00248 void ds_sds_index_free(struct ds_sds_index* s);
00249 
00255 struct ds_stream_index* ds_sds_index_get_stream(struct ds_sds_index* s, const char* stream_id);
00256 
00262 struct ds_stream_index_iterator* ds_sds_index_get_streams(struct ds_sds_index* s);
00263 
00272 OSCAP_DEPRECATED(struct ds_sds_index *ds_sds_index_import(const char* file));
00273 
00286 int ds_sds_index_select_checklist(struct ds_sds_index* s,
00287                 const char** datastream_id, const char** component_id);
00288 
00305 int ds_sds_index_select_checklist_by_benchmark_id(struct ds_sds_index* s,
00306                 const char *benchmark_id, const char **datastream_id, const char **component_ref_id);
00307 
00312 struct ds_stream_index_iterator;
00313 
00315 struct ds_stream_index *ds_stream_index_iterator_next(struct ds_stream_index_iterator *it);
00317 bool ds_stream_index_iterator_has_more(struct ds_stream_index_iterator *it);
00319 void ds_stream_index_iterator_free(struct ds_stream_index_iterator *it);
00320 
00324 struct rds_report_request_index;
00325 
00326 struct rds_report_request_index* rds_report_request_index_new(void);
00327 void rds_report_request_index_free(struct rds_report_request_index* s);
00328 const char* rds_report_request_index_get_id(struct rds_report_request_index* s);
00329 
00333 struct rds_asset_index;
00334 
00338 struct rds_report_index;
00339 
00340 struct rds_asset_index* rds_asset_index_new(void);
00341 void rds_asset_index_free(struct rds_asset_index* s);
00342 const char* rds_asset_index_get_id(struct rds_asset_index* s);
00343 void rds_asset_index_add_report_ref(struct rds_asset_index* s, struct rds_report_index* report);
00344 struct rds_report_index_iterator* rds_asset_index_get_reports(struct rds_asset_index* s);
00345 
00346 struct rds_report_index* rds_report_index_new(void);
00347 void rds_report_index_free(struct rds_report_index* s);
00348 const char* rds_report_index_get_id(struct rds_report_index* s);
00349 void rds_report_index_set_request(struct rds_report_index* s, struct rds_report_request_index *request);
00350 struct rds_report_request_index *rds_report_index_get_request(struct rds_report_index* s);
00351 
00356 struct rds_report_request_index_iterator;
00357 
00359 struct rds_report_request_index *rds_report_request_index_iterator_next(struct rds_report_request_index_iterator *it);
00361 bool rds_report_request_index_iterator_has_more(struct rds_report_request_index_iterator *it);
00363 void rds_report_request_index_iterator_free(struct rds_report_request_index_iterator *it);
00364 
00369 struct rds_asset_index_iterator;
00370 
00372 struct rds_asset_index *rds_asset_index_iterator_next(struct rds_asset_index_iterator *it);
00374 bool rds_asset_index_iterator_has_more(struct rds_asset_index_iterator *it);
00376 void rds_asset_index_iterator_free(struct rds_asset_index_iterator *it);
00377 
00382 struct rds_report_index_iterator;
00383 
00385 struct rds_report_index *rds_report_index_iterator_next(struct rds_report_index_iterator *it);
00387 bool rds_report_index_iterator_has_more(struct rds_report_index_iterator *it);
00389 void rds_report_index_iterator_free(struct rds_report_index_iterator *it);
00390 
00399 struct rds_index;
00400 
00402 struct rds_index* rds_index_new(void);
00404 void rds_index_free(struct rds_index *s);
00405 
00407 struct rds_report_request_index_iterator *rds_index_get_report_requests(struct rds_index *s);
00409 struct rds_asset_index_iterator *rds_index_get_assets(struct rds_index *s);
00411 struct rds_report_index_iterator *rds_index_get_reports(struct rds_index *s);
00412 
00414 struct rds_report_request_index *rds_index_get_report_request(struct rds_index *rds, const char *id);
00416 struct rds_asset_index *rds_index_get_asset(struct rds_index *rds, const char *id);
00418 struct rds_report_index *rds_index_get_report(struct rds_index *rds, const char *id);
00419 
00425 OSCAP_DEPRECATED(struct rds_index *rds_index_import(const char *file));
00426 
00428 int rds_index_select_report(struct rds_index *s, const char **report_id);
00429 
00430 /************************************************************/
00433 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines