00001 /* 00002 * Copyright 2013 Red Hat Inc., Durham, North Carolina. 00003 * All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 * 00019 * Authors: 00020 * Šimon Lukašík 00021 * 00022 * 00023 * 00024 * This module implements a simple iterator iterating through SMC structure. 00025 * That is StringMap that points to the oval_collection objects. 00026 * 00027 * This module implements only sub set of iterator functionality for iterating 00028 * through map/list structure. Limits: It supposes that list (slave_col) is 00029 * never empty. 00030 */ 00031 00032 #ifndef OVAL_SMC_ITERATOR_H 00033 #define OVAL_SMC_ITERATOR_H 00034 00035 #include <stdbool.h> 00036 #include "oval_smc_impl.h" 00037 #include "common/util.h" 00038 00039 OSCAP_HIDDEN_START; 00040 00041 struct oval_smc_iterator; 00042 00043 struct oval_smc_iterator *oval_smc_iterator_new(struct oval_smc *mapping); 00044 00045 void oval_smc_iterator_free(struct oval_smc_iterator *it); 00046 00047 bool oval_smc_iterator_has_more(struct oval_smc_iterator *it); 00048 00049 void *oval_smc_iterator_next(struct oval_smc_iterator *it); 00050 00051 OSCAP_HIDDEN_END; 00052 00053 #endif