diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-06-14 20:30:50 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-06-14 20:30:50 +0000 |
commit | 5ce204829fe6706a5edaec50769abf7eed266656 (patch) | |
tree | da0930ee55ce9e99ecd8be799395221e112d2e3b /src/idxset.h | |
parent | c8cf0c1ce9cf1b38b302ae4a2a6fa798fef85f08 (diff) |
more cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@11 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/idxset.h')
-rw-r--r-- | src/idxset.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/idxset.h b/src/idxset.h index f649e23e..fdcb7b54 100644 --- a/src/idxset.h +++ b/src/idxset.h @@ -18,8 +18,15 @@ void* idxset_get_by_data(struct idxset*s, void *p, uint32_t *index); void* idxset_remove_by_index(struct idxset*s, uint32_t index); void* idxset_remove_by_data(struct idxset*s, void *p, uint32_t *index); +/* This may be used to iterate through all entries. When called with + an invalid index value it returns the first entry, otherwise the + next following. The function is best called with *index = + IDXSET_VALID first. */ void* idxset_rrobin(struct idxset *s, uint32_t *index); +/* Return the oldest entry in the idxset */ +void* idxset_first(struct idxset *s, uint32_t *index); + int idxset_foreach(struct idxset*s, int (*func)(void *p, uint32_t index, int *del, void*userdata), void *userdata); unsigned idxset_ncontents(struct idxset*s); |