FreeRDP
|
#include <freerdp/api.h>
Data Structures | |
struct | LIST_ITEM |
struct | LIST |
Defines | |
#define | list_add(_l, _d) list_enqueue(_l, _d) |
Functions | |
FREERDP_API LIST * | list_new (void) |
FREERDP_API void | list_free (LIST *list) |
FREERDP_API void | list_enqueue (LIST *list, void *data) |
FREERDP_API void * | list_dequeue (LIST *list) |
FREERDP_API void * | list_peek (LIST *list) |
FREERDP_API void * | list_next (LIST *list, void *data) |
FREERDP_API void * | list_remove (LIST *list, void *data) |
FREERDP_API int | list_size (LIST *list) |
#define list_add | ( | _l, | |
_d | |||
) | list_enqueue(_l, _d) |
FREERDP_API void* list_dequeue | ( | LIST * | list | ) |
Removes the first element of a list, and returns a pointer to it. The list-specific resources associated to this element are freed in the process.
list | - pointer to a valid LIST structure |
FREERDP_API void list_enqueue | ( | LIST * | list, |
void * | data | ||
) |
Add an element at the end of an existing list.
list | - pointer to the LIST that will contain the new element |
data | - pointer to the buffer that will be added to the list |
FREERDP_API void list_free | ( | LIST * | list | ) |
Deallocates a LIST structure. All elements of the list will be removed (but not deallocated). Only the list-specific resources are freed.
list | - pointer to the LIST that must be deallocated. |
FREERDP_API LIST* list_new | ( | void | ) |
Allocates a new LIST structure. The list_*() API implements a chainlist and allows to store data of arbitrary type in FIFO mode.
FREERDP_API void* list_next | ( | LIST * | list, |
void * | data | ||
) |
Searches for the data provided in parameter, and returns a pointer to the element next to it. If the item is not found, or if it is the last in the list, the function will return NULL.
list | - pointer to the list that must be searched. |
data | - pointer to the buffer that must be found. The comparison is done on the pointer value - not the buffer's content. |
FREERDP_API void* list_peek | ( | LIST * | list | ) |
Returns a pointer to the data from the first element of the list. The element itself is not removed from the list by this call.
list | - pointerto a valid LIST structure |
FREERDP_API void* list_remove | ( | LIST * | list, |
void * | data | ||
) |
Searches for the data provided in parameter, and removes it from the list if it is found.
list | - pointer to the list that must be searched. |
data | - pointer to the buffer that must be found. The comparison is done on the pointer value - not the buffer's content. |
FREERDP_API int list_size | ( | LIST * | list | ) |
Returns the current size of the list (number of elements). This number is kept up to date by the list_enqueue and list_dequeue functions.
list | - pointer to a valide LIST structure. |