Loading...
Searching...
No Matches
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#pragma once
#ifndef _OSCAP_ERR_QUEUE_H
#define _OSCAP_ERR_QUEUE_H
#include "util.h"
#include "_error.h"
#include <stdbool.h>
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);
#endif
err_queue
Definition err_queue.c:30
err_queue::err_queue_new
struct err_queue * err_queue_new(void)
Initialize new error_queue.
Definition err_queue.c:35
err_queue::err_queue_push
bool err_queue_push(struct err_queue *q, struct oscap_err_t *error)
Push the new error at the end of the error queue.
Definition err_queue.c:40
oscap_err_t
Definition _error.h:40