2009-03-13 18:43:16 +01:00
|
|
|
/*
|
2021-01-01 19:54:25 +01:00
|
|
|
* Copyright 2003-2021 The Music Player Daemon Project
|
2009-03-13 18:43:16 +01:00
|
|
|
* http://www.musicpd.org
|
2008-09-07 13:35:01 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
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;
|
2013-01-03 10:16:05 +01:00
|
|
|
class TextFile;
|
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
|
2018-07-06 13:22:17 +02:00
|
|
|
song_load(TextFile &file, const char *uri,
|
2021-02-18 21:59:47 +01:00
|
|
|
std::string *target_r=nullptr);
|
2008-09-07 13:35:01 +02:00
|
|
|
|
|
|
|
#endif
|