Open SCAP Library
Loading...
Searching...
No Matches
err_queue.h
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 */
20
21#pragma once
22#ifndef _OSCAP_ERR_QUEUE_H
23#define _OSCAP_ERR_QUEUE_H
24
25#include "util.h"
26#include "_error.h"
27#include <stdbool.h>
28
29
35struct err_queue;
36
42struct err_queue *err_queue_new(void);
43
51bool err_queue_push(struct err_queue *q, struct oscap_err_t *error);
52
59bool err_queue_is_empty(struct err_queue *q);
60
68struct oscap_err_t *err_queue_pop_first(struct err_queue *q);
69
77const struct oscap_err_t *err_queue_get_last(struct err_queue *q);
78
86void err_queue_free(struct err_queue *q, oscap_destruct_func destructor);
87
97int err_queue_to_string(struct err_queue *q, char **result);
98
99
100#endif
Definition err_queue.c:30
struct err_queue * err_queue_new(void)
Initialize new error_queue.
Definition err_queue.c:35
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
Definition _error.h:40