aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_state.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-15 16:57:37 +0200
committerMax Kellermann <max@duempel.org>2009-07-15 16:57:37 +0200
commitf7cc5b2efddece7cdc4fc5b7fc5324d33b7dfa8f (patch)
treec3b528d0972f857c1d80f0d26eff3491b6929777 /src/playlist_state.h
parentdf7d7732c61deec0102950cb3d79b9bd114e73a9 (diff)
downloadmpd-f7cc5b2efddece7cdc4fc5b7fc5324d33b7dfa8f.tar.gz
mpd-f7cc5b2efddece7cdc4fc5b7fc5324d33b7dfa8f.tar.xz
mpd-f7cc5b2efddece7cdc4fc5b7fc5324d33b7dfa8f.zip
state_file: don't rewind the stream while reading the state file
Parse the state file line by line, let each subsystem probe a line. Only the playlist_state code gets the FILE pointer to read the following lines.
Diffstat (limited to '')
-rw-r--r--src/playlist_state.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/playlist_state.h b/src/playlist_state.h
index 989430264..7ed7e8c8e 100644
--- a/src/playlist_state.h
+++ b/src/playlist_state.h
@@ -25,6 +25,7 @@
#ifndef PLAYLIST_STATE_H
#define PLAYLIST_STATE_H
+#include <stdbool.h>
#include <stdio.h>
struct playlist;
@@ -32,7 +33,7 @@ struct playlist;
void
playlist_state_save(FILE *fp, const struct playlist *playlist);
-void
-playlist_state_restore(FILE *fp, struct playlist *playlist);
+bool
+playlist_state_restore(const char *line, FILE *fp, struct playlist *playlist);
#endif