2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2009-01-23 16:35:04 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This library saves the queue into the state file, and also loads it
|
|
|
|
* back into memory.
|
|
|
|
*/
|
|
|
|
|
2022-02-14 06:08:11 +01:00
|
|
|
#pragma once
|
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;
|
2021-12-03 14:16:32 +01:00
|
|
|
class LineReader;
|
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
|
2021-12-03 14:16:32 +01:00
|
|
|
queue_load_song(LineReader &file, const SongLoader &loader,
|
2014-02-03 22:25:54 +01:00
|
|
|
const char *line, Queue &queue);
|