EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the definition of the string queue utilities. More...
Go to the source code of this file.
Data Structures | |
struct | string_queue |
String queue structure definition. More... | |
Functions | |
struct string_queue * | init_string_queue (ssize_t max_length) |
Initialises and empty string queue. More... | |
int | push_string_queue (struct string_queue *queue, const char *str) |
Pushes a string in the string queue. More... | |
int | pop_string_queue (struct string_queue *queue, char **str) |
Extract the first string from the string queueu. More... | |
int | peek_string_queue (const struct string_queue *queue, char **str) |
Peek the first string from the string queueu. More... | |
void | empty_string_queue (struct string_queue *queue, ssize_t count) |
Empty a string entry. More... | |
void | free_string_queue_el (struct string_queue *el) |
Delete a string entry. More... | |
ssize_t | get_string_queue_length (const struct string_queue *queue) |
Returns the string queue length. More... | |
void | free_string_queue (struct string_queue *queue) |
Frees the string queue. More... | |
__must_free char * | concat_string_queue (const struct string_queue *queue, ssize_t count) |
Concat the first count string in the queue. More... | |
File containing the definition of the string queue utilities.
__must_free char* concat_string_queue | ( | const struct string_queue * | queue, |
ssize_t | count | ||
) |
Concat the first count string in the queue.
[in] | queue | The pointer to the string queue |
count | Number of queue strings to concat, if -1 concat the entire queue |
void empty_string_queue | ( | struct string_queue * | queue, |
ssize_t | count | ||
) |
Empty a string entry.
[in,out] | queue | The string queue |
count | Number of elements to remove, -1 for all |
void free_string_queue | ( | struct string_queue * | queue | ) |
Frees the string queue.
[in] | queue | The pointer to the string queue |
void free_string_queue_el | ( | struct string_queue * | el | ) |
Delete a string entry.
[in] | el | The string queue entry |
ssize_t get_string_queue_length | ( | const struct string_queue * | queue | ) |
Returns the string queue length.
queue | The pointer to the string queue |
struct string_queue* init_string_queue | ( | ssize_t | max_length | ) |
Initialises and empty string queue.
max_length | Maximum queue size, -1 for unlimited |
int peek_string_queue | ( | const struct string_queue * | queue, |
char ** | str | ||
) |
Peek the first string from the string queueu.
[in] | queue | The string queue |
[out] | str | The returned string. Please free() this variable when done with it. |
int pop_string_queue | ( | struct string_queue * | queue, |
char ** | str | ||
) |
Extract the first string from the string queueu.
[in,out] | queue | The string queue |
[out] | str | The returned string. Please free() this variable when done with it. |
int push_string_queue | ( | struct string_queue * | queue, |
const char * | str | ||
) |
Pushes a string in the string queue.
[in,out] | queue | The string queue |
[in] | str | The string value |