PlaylistFile: reuse classes PlaylistInfo and PlaylistVector

.. instead of rolling own classes.
This commit is contained in:
Max Kellermann
2013-01-04 00:02:09 +01:00
parent 06be0a1997
commit 9d312ab208
6 changed files with 15 additions and 16 deletions

View File

@@ -20,6 +20,8 @@
#include "config.h"
#include "PlaylistFile.hxx"
#include "PlaylistSave.hxx"
#include "PlaylistInfo.hxx"
#include "PlaylistVector.hxx"
#include "DatabasePlugin.hxx"
#include "DatabaseGlue.hxx"
#include "song.h"
@@ -140,7 +142,7 @@ playlist_errno(GError **error_r)
}
static bool
LoadPlaylistFileInfo(PlaylistFileInfo &info,
LoadPlaylistFileInfo(PlaylistInfo &info,
const char *parent_path_fs, const char *name_fs)
{
size_t name_length = strlen(name_fs);
@@ -172,10 +174,10 @@ LoadPlaylistFileInfo(PlaylistFileInfo &info,
return true;
}
PlaylistFileList
PlaylistVector
ListPlaylistFiles(GError **error_r)
{
PlaylistFileList list;
PlaylistVector list;
const char *parent_path_fs = spl_map(error_r);
if (parent_path_fs == NULL)
@@ -187,7 +189,7 @@ ListPlaylistFiles(GError **error_r)
return list;
}
PlaylistFileInfo info;
PlaylistInfo info;
struct dirent *ent;
while ((ent = readdir(dir)) != NULL) {
if (LoadPlaylistFileInfo(info, parent_path_fs, ent->d_name))