mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
initial commit
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@3 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
b1c00dcd0a
commit
9cb0b933e2
47 changed files with 3425 additions and 0 deletions
28
src/idxset.h
Normal file
28
src/idxset.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef fooidxsethfoo
|
||||
#define fooidxsethfoo
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#define IDXSET_INVALID ((uint32_t) -1)
|
||||
|
||||
struct idxset;
|
||||
|
||||
struct idxset* idxset_new(unsigned (*hash_func) (void *p), int (*compare_func) (void*a, void*b));
|
||||
void idxset_free(struct idxset *s, void (*free_func) (void *p, void *userdata), void *userdata);
|
||||
|
||||
int idxset_put(struct idxset*s, void *p, uint32_t *index);
|
||||
|
||||
void* idxset_get_by_index(struct idxset*s, uint32_t index);
|
||||
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);
|
||||
|
||||
void* idxset_rrobin(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);
|
||||
int idxset_isempty(struct idxset *s);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue