Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
93 
99 
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 /************************************************************/
141 
147 struct cce_entry_iterator;
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
Structure holding a CCE reference.
Definition: cce_priv.h:55
const char * cce_entry_get_id(const struct cce_entry *cce)
Get CCE entry ID.
struct cce_reference_iterator * cce_entry_get_references(const struct cce_entry *cce)
Get an iterator to CCE entry&#39;s references.
General OpenScap functions and types.
Structure holding CCE entries.
Definition: cce_priv.h:42
void cce_reference_iterator_free(struct cce_reference_iterator *it)
struct cce_entry * cce_get_entry(const struct cce *cce, const char *id)
Get an CCE entry by ID.
struct cce_reference * cce_reference_iterator_next(struct cce_reference_iterator *it)
Iterator over CCE entries.
void cce_free(struct cce *cce)
CCE structure destructor.
Definition: cce.c:53
const char * cce_reference_get_source(const struct cce_reference *ref)
Get source of CCE reference.
struct cce_entry_iterator * cce_get_entries(const struct cce *cce)
Get an iterator to the contents of the CCE.
const char * cce_entry_get_description(const struct cce_entry *cce)
Get CCE entry desription.
struct cce * cce_new(const char *fname)
Create a new CCE structure from XML file.
Definition: cce.c:99
void cce_entry_iterator_reset(struct cce_entry_iterator *it)
Iterator over CCE references.
bool cce_entry_iterator_has_more(struct cce_entry_iterator *it)
void cce_entry_iterator_free(struct cce_entry_iterator *it)
Structure holding single CCE entry data.
Definition: cce_priv.h:47
struct oscap_string_iterator * cce_entry_get_params(const struct cce_entry *cce)
Get an iterator to CCE entry&#39;s parameters.
struct oscap_string_iterator * cce_entry_get_tech_mechs(const struct cce_entry *cce)
Get an iterator to CCE entry&#39;s technical mechanisms.
void cce_reference_iterator_reset(struct cce_reference_iterator *it)
const char * cce_reference_get_value(const struct cce_reference *ref)
Get contents of CCE reference.
const char * cce_supported(void)
Get supported version of CCE XML.
Definition: cce.c:106
bool cce_validate(const char *filename)
Vlaidate CCE XML file.
Definition: cce.c:111
String iterator.
struct cce_entry * cce_entry_iterator_next(struct cce_entry_iterator *it)
bool cce_reference_iterator_has_more(struct cce_reference_iterator *it)