Open SCAP Library: oscap_source.h Source File

Open SCAP Library

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

- File List
- Globals

oscap_source.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 OSCAP_SOURCE_H
23 #define OSCAP_SOURCE_H
24
25 #ifdef HAVE_CONFIG_H
26 #include <config.h>
27 #endif
28
29 #include "oscap.h"
30
56 struct oscap_source;
57
65 struct oscap_source *oscap_source_new_from_file(const char *filepath);
66
80 struct oscap_source *oscap_source_new_from_memory(const char *buffer, size_t size, const char *filepath);
81
86 void oscap_source_free(struct oscap_source *source);
87
98 oscap_document_type_t oscap_source_get_scap_type(struct oscap_source *source);
99
106 const char *oscap_source_get_schema_version(struct oscap_source *source);
107
115 int oscap_source_validate(struct oscap_source *source, xml_reporter reporter, void *user);
116
125 int oscap_source_validate_schematron(struct oscap_source *source, const char *outfile);
126
133 const char *oscap_source_readable_origin(const struct oscap_source *source);
134
143 int oscap_source_save_as(struct oscap_source *source, const char *filename);
144
157 int oscap_source_get_raw_memory(struct oscap_source *source, char **buffer, size_t *size);
158
159 #endif
reporter
Definition: reporter.c:31
oscap.h
General OpenScap functions and types.
oscap_source::filepath
char * filepath
Filepath (if originated from file)
Definition: oscap_source.c:67
oscap_source::oscap_source_save_as
int oscap_source_save_as(struct oscap_source *source, const char *filename)
Store the resource represented by oscap_source to the file.
Definition: oscap_source.c:329
oscap_source::oscap_source_validate_schematron
int oscap_source_validate_schematron(struct oscap_source *source, const char *outfile)
Validate the SCAP document against schematron assertions.
Definition: oscap_source.c:274
oscap_document_type_t
enum oscap_document_type oscap_document_type_t
SCAP document type identifiers.
oscap_source
Definition: oscap_source.c:62
oscap_source::oscap_source_validate
int oscap_source_validate(struct oscap_source *source, xml_reporter reporter, void *user)
Validate the SCAP document against particular XML schema definition.
Definition: oscap_source.c:253
oscap_source::oscap_source_readable_origin
const char * oscap_source_readable_origin(const struct oscap_source *source)
Returns human readable description of oscap_source origin.
Definition: oscap_source.c:142
oscap_source::oscap_source_get_scap_type
oscap_document_type_t oscap_source_get_scap_type(struct oscap_source *source)
Get SCAP document type of the given resource.
Definition: oscap_source.c:163
oscap_source::oscap_source_get_schema_version
const char * oscap_source_get_schema_version(struct oscap_source *source)
Get the version of the schema for the particular document type.
Definition: oscap_source.c:280