songvec.h 517 Bytes
Newer Older
1 2
#ifndef MPD_SONGVEC_H
#define MPD_SONGVEC_H
3

4
#include <stddef.h>
5 6

struct songvec {
7
	struct song **base;
8 9 10 11 12
	size_t nr;
};

void songvec_sort(struct songvec *sv);

13
struct song *
14
songvec_find(const struct songvec *sv, const char *url);
15

16 17
int
songvec_delete(struct songvec *sv, const struct song *del);
18

19 20
void
songvec_add(struct songvec *sv, struct song *add);
21

22
void songvec_destroy(struct songvec *sv);
23

24 25
int
songvec_for_each(const struct songvec *sv,
26
		 int (*fn)(struct song *, void *), void *arg);
27

28
#endif /* SONGVEC_H */