00001 00008 /* 00009 * Copyright 2008-2009 Red Hat Inc., Durham, North Carolina. 00010 * All Rights Reserved. 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License as published by the Free Software Foundation; either 00015 * version 2.1 of the License, or (at your option) any later version. 00016 * 00017 * This library is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 * Lesser General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 * Authors: 00027 * Lukas Kuklinek <lkuklinek@redhat.com> 00028 * Riley C. Porter <Riley.Porter@g2-inc.com> 00029 */ 00030 00031 #include <stdbool.h> 00032 #include "oscap.h" 00033 00034 #ifndef _CCE_H 00035 #define _CCE_H 00036 00041 struct cce; 00042 00047 struct cce_entry; 00048 00053 struct cce_reference; 00054 00055 /************************************************************/ 00067 struct cce_entry_iterator *cce_get_entries(const struct cce *cce); 00068 00074 struct cce_entry *cce_get_entry(const struct cce *cce, const char *id); 00075 00080 const char *cce_entry_get_id(const struct cce_entry *cce); 00081 00086 const char *cce_entry_get_description(const struct cce_entry *cce); 00087 00092 struct oscap_string_iterator *cce_entry_get_params(const struct cce_entry *cce); 00093 00098 struct oscap_string_iterator *cce_entry_get_tech_mechs(const struct cce_entry *cce); 00099 00104 struct cce_reference_iterator *cce_entry_get_references(const struct cce_entry *cce); 00105 00110 const char *cce_reference_get_source(const struct cce_reference *ref); 00111 00116 const char *cce_reference_get_value(const struct cce_reference *ref); 00117 00118 /************************************************************/ 00121 /************************************************************/ 00132 struct cce_reference_iterator; 00134 struct cce_reference *cce_reference_iterator_next(struct cce_reference_iterator *it); 00136 bool cce_reference_iterator_has_more(struct cce_reference_iterator *it); 00138 void cce_reference_iterator_free(struct cce_reference_iterator *it); 00139 00145 struct cce_entry_iterator; 00147 struct cce_entry *cce_entry_iterator_next(struct cce_entry_iterator *it); 00149 bool cce_entry_iterator_has_more(struct cce_entry_iterator *it); 00151 void cce_entry_iterator_free(struct cce_entry_iterator *it); 00152 00153 /************************************************************/ 00162 struct cce *cce_new(const char *fname); 00163 00170 void cce_free(struct cce *cce); 00171 00172 /************************************************************/ 00184 bool cce_validate(const char *filename); 00185 00191 const char * cce_supported(void); 00192 00193 /************************************************************/ 00198 #endif