Debian Codegraph @

src/OVAL/results/oval_resultTestIterator.c

raw symbols SCIP
1 /*
2 * Copyright 2013 Red Hat Inc., Durham, North Carolina.
3 * All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 * Authors:
20 * Šimon Lukašík
21 *
22 *
23 *
24 * This module was created based on the need to maintain the existing API
25 * after an implementation detail was changed.
26 *
27 * There was a change of type of oval_result_system->tests which used to be
28 * a simple map. And now it is a map which refers to lists. That is based
29 * on the OVAL 5.10.1 specification which allows for a given test_id multiple
30 * result-test elements that are distinguished only by variable_instance
31 * attribute.
32 *
33 */
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38
39 #include "public/oval_results.h"
40 #include "results/oval_results_impl.h"
41 #include "adt/oval_smc_impl.h"
42 #include "adt/oval_smc_iterator_impl.h"
43
44
45 struct oval_result_test_iterator *oval_result_test_iterator_new(struct oval_smc *mapping)
46 {
47 return (struct oval_result_test_iterator *) oval_smc_iterator_new(mapping);
48 }
49
50 void oval_result_test_iterator_free(struct oval_result_test_iterator *it)
51 {
52 oval_smc_iterator_free((struct oval_smc_iterator *) it);
53 }
54
55 bool oval_result_test_iterator_has_more(struct oval_result_test_iterator *it)
56 {
57 return oval_smc_iterator_has_more((struct oval_smc_iterator *) it);
58 }
59
60 struct oval_result_test *oval_result_test_iterator_next(struct oval_result_test_iterator *it)
61 {
62 return (struct oval_result_test *) oval_smc_iterator_next((struct oval_smc_iterator *) it);
63 }