Open SCAP Library: cce.h Source File

Open SCAP Library

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

- File List
- Globals

cce.h
Go to the documentation of this file.
1
8 /*
9 * Copyright 2008-2009 Red Hat Inc., Durham, North Carolina.
10 * All Rights Reserved.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Authors:
27 * Lukas Kuklinek <lkuklinek@redhat.com>
28 * Riley C. Porter <Riley.Porter@g2-inc.com>
29 */
30
31 #include <stdbool.h>
32 #include "oscap.h"
33
34 #ifndef _CCE_H
35 #define _CCE_H
36
41 struct cce;
42
47 struct cce_entry;
48
53 struct cce_reference;
54
55 /************************************************************/
67 struct cce_entry_iterator *cce_get_entries(const struct cce *cce);
68
74 struct cce_entry *cce_get_entry(const struct cce *cce, const char *id);
75
80 const char *cce_entry_get_id(const struct cce_entry *cce);
81
86 const char *cce_entry_get_description(const struct cce_entry *cce);
87
92 struct oscap_string_iterator *cce_entry_get_params(const struct cce_entry *cce);
93
98 struct oscap_string_iterator *cce_entry_get_tech_mechs(const struct cce_entry *cce);
99
104 struct cce_reference_iterator *cce_entry_get_references(const struct cce_entry *cce);
105
110 const char *cce_reference_get_source(const struct cce_reference *ref);
111
116 const char *cce_reference_get_value(const struct cce_reference *ref);
117
118 /************************************************************/
121 /************************************************************/
132 struct cce_reference_iterator;
134 struct cce_reference *cce_reference_iterator_next(struct cce_reference_iterator *it);
136 bool cce_reference_iterator_has_more(struct cce_reference_iterator *it);
138 void cce_reference_iterator_free(struct cce_reference_iterator *it);
140 void cce_reference_iterator_reset(struct cce_reference_iterator *it);
141
147 struct cce_entry_iterator;
149 struct cce_entry *cce_entry_iterator_next(struct cce_entry_iterator *it);
151 bool cce_entry_iterator_has_more(struct cce_entry_iterator *it);
153 void cce_entry_iterator_free(struct cce_entry_iterator *it);
155 void cce_entry_iterator_reset(struct cce_entry_iterator *it);
156
157 /************************************************************/
166 struct cce *cce_new(const char *fname);
167
174 void cce_free(struct cce *cce);
175
176 /************************************************************/
188 bool cce_validate(const char *filename);
189
195 const char * cce_supported(void);
196
197 /************************************************************/
202 #endif
cce_reference
Structure holding a CCE reference.
Definition: cce_priv.h:55
cce_entry::cce_entry_get_id
const char * cce_entry_get_id(const struct cce_entry *cce)
Get CCE entry ID.
cce_entry::cce_entry_get_references
struct cce_reference_iterator * cce_entry_get_references(const struct cce_entry *cce)
Get an iterator to CCE entry's references.
oscap.h
General OpenScap functions and types.
cce
Structure holding CCE entries.
Definition: cce_priv.h:42
cce_reference_iterator::cce_reference_iterator_free
void cce_reference_iterator_free(struct cce_reference_iterator *it)
cce::cce_get_entry
struct cce_entry * cce_get_entry(const struct cce *cce, const char *id)
Get an CCE entry by ID.
cce_reference_iterator::cce_reference_iterator_next
struct cce_reference * cce_reference_iterator_next(struct cce_reference_iterator *it)
cce_entry_iterator
Iterator over CCE entries.
cce::cce_free
void cce_free(struct cce *cce)
CCE structure destructor.
Definition: cce.c:53
cce_reference::cce_reference_get_source
const char * cce_reference_get_source(const struct cce_reference *ref)
Get source of CCE reference.
cce::cce_get_entries
struct cce_entry_iterator * cce_get_entries(const struct cce *cce)
Get an iterator to the contents of the CCE.
cce_entry::cce_entry_get_description
const char * cce_entry_get_description(const struct cce_entry *cce)
Get CCE entry desription.
cce::cce_new
struct cce * cce_new(const char *fname)
Create a new CCE structure from XML file.
Definition: cce.c:99
cce_entry_iterator::cce_entry_iterator_reset
void cce_entry_iterator_reset(struct cce_entry_iterator *it)
cce_reference_iterator
Iterator over CCE references.
cce_entry_iterator::cce_entry_iterator_has_more
bool cce_entry_iterator_has_more(struct cce_entry_iterator *it)
cce_entry_iterator::cce_entry_iterator_free
void cce_entry_iterator_free(struct cce_entry_iterator *it)
cce_entry
Structure holding single CCE entry data.
Definition: cce_priv.h:47
cce_entry::cce_entry_get_params
struct oscap_string_iterator * cce_entry_get_params(const struct cce_entry *cce)
Get an iterator to CCE entry's parameters.
cce_entry::cce_entry_get_tech_mechs
struct oscap_string_iterator * cce_entry_get_tech_mechs(const struct cce_entry *cce)
Get an iterator to CCE entry's technical mechanisms.
cce_reference_iterator::cce_reference_iterator_reset
void cce_reference_iterator_reset(struct cce_reference_iterator *it)
cce_reference::cce_reference_get_value
const char * cce_reference_get_value(const struct cce_reference *ref)
Get contents of CCE reference.
cce::cce_supported
const char * cce_supported(void)
Get supported version of CCE XML.
Definition: cce.c:106
cce_validate
bool cce_validate(const char *filename)
Vlaidate CCE XML file.
Definition: cce.c:111
oscap_string_iterator
String iterator.
cce_entry_iterator::cce_entry_iterator_next
struct cce_entry * cce_entry_iterator_next(struct cce_entry_iterator *it)
cce_reference_iterator::cce_reference_iterator_has_more
bool cce_reference_iterator_has_more(struct cce_reference_iterator *it)