diff options
author | Max Kellermann <max@duempel.org> | 2009-07-14 21:28:26 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-07-14 21:28:26 +0200 |
commit | 5a886da93bdba9dcd1575cd8fb5fe05ec22824e6 (patch) | |
tree | 3c5bf8aa6a64cfb82bee7fb9cf66994bcb8380d0 | |
parent | 9206f549798ee68d1768f418405bbb8b041b71ee (diff) | |
download | mpd-5a886da93bdba9dcd1575cd8fb5fe05ec22824e6.tar.gz mpd-5a886da93bdba9dcd1575cd8fb5fe05ec22824e6.tar.xz mpd-5a886da93bdba9dcd1575cd8fb5fe05ec22824e6.zip |
playlist: removed {save,read}PlaylistState()
Those were only wrappers for playlist_state_{save,restore}(). Since
sf_callbacks has been removed, we can call the latter functions
directly.
-rw-r--r-- | src/playlist.h | 5 | ||||
-rw-r--r-- | src/playlist_global.c | 10 | ||||
-rw-r--r-- | src/state_file.c | 5 |
3 files changed, 3 insertions, 17 deletions
diff --git a/src/playlist.h b/src/playlist.h index 57b2450fa..28399e001 100644 --- a/src/playlist.h +++ b/src/playlist.h @@ -23,7 +23,6 @@ #include "queue.h" #include <stdbool.h> -#include <stdio.h> #define PLAYLIST_COMMENT '#' @@ -116,10 +115,6 @@ playlist_get_queue(const struct playlist *playlist) return &playlist->queue; } -void readPlaylistState(FILE *); - -void savePlaylistState(FILE *); - void clearPlaylist(struct playlist *playlist); #ifndef WIN32 diff --git a/src/playlist_global.c b/src/playlist_global.c index fa810bbc3..24a010a15 100644 --- a/src/playlist_global.c +++ b/src/playlist_global.c @@ -52,13 +52,3 @@ void finishPlaylist(void) { playlist_finish(&g_playlist); } - -void savePlaylistState(FILE *fp) -{ - playlist_state_save(fp, &g_playlist); -} - -void readPlaylistState(FILE *fp) -{ - playlist_state_restore(fp, &g_playlist); -} diff --git a/src/state_file.c b/src/state_file.c index 8080f80fc..ceb6ee6e6 100644 --- a/src/state_file.c +++ b/src/state_file.c @@ -20,6 +20,7 @@ #include "state_file.h" #include "output_state.h" #include "playlist.h" +#include "playlist_state.h" #include "volume.h" #include <glib.h> @@ -52,7 +53,7 @@ state_file_write(void) save_sw_volume_state(fp); saveAudioDevicesState(fp); - savePlaylistState(fp); + playlist_state_save(fp, &g_playlist); while(fclose(fp) && errno == EINTR) /* nothing */; } @@ -77,7 +78,7 @@ state_file_read(void) rewind(fp); readAudioDevicesState(fp); rewind(fp); - readPlaylistState(fp); + playlist_state_restore(fp, &g_playlist); while(fclose(fp) && errno == EINTR) /* nothing */; } |