aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_save.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-01 17:51:29 +0100
committerMax Kellermann <max@duempel.org>2009-11-01 17:51:29 +0100
commit4b17aca7476dacfbd3b3220ff8013724f5eed0c9 (patch)
tree42af2d45d3345026a4eb929e792eca384b5c34c3 /src/song_save.h
parent63dda94a027d324fa3d0c9404a440e3f5e15cede (diff)
downloadmpd-4b17aca7476dacfbd3b3220ff8013724f5eed0c9.tar.gz
mpd-4b17aca7476dacfbd3b3220ff8013724f5eed0c9.tar.xz
mpd-4b17aca7476dacfbd3b3220ff8013724f5eed0c9.zip
song_save: load one song at a time
Changed songvec_load() to song_load(). Added start and end markers for each song. Removed the "key" line, it's redundant.
Diffstat (limited to '')
-rw-r--r--src/song_save.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/song_save.h b/src/song_save.h
index cd62c986d..70ddb249e 100644
--- a/src/song_save.h
+++ b/src/song_save.h
@@ -25,21 +25,23 @@
#include <stdbool.h>
#include <stdio.h>
+#define SONG_BEGIN "song_begin: "
+
struct songvec;
struct directory;
void songvec_save(FILE *fp, struct songvec *sv);
/**
- * Loads songs from the input file and add the to the specified
- * directory.
+ * Loads a song from the input file. Reading stops after the
+ * "song_end" line.
*
* @param error_r location to store the error occuring, or NULL to
* ignore errors
* @return true on success, false on error
*/
-bool
-songvec_load(FILE *file, struct songvec *sv, struct directory *parent,
- GString *buffer, GError **error_r);
+struct song *
+song_load(FILE *fp, struct directory *parent, const char *uri,
+ GString *buffer, GError **error_r);
#endif