Open SCAP Library
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
err_queue Struct Reference
Collaboration diagram for err_queue:
[legend]

Public Member Functions

struct err_queueerr_queue_new (void)
 Initialize new error_queue.
 
bool err_queue_push (struct err_queue *q, struct oscap_err_t *error)
 Push the new error at the end of the error queue.
 
struct oscap_err_terr_queue_pop_first (struct err_queue *q)
 Pop the first object from the FIFO queue.
 
const struct oscap_err_terr_queue_get_last (struct err_queue *q)
 Return the last object from the FIFO queuqe.
 
void err_queue_free (struct err_queue *q, oscap_destruct_func destructor)
 Dispose given err_queue.
 
int err_queue_to_string (struct err_queue *q, char **result)
 Get all the errors in the queue as a single string.
 

Data Fields

struct oscap_err_tfirst
 
struct oscap_err_tlast
 

Member Function Documentation

◆ err_queue_free()

void err_queue_free ( struct err_queue * q,
oscap_destruct_func destructor )

Dispose given err_queue.

Dispose also stored messages if destructor is supplied.

Parameters
qInternal Error Queue
destructora function to dipose messages in the queue

◆ err_queue_get_last()

const struct oscap_err_t * err_queue_get_last ( struct err_queue * q)

Return the last object from the FIFO queuqe.

This object continues to be a property of err_queue and shall not be modified nor disposed.

Parameters
qInternal Error Queue
Returns
the last item in the queue or NULL

◆ err_queue_new()

struct err_queue * err_queue_new ( void )

Initialize new error_queue.

Returns
newly initialized error queue

◆ err_queue_pop_first()

struct oscap_err_t * err_queue_pop_first ( struct err_queue * q)

Pop the first object from the FIFO queue.

This new object is no longer tracked by err_queue and shall be disposed by caller.

Parameters
qInternal Error Queue
Returns
The first item in the queue or NULL.

◆ 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.

Parameters
qInternal Error Queue
errornew error to save in the queuei
Returns
true on success

◆ err_queue_to_string()

int err_queue_to_string ( struct err_queue * q,
char ** result )

Get all the errors in the queue as a single string.

Parameters
qInternal Error Queue
resultpointer, where to store the resulting string. Newly allocated mmory will be assigned with this. And shall be disposed by caller.
Returns
zero on success

The documentation for this struct was generated from the following files: