diff options
Diffstat (limited to 'src/playlist_state.h')
-rw-r--r-- | src/playlist_state.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/playlist_state.h b/src/playlist_state.h index 989430264..8ca3657f2 100644 --- a/src/playlist_state.h +++ b/src/playlist_state.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2009 The Music Player Daemon Project + * Copyright (C) 2003-2010 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -25,6 +25,8 @@ #ifndef PLAYLIST_STATE_H #define PLAYLIST_STATE_H +#include <glib.h> +#include <stdbool.h> #include <stdio.h> struct playlist; @@ -32,7 +34,17 @@ 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, GString *buffer, + struct playlist *playlist); + +/** + * Generates a hash number for the current state of the playlist and + * the playback options. This is used by timer_save_state_file() to + * determine whether the state has changed and the state file should + * be saved. + */ +unsigned +playlist_state_get_hash(const struct playlist *playlist); #endif |