2009-01-23 16:35:04 +01:00
|
|
|
/*
|
2021-01-01 19:54:25 +01:00
|
|
|
* Copyright 2003-2021 The Music Player Daemon Project
|
2009-01-23 16:35:04 +01:00
|
|
|
* http://www.musicpd.org
|
|
|
|
*
|
|
|
|
* 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.
|
2009-01-23 16:35:04 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This library saves the queue into the state file, and also loads it
|
|
|
|
* back into memory.
|
|
|
|
*/
|
|
|
|
|
2013-01-02 19:52:57 +01:00
|
|
|
#ifndef MPD_QUEUE_SAVE_HXX
|
|
|
|
#define MPD_QUEUE_SAVE_HXX
|
2009-01-23 16:35:04 +01:00
|
|
|
|
2014-01-20 08:57:22 +01:00
|
|
|
struct Queue;
|
2014-07-30 20:58:14 +02:00
|
|
|
class BufferedOutputStream;
|
2013-01-03 10:16:05 +01:00
|
|
|
class TextFile;
|
2014-02-03 22:25:54 +01:00
|
|
|
class SongLoader;
|
2009-01-23 16:35:04 +01:00
|
|
|
|
|
|
|
void
|
2014-07-30 20:58:14 +02:00
|
|
|
queue_save(BufferedOutputStream &os, const Queue &queue);
|
2009-01-23 16:35:04 +01:00
|
|
|
|
|
|
|
/**
|
2010-07-25 12:43:05 +02:00
|
|
|
* Loads one song from the state file and appends it to the queue.
|
2019-09-05 20:55:18 +02:00
|
|
|
*
|
|
|
|
* Throws on error.
|
2009-01-23 16:35:04 +01:00
|
|
|
*/
|
2010-07-25 12:43:05 +02:00
|
|
|
void
|
2014-02-03 22:25:54 +01:00
|
|
|
queue_load_song(TextFile &file, const SongLoader &loader,
|
|
|
|
const char *line, Queue &queue);
|
2009-01-23 16:35:04 +01:00
|
|
|
|
|
|
|
#endif
|