2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2014-01-15 18:25:58 +01:00
|
|
|
|
|
|
|
#ifndef MPD_DATABASE_SONG_HXX
|
|
|
|
#define MPD_DATABASE_SONG_HXX
|
|
|
|
|
2014-02-07 00:29:07 +01:00
|
|
|
struct LightSong;
|
2014-02-01 01:11:50 +01:00
|
|
|
class Database;
|
2014-02-07 00:29:07 +01:00
|
|
|
class Storage;
|
2014-01-15 18:25:58 +01:00
|
|
|
class DetachedSong;
|
|
|
|
|
2014-02-07 00:29:07 +01:00
|
|
|
/**
|
|
|
|
* "Detach" the #Song object, i.e. convert it to a #DetachedSong
|
|
|
|
* instance.
|
|
|
|
*/
|
|
|
|
DetachedSong
|
2019-09-01 14:56:27 +02:00
|
|
|
DatabaseDetachSong(const Storage *storage, const LightSong &song) noexcept;
|
2014-02-07 00:29:07 +01:00
|
|
|
|
2014-01-15 18:25:58 +01:00
|
|
|
/**
|
|
|
|
* Look up a song in the database and convert it to a #DetachedSong
|
2017-02-08 09:58:20 +01:00
|
|
|
* instance.
|
2014-01-15 18:25:58 +01:00
|
|
|
*
|
2017-02-08 09:58:20 +01:00
|
|
|
* Throws std::runtime_error on error.
|
2014-01-15 18:25:58 +01:00
|
|
|
*/
|
2017-02-08 09:58:20 +01:00
|
|
|
DetachedSong
|
2017-02-08 09:47:43 +01:00
|
|
|
DatabaseDetachSong(const Database &db, const Storage *storage,
|
2016-03-19 00:13:57 +01:00
|
|
|
const char *uri);
|
2014-01-15 18:25:58 +01:00
|
|
|
|
|
|
|
#endif
|