2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2008-09-07 13:35:01 +02:00
|
|
|
|
2013-01-02 19:52:57 +01:00
|
|
|
#ifndef MPD_SONG_SAVE_HXX
|
|
|
|
#define MPD_SONG_SAVE_HXX
|
2008-09-07 13:35:01 +02:00
|
|
|
|
2017-11-26 12:18:31 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2009-11-01 17:51:29 +01:00
|
|
|
#define SONG_BEGIN "song_begin: "
|
|
|
|
|
2013-07-28 13:25:12 +02:00
|
|
|
struct Song;
|
2018-07-06 13:22:17 +02:00
|
|
|
struct AudioFormat;
|
2014-01-07 21:39:47 +01:00
|
|
|
class DetachedSong;
|
2014-07-30 20:58:14 +02:00
|
|
|
class BufferedOutputStream;
|
2021-12-03 14:16:32 +01:00
|
|
|
class LineReader;
|
2008-09-07 13:35:01 +02:00
|
|
|
|
2010-07-25 12:21:47 +02:00
|
|
|
void
|
2014-07-30 20:58:14 +02:00
|
|
|
song_save(BufferedOutputStream &os, const Song &song);
|
2010-07-25 12:21:47 +02:00
|
|
|
|
2014-01-07 21:39:47 +01:00
|
|
|
void
|
2014-07-30 20:58:14 +02:00
|
|
|
song_save(BufferedOutputStream &os, const DetachedSong &song);
|
2014-01-07 21:39:47 +01:00
|
|
|
|
2009-07-05 08:29:52 +02:00
|
|
|
/**
|
2009-11-01 17:51:29 +01:00
|
|
|
* Loads a song from the input file. Reading stops after the
|
|
|
|
* "song_end" line.
|
2009-07-05 08:29:52 +02:00
|
|
|
*
|
2019-09-05 20:49:42 +02:00
|
|
|
* Throws on error.
|
2009-07-05 08:29:52 +02:00
|
|
|
*/
|
2019-09-05 20:50:00 +02:00
|
|
|
DetachedSong
|
2021-12-03 14:16:32 +01:00
|
|
|
song_load(LineReader &file, const char *uri,
|
2023-04-11 18:04:37 +02:00
|
|
|
std::string *target_r=nullptr, bool *in_playlist_r=nullptr);
|
2008-09-07 13:35:01 +02:00
|
|
|
|
|
|
|
#endif
|