Open SCAP Library: ds_sds_session.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

ds_sds_session.h
1 /*
2 * Copyright 2014 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Author:
20 * Šimon Lukašík
21 */
22 #ifndef DS_SDS_SESSION_H
23 #define DS_SDS_SESSION_H
24
25 #ifdef HAVE_CONFIG_H
26 #include <config.h>
27 #endif
28
29 #include "oscap.h"
30 #include "oscap_source.h"
31 #include "scap_ds.h"
32
46 struct ds_sds_session;
47
56 struct ds_sds_session *ds_sds_session_new_from_source(struct oscap_source *source);
57
64 struct ds_sds_index *ds_sds_session_get_sds_idx(struct ds_sds_session *session);
65
70 void ds_sds_session_free(struct ds_sds_session *sds_session);
71
82 struct oscap_source *ds_sds_session_select_checklist(struct ds_sds_session *session, const char *datastream_id, const char *component_id, const char *benchmark_id);
83
92 struct oscap_source *ds_sds_session_select_tailoring(struct ds_sds_session *session, const char *component_id);
93
102 int ds_sds_session_set_datastream_id(struct ds_sds_session *session, const char *datastream_id);
103
110 const char *ds_sds_session_get_datastream_id(const struct ds_sds_session *session);
111
118 const char *ds_sds_session_get_checklist_id(const struct ds_sds_session *session);
119
131 struct oscap_source *ds_sds_session_get_component_by_href(struct ds_sds_session *session, const char *href);
132
144 int ds_sds_session_register_component_with_dependencies(struct ds_sds_session *session, const char *container_name, const char *component_id, const char *target_filename);
145
152 int ds_sds_session_dump_component_files(struct ds_sds_session *session);
153
161 int ds_sds_session_set_target_dir(struct ds_sds_session *session, const char *target_dir);
162
173 void ds_sds_session_reset(struct ds_sds_session *session);
174
183 char *ds_sds_session_get_html_guide(struct ds_sds_session *session, const char *profile_id);
184
185 #endif
ds_sds_session::ds_sds_session_select_checklist
struct oscap_source * ds_sds_session_select_checklist(struct ds_sds_session *session, const char *datastream_id, const char *component_id, const char *benchmark_id)
Select Checklist (XCCDF presumably) from DataStream collection.
Definition: ds_sds_session.c:160
ds_sds_session::ds_sds_session_dump_component_files
int ds_sds_session_dump_component_files(struct ds_sds_session *session)
Store cached component files to the disc.
Definition: ds_sds_session.c:285
oscap.h
General OpenScap functions and types.
ds_sds_session::ds_sds_session_get_checklist_id
const char * ds_sds_session_get_checklist_id(const struct ds_sds_session *session)
Return ID of currently selected component representing XCCDF within the DataStream.
Definition: ds_sds_session.c:150
ds_sds_session::ds_sds_session_new_from_source
struct ds_sds_session * ds_sds_session_new_from_source(struct oscap_source *source)
Create new ds_sds_session from existing oscap_source.
Definition: ds_sds_session.c:56
ds_sds_session::ds_sds_session_set_target_dir
int ds_sds_session_set_target_dir(struct ds_sds_session *session, const char *target_dir)
Set target directory for the component files.
Definition: ds_sds_session.c:119
ds_sds_session::ds_sds_session_reset
void ds_sds_session_reset(struct ds_sds_session *session)
Reset session for further use.
Definition: ds_sds_session.c:81
ds_sds_index
Represents element - the root element of each source datastream.
Definition: sds_index.c:214
ds_sds_session::ds_sds_session_set_datastream_id
int ds_sds_session_set_datastream_id(struct ds_sds_session *session, const char *datastream_id)
Set the ID of DataStream within collection to use.
Definition: ds_sds_session.c:132
ds_sds_session::ds_sds_session_get_html_guide
char * ds_sds_session_get_html_guide(struct ds_sds_session *session, const char *profile_id)
Returns HTML representation of selected checklist in form of OpenSCAP guide.
Definition: ds_sds_session.c:290
ds_sds_session::source
struct oscap_source * source
Source DataStream raw representation.
Definition: ds_sds_session.c:47
oscap_source
Definition: oscap_source.c:62
ds_sds_session::ds_sds_session_get_component_by_href
struct oscap_source * ds_sds_session_get_component_by_href(struct ds_sds_session *session, const char *href)
Get component from Source DataStream by its href.
Definition: ds_sds_session.c:243
ds_sds_session::ds_sds_session_register_component_with_dependencies
int ds_sds_session_register_component_with_dependencies(struct ds_sds_session *session, const char *container_name, const char *component_id, const char *target_filename)
Register component and its dependencies to internal cache.
Definition: ds_sds_session.c:249
scap_ds.h
Open-scap Data Stream interface.
ds_sds_session::ds_sds_session_get_datastream_id
const char * ds_sds_session_get_datastream_id(const struct ds_sds_session *session)
Return ID of currently selected DataStream within the DataStream collection.
Definition: ds_sds_session.c:145
ds_sds_session::ds_sds_session_select_tailoring
struct oscap_source * ds_sds_session_select_tailoring(struct ds_sds_session *session, const char *component_id)
Select XCCDF Tailoring from DataStream collection.
Definition: ds_sds_session.c:201
ds_sds_session
Definition: ds_sds_session.c:46
ds_sds_session::ds_sds_session_get_sds_idx
struct ds_sds_index * ds_sds_session_get_sds_idx(struct ds_sds_session *session)
Get Source DataStream index.
Definition: ds_sds_session.c:90