Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ds_rds_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_RDS_SESSION_H
23 #define DS_RDS_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 
40 struct ds_rds_session;
41 
51 
57 void ds_rds_session_free(struct ds_rds_session *rds_session);
58 
65 struct rds_index *ds_rds_session_get_rds_idx(struct ds_rds_session *session);
66 
74 int ds_rds_session_set_target_dir(struct ds_rds_session *session, const char *target_dir);
75 
83 
92 struct oscap_source *ds_rds_session_select_report(struct ds_rds_session *session, const char *report_id);
93 
103 struct oscap_source *ds_rds_session_select_report_request(struct ds_rds_session *session, const char *report_request_id);
104 
114 int ds_rds_session_replace_report_with_source(struct ds_rds_session *session, struct oscap_source *source);
115 
122 char *ds_rds_session_get_html_report(struct ds_rds_session *rds_session);
123 
124 #endif
General OpenScap functions and types.
char * ds_rds_session_get_html_report(struct ds_rds_session *rds_session)
Returns HTML representation of the given result datastream.
Definition: ds_rds_session.c:178
int ds_rds_session_dump_component_files(struct ds_rds_session *session)
Store cached component files to the hard drive.
Definition: ds_rds_session.c:118
int ds_rds_session_replace_report_with_source(struct ds_rds_session *session, struct oscap_source *source)
Replace currently selected report with the content of the source.
Definition: ds_rds_session.c:160
struct oscap_source * source
Result DataStream raw representation.
Definition: ds_rds_session.c:43
Definition: ds_rds_session.c:42
struct rds_index * ds_rds_session_get_rds_idx(struct ds_rds_session *session)
Get Result DataStream index.
Definition: ds_rds_session.c:72
Represents &lt;asset-report-collection&gt; element - the root element of each result datastream in Asset Re...
Definition: rds_index.c:41
Definition: oscap_source.c:62
struct ds_rds_session * ds_rds_session_new_from_source(struct oscap_source *source)
Create new ds_rds_session from existing oscap_source.
Definition: ds_rds_session.c:50
int ds_rds_session_set_target_dir(struct ds_rds_session *session, const char *target_dir)
Set target directory for the component files.
Definition: ds_rds_session.c:95
void ds_rds_session_free(struct ds_rds_session *rds_session)
Dispose ds_rds_session structure.
Definition: ds_rds_session.c:63
struct oscap_source * ds_rds_session_select_report_request(struct ds_rds_session *session, const char *report_request_id)
Select arf:report-request from result DataStream and return it in form of oscap_source.
Definition: ds_rds_session.c:139
Open-scap Data Stream interface.
struct oscap_source * ds_rds_session_select_report(struct ds_rds_session *session, const char *report_id)
Select arf:report from result DataStream and return it in form of oscap_source.
Definition: ds_rds_session.c:123