]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/idxset.h
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / idxset.h
index 039e4be133cc463d7f30f0b391a516ccc71c6889..53ac402810a7e7f2b8ac527a1bc8e213229b2f57 100644 (file)
@@ -49,6 +49,7 @@ int pa_idxset_string_compare_func(const void *a, const void *b);
 
 typedef unsigned (*pa_hash_func_t)(const void *p);
 typedef int (*pa_compare_func_t)(const void *a, const void *b);
+typedef void *(*pa_copy_func_t)(const void *p);
 
 typedef struct pa_idxset pa_idxset;
 
@@ -102,11 +103,13 @@ void *pa_idxset_next(pa_idxset *s, uint32_t *idx);
 /* Return the current number of entries in the idxset */
 unsigned pa_idxset_size(pa_idxset*s);
 
-/* Return TRUE of the idxset is empty */
-pa_bool_t pa_idxset_isempty(pa_idxset *s);
+/* Return true of the idxset is empty */
+bool pa_idxset_isempty(pa_idxset *s);
 
-/* Duplicate the idxset. This will not copy the actual indexes */
-pa_idxset *pa_idxset_copy(pa_idxset *s);
+/* Duplicate the idxset. This will not copy the actual indexes. If copy_func is
+ * set, each entry is copied using the provided function, otherwise a shallow
+ * copy will be made. */
+pa_idxset *pa_idxset_copy(pa_idxset *s, pa_copy_func_t copy_func);
 
 /* A macro to ease iteration through all entries */
 #define PA_IDXSET_FOREACH(e, s, idx) \