2008-10-31 09:19:53 +01:00
|
|
|
#ifndef MPD_SONGVEC_H
|
|
|
|
#define MPD_SONGVEC_H
|
2008-09-23 20:48:39 +02:00
|
|
|
|
2008-10-08 10:49:29 +02:00
|
|
|
#include <stddef.h>
|
2008-09-23 20:48:39 +02:00
|
|
|
|
|
|
|
struct songvec {
|
2008-10-08 10:49:11 +02:00
|
|
|
struct song **base;
|
2008-09-23 20:48:39 +02:00
|
|
|
size_t nr;
|
|
|
|
};
|
|
|
|
|
2008-12-28 21:02:42 +01:00
|
|
|
void songvec_init(void);
|
|
|
|
|
|
|
|
void songvec_deinit(void);
|
|
|
|
|
2008-09-23 20:48:39 +02:00
|
|
|
void songvec_sort(struct songvec *sv);
|
|
|
|
|
2008-10-08 10:49:11 +02:00
|
|
|
struct song *
|
2008-10-07 22:09:55 +02:00
|
|
|
songvec_find(const struct songvec *sv, const char *url);
|
2008-09-23 20:48:39 +02:00
|
|
|
|
2008-10-08 10:49:11 +02:00
|
|
|
int
|
|
|
|
songvec_delete(struct songvec *sv, const struct song *del);
|
2008-09-23 20:48:39 +02:00
|
|
|
|
2008-10-08 10:49:11 +02:00
|
|
|
void
|
|
|
|
songvec_add(struct songvec *sv, struct song *add);
|
2008-09-23 20:48:39 +02:00
|
|
|
|
2008-09-29 12:17:13 +02:00
|
|
|
void songvec_destroy(struct songvec *sv);
|
2008-09-23 20:48:39 +02:00
|
|
|
|
2008-10-07 22:09:55 +02:00
|
|
|
int
|
|
|
|
songvec_for_each(const struct songvec *sv,
|
2008-10-08 10:49:11 +02:00
|
|
|
int (*fn)(struct song *, void *), void *arg);
|
2008-10-07 22:07:29 +02:00
|
|
|
|
2008-09-23 20:48:39 +02:00
|
|
|
#endif /* SONGVEC_H */
|