LightSong: new class to be used by DatabasePlugin callbacks

Detach the Song class completely from the public API, only to be used
by SimpleDatabase and the update thread.
This commit is contained in:
Max Kellermann
2014-01-19 10:51:34 +01:00
parent 738d6f1040
commit f5ae1ce00b
44 changed files with 387 additions and 238 deletions

View File

@@ -30,12 +30,14 @@
#include "DatabasePlugin.hxx"
#include "Client.hxx"
#include "InputStream.hxx"
#include "Song.hxx"
#include "DetachedSong.hxx"
#include "fs/Traits.hxx"
#include "util/Error.hxx"
#include "thread/Cond.hxx"
#define SONG_FILE "file: "
#define SONG_TIME "Time: "
void
playlist_print_uris(Client &client, const playlist &playlist)
{
@@ -118,7 +120,7 @@ PrintSongDetails(Client &client, const char *uri_utf8)
if (db == nullptr)
return false;
Song *song = db->GetSong(uri_utf8, IgnoreError());
auto *song = db->GetSong(uri_utf8, IgnoreError());
if (song == nullptr)
return false;