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 "../common/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 00055 00060 struct cce_reference_iterator; 00062 struct cce_reference* cce_reference_iterator_next(struct cce_reference_iterator* it); 00064 bool cce_reference_iterator_has_more(struct cce_reference_iterator* it); 00066 void cce_reference_iterator_free(struct cce_reference_iterator* it); 00067 00072 struct cce_entry_iterator; 00074 struct cce_entry* cce_entry_iterator_next(struct cce_entry_iterator* it); 00076 bool cce_entry_iterator_has_more(struct cce_entry_iterator* it); 00078 void cce_entry_iterator_free(struct cce_entry_iterator* it); 00079 00080 00087 struct cce* cce_new(const char* fname); 00088 00095 void cce_free(struct cce *cce); 00096 00101 struct cce_entry_iterator* cce_get_entries(const struct cce* cce); 00102 00108 struct cce_entry* cce_get_entry(const struct cce* cce, const char* id); 00109 00116 bool cce_validate(const char *filename); 00117 00118 00123 const char* cce_entry_get_id(const struct cce_entry* cce); 00124 00129 const char* cce_entry_get_description(const struct cce_entry* cce); 00130 00135 struct oscap_string_iterator* cce_entry_get_params(const struct cce_entry* cce); 00136 00141 struct oscap_string_iterator* cce_entry_get_tech_mechs(const struct cce_entry* cce); 00142 00147 struct cce_reference_iterator* cce_entry_get_references(const struct cce_entry* cce); 00148 00149 00154 const char* cce_reference_get_source(const struct cce_reference* ref); 00155 00160 const char* cce_reference_get_value(const struct cce_reference* ref); 00161 00162 #endif