Open SCAP Library

err_queue.h

00001 /*
00002  * Copyright 2013 Red Hat Inc., Durham, North Carolina.
00003  * All Rights Reserved.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *
00019  */
00020 
00021 #pragma once
00022 #ifndef _OSCAP_ERR_QUEUE_H
00023 #define _OSCAP_ERR_QUEUE_H
00024 
00025 #include "util.h"
00026 #include "_error.h"
00027 #include <stdbool.h>
00028 
00029 OSCAP_HIDDEN_START;
00030 
00036 struct err_queue;
00037 
00043 struct err_queue *err_queue_new(void);
00044 
00052 bool err_queue_push(struct err_queue *q, struct oscap_err_t *error);
00053 
00060 bool err_queue_is_empty(struct err_queue *q);
00061 
00069 struct oscap_err_t *err_queue_pop_first(struct err_queue *q);
00070 
00078 const struct oscap_err_t *err_queue_get_last(struct err_queue *q);
00079 
00087 void err_queue_free(struct err_queue *q, oscap_destruct_func destructor);
00088 
00098 int err_queue_to_string(struct err_queue *q, char **result);
00099 
00100 OSCAP_HIDDEN_END;
00101 
00102 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines