client/Client: add interface IClient

This allows detangling dependencies and fixes a linker problem in
test/test_translate_song.cxx.
This commit is contained in:
Max Kellermann
2023-11-25 23:06:24 +01:00
parent 0dfd7e3d8c
commit a5d7f5e1fa
7 changed files with 89 additions and 62 deletions

View File

@@ -3,7 +3,8 @@
#include "SongLoader.hxx"
#include "LocateUri.hxx"
#include "client/Client.hxx"
#include "Partition.hxx"
#include "client/IClient.hxx"
#include "db/DatabaseSong.hxx"
#include "storage/StorageInterface.hxx"
#include "song/DetachedSong.hxx"
@@ -14,8 +15,9 @@
#ifdef ENABLE_DATABASE
SongLoader::SongLoader(const Client &_client) noexcept
:client(&_client), db(_client.GetDatabase()),
SongLoader::SongLoader(const IClient &_client) noexcept
:client(&_client),
db(_client.GetDatabase()),
storage(_client.GetStorage()) {}
#endif