err_queue.h
/*
* Copyright 2013 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#pragma once
#ifndef _OSCAP_ERR_QUEUE_H
#define _OSCAP_ERR_QUEUE_H
#include "util.h"
#include "_error.h"
#include <stdbool.h>
OSCAP_HIDDEN_START;
struct err_queue;
struct err_queue *err_queue_new(void);
bool err_queue_push(struct err_queue *q, struct oscap_err_t *error);
bool err_queue_is_empty(struct err_queue *q);
struct oscap_err_t *err_queue_pop_first(struct err_queue *q);
const struct oscap_err_t *err_queue_get_last(struct err_queue *q);
void err_queue_free(struct err_queue *q, oscap_destruct_func destructor);
int err_queue_to_string(struct err_queue *q, char **result);
OSCAP_HIDDEN_END;
#endif