![]() |
![]() |
![]() |
PolicyKit Library Reference Manual | ![]() |
---|---|---|---|---|
KitList; kit_bool_t (*KitListForeachFunc) (KitList *list, void *data, void *user_data); KitList* kit_list_append (KitList *list, void *data); KitList* kit_list_prepend (KitList *list, void *data); void kit_list_free (KitList *list); KitList* kit_list_delete_link (KitList *list, KitList *link); size_t kit_list_length (KitList *list); kit_bool_t kit_list_foreach (KitList *list, KitListForeachFunc func, void *user_data);
typedef struct { void *data; KitList *next; KitList *prev; } KitList;
Public members of the KitList data structure
void * |
the value passed in kit_list_append() and kit_list_prepend()
|
KitList * |
the next element in the list or NULL if this is the last element |
KitList * |
the previous element in the list or NULL if this is the last element |
kit_bool_t (*KitListForeachFunc) (KitList *list, void *data, void *user_data);
Type signature for callback function used in kit_list_foreach()
.
|
the list |
|
data of link entry |
|
user data passed to kit_list_foreach()
|
Returns : |
Return TRUE to short-circuit, e.g. stop the iteration. |
KitList* kit_list_prepend (KitList *list, void *data);
Prepend an entry to a list.
KitList* kit_list_delete_link (KitList *list, KitList *link);
Delete a link from a list.
size_t kit_list_length (KitList *list);
Compute the length of a list.
|
the list |
Returns : |
Number of entries in list |
kit_bool_t kit_list_foreach (KitList *list, KitListForeachFunc func, void *user_data);
Iterate over all entries in a list.
|
the list |
|
callback function |
|
user data to pass to callback |
Returns : |
TRUE only if the callback short-circuited the iteration |