Blame src/OVAL/results/oval_resultDefinitionIterator.c

Packit 517ee8
/*
Packit 517ee8
 * Copyright 2013 Red Hat Inc., Durham, North Carolina.
Packit 517ee8
 * All Rights Reserved.
Packit 517ee8
 *
Packit 517ee8
 * This library is free software; you can redistribute it and/or
Packit 517ee8
 * modify it under the terms of the GNU Lesser General Public
Packit 517ee8
 * License as published by the Free Software Foundation; either
Packit 517ee8
 * version 2.1 of the License, or (at your option) any later version.
Packit 517ee8
 *
Packit 517ee8
 * This library is distributed in the hope that it will be useful,
Packit 517ee8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 517ee8
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 517ee8
 * Lesser General Public License for more details.
Packit 517ee8
 *
Packit 517ee8
 * You should have received a copy of the GNU Lesser General Public
Packit 517ee8
 * License along with this library; if not, write to the Free Software
Packit 517ee8
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Packit 517ee8
 *
Packit 517ee8
 * Authors:
Packit 517ee8
 *      Šimon Lukašík
Packit 517ee8
 *
Packit 517ee8
 *
Packit 517ee8
 *
Packit 517ee8
 * This module was created based on the need to maintain the existing API
Packit 517ee8
 * after an implementation detail was changed.
Packit 517ee8
 *
Packit 517ee8
 * There was a change of type of oval_result_system->definition which used
Packit 517ee8
 * to be a simple map. And now it is map which refers to lists. That is based
Packit 517ee8
 * on the OVAL 5.10.1 specification which allows for a given definition_id
Packit 517ee8
 * multiple result definition elements that are distinguished only by
Packit 517ee8
 * variable_instance attribute.
Packit 517ee8
 *
Packit 517ee8
 */
Packit 517ee8
Packit 517ee8
#ifdef HAVE_CONFIG_H
Packit 517ee8
#include <config.h>
Packit 517ee8
#endif
Packit 517ee8
Packit 517ee8
#include "public/oval_results.h"
Packit 517ee8
#include "results/oval_results_impl.h"
Packit 517ee8
#include "adt/oval_smc_iterator_impl.h"
Packit 517ee8
#include "adt/oval_smc_impl.h"
Packit 517ee8
Packit 517ee8
struct oval_result_definition_iterator *oval_result_definition_iterator_new(struct oval_smc *mapping)
Packit 517ee8
{
Packit 517ee8
	return (struct oval_result_definition_iterator *) oval_smc_iterator_new(mapping);
Packit 517ee8
}
Packit 517ee8
Packit 517ee8
void oval_result_definition_iterator_free(struct oval_result_definition_iterator *it)
Packit 517ee8
{
Packit 517ee8
	oval_smc_iterator_free((struct oval_smc_iterator *) it);
Packit 517ee8
}
Packit 517ee8
Packit 517ee8
bool oval_result_definition_iterator_has_more(struct oval_result_definition_iterator *it)
Packit 517ee8
{
Packit 517ee8
	return oval_smc_iterator_has_more((struct oval_smc_iterator *) it);
Packit 517ee8
}
Packit 517ee8
Packit 517ee8
struct oval_result_definition *oval_result_definition_iterator_next(struct oval_result_definition_iterator *it)
Packit 517ee8
{
Packit 517ee8
	return (struct oval_result_definition *) oval_smc_iterator_next((struct oval_smc_iterator *) it);
Packit 517ee8
}