00001 00011 /* 00012 * Copyright 2008 Red Hat Inc., Durham, North Carolina. 00013 * All Rights Reserved. 00014 * 00015 * This library is free software; you can redistribute it and/or 00016 * modify it under the terms of the GNU Lesser General Public 00017 * License as published by the Free Software Foundation; either 00018 * version 2.1 of the License, or (at your option) any later version. 00019 * 00020 * This library is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00023 * Lesser General Public License for more details. 00024 * 00025 * You should have received a copy of the GNU Lesser General Public 00026 * License along with this library; if not, write to the Free Software 00027 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00028 * 00029 * Authors: 00030 * Lukas Kuklinek <lkuklinek@redhat.com> 00031 * Riley C. Porter <Riley.Porter@g2-inc.com> 00032 */ 00033 00034 #include <stdbool.h> 00035 #include "oscap.h" 00036 00037 #ifndef _CCE_H 00038 #define _CCE_H 00039 00043 struct cce; 00044 00048 struct cce_entry; 00049 00053 struct cce_reference; 00054 00059 struct cce_reference_iterator; 00061 struct cce_reference *cce_reference_iterator_next(struct cce_reference_iterator *it); 00063 bool cce_reference_iterator_has_more(struct cce_reference_iterator *it); 00065 void cce_reference_iterator_free(struct cce_reference_iterator *it); 00066 00071 struct cce_entry_iterator; 00073 struct cce_entry *cce_entry_iterator_next(struct cce_entry_iterator *it); 00075 bool cce_entry_iterator_has_more(struct cce_entry_iterator *it); 00077 void cce_entry_iterator_free(struct cce_entry_iterator *it); 00078 00085 struct cce *cce_new(const char *fname); 00086 00093 void cce_free(struct cce *cce); 00094 00099 struct cce_entry_iterator *cce_get_entries(const struct cce *cce); 00100 00106 struct cce_entry *cce_get_entry(const struct cce *cce, const char *id); 00107 00114 bool cce_validate(const char *filename); 00115 00120 const char *cce_entry_get_id(const struct cce_entry *cce); 00121 00126 const char *cce_entry_get_description(const struct cce_entry *cce); 00127 00132 struct oscap_string_iterator *cce_entry_get_params(const struct cce_entry *cce); 00133 00138 struct oscap_string_iterator *cce_entry_get_tech_mechs(const struct cce_entry *cce); 00139 00144 struct cce_reference_iterator *cce_entry_get_references(const struct cce_entry *cce); 00145 00150 const char *cce_reference_get_source(const struct cce_reference *ref); 00151 00156 const char *cce_reference_get_value(const struct cce_reference *ref); 00157 00158 #endif