00001
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef OPENSCAP_DS_H
00033 #define OPENSCAP_DS_H
00034
00035 #include "oscap.h"
00036
00069 int ds_sds_decompose(const char* input_file, const char* id, const char* xccdf_id,
00070 const char* target_dir, const char* target_filename);
00071
00087 int ds_sds_decompose_custom(const char* input_file, const char* id, const char* target_dir,
00088 const char* container_name, const char* component_id, const char* target_filename);
00089
00105 int ds_sds_compose_from_xccdf(const char* xccdf_file, const char* target_datastream);
00106
00123 int ds_sds_compose_add_component(const char *target_datastream, const char *datastream_id, const char *new_component, bool extended);
00124
00125 int ds_rds_decompose(const char* input_file, const char* report_id, const char* request_id, const char* target_dir);
00126
00149 int ds_rds_create(const char* sds_file, const char* xccdf_result_file,
00150 const char** oval_result_files, const char* target_file);
00151
00168 struct ds_stream_index;
00169
00171 struct ds_stream_index* ds_stream_index_new(void);
00173 void ds_stream_index_free(struct ds_stream_index* s);
00174
00180 const char* ds_stream_index_get_id(struct ds_stream_index* s);
00181
00187 const char* ds_stream_index_get_timestamp(struct ds_stream_index* s);
00188
00194 const char* ds_stream_index_get_version(struct ds_stream_index* s);
00195
00201 struct oscap_string_iterator* ds_stream_index_get_checks(struct ds_stream_index* s);
00202
00208 struct oscap_string_iterator* ds_stream_index_get_checklists(struct ds_stream_index* s);
00209
00215 struct oscap_string_iterator* ds_stream_index_get_dictionaries(struct ds_stream_index* s);
00216
00222 struct oscap_string_iterator* ds_stream_index_get_extended_components(struct ds_stream_index* s);
00223
00235 struct ds_sds_index;
00236
00238 struct ds_sds_index* ds_sds_index_new(void);
00240 void ds_sds_index_free(struct ds_sds_index* s);
00241
00247 struct ds_stream_index* ds_sds_index_get_stream(struct ds_sds_index* s, const char* stream_id);
00248
00254 struct ds_stream_index_iterator* ds_sds_index_get_streams(struct ds_sds_index* s);
00255
00261 struct ds_sds_index *ds_sds_index_import(const char* file);
00262
00275 int ds_sds_index_select_checklist(struct ds_sds_index* s,
00276 const char** datastream_id, const char** component_id);
00277
00294 int ds_sds_index_select_checklist_by_benchmark_id(struct ds_sds_index* s,
00295 const char *benchmark_id, const char **datastream_id, const char **component_ref_id);
00296
00301 struct ds_stream_index_iterator;
00302
00304 struct ds_stream_index *ds_stream_index_iterator_next(struct ds_stream_index_iterator *it);
00306 bool ds_stream_index_iterator_has_more(struct ds_stream_index_iterator *it);
00308 void ds_stream_index_iterator_free(struct ds_stream_index_iterator *it);
00309
00313 struct rds_report_request_index;
00314
00315 struct rds_report_request_index* rds_report_request_index_new(void);
00316 void rds_report_request_index_free(struct rds_report_request_index* s);
00317 const char* rds_report_request_index_get_id(struct rds_report_request_index* s);
00318
00322 struct rds_asset_index;
00323
00327 struct rds_report_index;
00328
00329 struct rds_asset_index* rds_asset_index_new(void);
00330 void rds_asset_index_free(struct rds_asset_index* s);
00331 const char* rds_asset_index_get_id(struct rds_asset_index* s);
00332 void rds_asset_index_add_report_ref(struct rds_asset_index* s, struct rds_report_index* report);
00333 struct rds_report_index_iterator* rds_asset_index_get_reports(struct rds_asset_index* s);
00334
00335 struct rds_report_index* rds_report_index_new(void);
00336 void rds_report_index_free(struct rds_report_index* s);
00337 const char* rds_report_index_get_id(struct rds_report_index* s);
00338 void rds_report_index_set_request(struct rds_report_index* s, struct rds_report_request_index *request);
00339 struct rds_report_request_index *rds_report_index_get_request(struct rds_report_index* s);
00340
00345 struct rds_report_request_index_iterator;
00346
00348 struct rds_report_request_index *rds_report_request_index_iterator_next(struct rds_report_request_index_iterator *it);
00350 bool rds_report_request_index_iterator_has_more(struct rds_report_request_index_iterator *it);
00352 void rds_report_request_index_iterator_free(struct rds_report_request_index_iterator *it);
00353
00358 struct rds_asset_index_iterator;
00359
00361 struct rds_asset_index *rds_asset_index_iterator_next(struct rds_asset_index_iterator *it);
00363 bool rds_asset_index_iterator_has_more(struct rds_asset_index_iterator *it);
00365 void rds_asset_index_iterator_free(struct rds_asset_index_iterator *it);
00366
00371 struct rds_report_index_iterator;
00372
00374 struct rds_report_index *rds_report_index_iterator_next(struct rds_report_index_iterator *it);
00376 bool rds_report_index_iterator_has_more(struct rds_report_index_iterator *it);
00378 void rds_report_index_iterator_free(struct rds_report_index_iterator *it);
00379
00388 struct rds_index;
00389
00391 struct rds_index* rds_index_new(void);
00393 void rds_index_free(struct rds_index *s);
00394
00396 struct rds_report_request_index_iterator *rds_index_get_report_requests(struct rds_index *s);
00398 struct rds_asset_index_iterator *rds_index_get_assets(struct rds_index *s);
00400 struct rds_report_index_iterator *rds_index_get_reports(struct rds_index *s);
00401
00403 struct rds_report_request_index *rds_index_get_report_request(struct rds_index *rds, const char *id);
00405 struct rds_asset_index *rds_index_get_asset(struct rds_index *rds, const char *id);
00407 struct rds_report_index *rds_index_get_report(struct rds_index *rds, const char *id);
00408
00410 struct rds_index *rds_index_import(const char *file);
00411
00413 int rds_index_select_report(struct rds_index *s, const char **report_id);
00414
00415
00418 #endif