aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistFile.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/PlaylistFile.hxx (renamed from src/stored_playlist.h)36
1 files changed, 21 insertions, 15 deletions
diff --git a/src/stored_playlist.h b/src/PlaylistFile.hxx
index cfe49633c..b20f0d762 100644
--- a/src/stored_playlist.h
+++ b/src/PlaylistFile.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2011 The Music Player Daemon Project
+ * Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -17,8 +17,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef MPD_STORED_PLAYLIST_H
-#define MPD_STORED_PLAYLIST_H
+#ifndef MPD_PLAYLIST_FILE_HXX
+#define MPD_PLAYLIST_FILE_HXX
+
+#include <list>
+#include <vector>
+#include <string>
#include <glib.h>
#include <stdbool.h>
@@ -26,12 +30,16 @@
struct song;
-struct stored_playlist_info {
- char *name;
+struct PlaylistFileInfo {
+ std::string name;
time_t mtime;
};
+typedef std::list<PlaylistFileInfo> PlaylistFileList;
+
+typedef std::vector<std::string> PlaylistFileContents;
+
extern bool playlist_saveAbsolutePaths;
/**
@@ -40,6 +48,8 @@ extern bool playlist_saveAbsolutePaths;
void
spl_global_init(void);
+#ifdef __cplusplus
+
/**
* Determines whether the specified string is a valid name for a
* stored playlist.
@@ -51,17 +61,11 @@ spl_valid_name(const char *name_utf8);
* Returns a list of stored_playlist_info struct pointers. Returns
* NULL if an error occurred.
*/
-GPtrArray *
-spl_list(GError **error_r);
-
-void
-spl_list_free(GPtrArray *list);
-
-GPtrArray *
-spl_load(const char *utf8path, GError **error_r);
+PlaylistFileList
+ListPlaylistFiles(GError **error_r);
-void
-spl_free(GPtrArray *list);
+PlaylistFileContents
+LoadPlaylistFile(const char *utf8path, GError **error_r);
bool
spl_move_index(const char *utf8path, unsigned src, unsigned dest,
@@ -86,3 +90,5 @@ bool
spl_rename(const char *utf8from, const char *utf8to, GError **error_r);
#endif
+
+#endif