aboutsummaryrefslogtreecommitdiffstats
path: root/src/storedPlaylist.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-01 10:09:31 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-01 10:09:31 +0000
commit09936358fa8098444019fc2a470b1685af1a19de (patch)
tree8dbb397c7c6f5ad77ebc5becd3f5307889691af8 /src/storedPlaylist.h
parent390ed29740c4aa5caf41d659bf392b20aec4788f (diff)
downloadmpd-09936358fa8098444019fc2a470b1685af1a19de.tar.gz
mpd-09936358fa8098444019fc2a470b1685af1a19de.tar.xz
mpd-09936358fa8098444019fc2a470b1685af1a19de.zip
storedPlaylist: cleanup API and avoid needless heap allocations + error checks
git-svn-id: https://svn.musicpd.org/mpd/trunk@7119 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/storedPlaylist.h')
-rw-r--r--src/storedPlaylist.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/storedPlaylist.h b/src/storedPlaylist.h
index 1c30e814a..698e5bb2d 100644
--- a/src/storedPlaylist.h
+++ b/src/storedPlaylist.h
@@ -22,26 +22,22 @@
#include "song.h"
#include "list.h"
#include "playlist.h"
+#include "path.h"
typedef struct _storedPlaylist {
List *list;
- unsigned int length;
- char *fspath;
+ char fs_path[MPD_PATH_MAX];
int fd;
} StoredPlaylist;
-StoredPlaylist *newStoredPlaylist(const char *filename, int fd, int ignoreExisting);
-StoredPlaylist *loadStoredPlaylist(const char *utf8path, int fd);
+int loadStoredPlaylist(int fd, StoredPlaylist *sp, const char *utf8path);
void freeStoredPlaylist(StoredPlaylist *sp);
int moveSongInStoredPlaylistByPath(int fd, const char *utf8path, int src, int dest);
int removeAllFromStoredPlaylistByPath(int fd, const char *utf8path);
int removeOneSongFromStoredPlaylistByPath(int fd, const char *utf8path, int pos);
-int writeStoredPlaylist(StoredPlaylist *sp);
-
int appendSongToStoredPlaylistByPath(int fd, const char *utf8path, Song *song);
-void appendPlaylistToStoredPlaylist(StoredPlaylist *sp, Playlist *playlist);
int renameStoredPlaylist(int fd, const char *utf8from, const char *utf8to);