stored_playlist: added spl_list()

spl_list() provides an interface for enumerating all stored playlists.
This separates the internal playlist logic from the protocol specific
function lsPlaylists().
This commit is contained in:
Max Kellermann
2008-10-22 19:15:50 +02:00
parent 3a164ef8e6
commit a65e20b50e
3 changed files with 108 additions and 75 deletions

View File

@@ -22,8 +22,26 @@
#include "list.h"
#include "playlist.h"
#include <glib.h>
struct song;
struct stored_playlist_info {
char *name;
time_t mtime;
};
/**
* Returns a list of stored_playlist_info struct pointers. Returns
* NULL if an error occured.
*/
GPtrArray *
spl_list(void);
void
spl_list_free(GPtrArray *list);
List *
spl_load(const char *utf8path);