2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2017-12-30 18:00:40 +01:00
|
|
|
|
|
|
|
#ifndef MPD_MUSIC_CHUNK_PTR_HXX
|
|
|
|
#define MPD_MUSIC_CHUNK_PTR_HXX
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
struct MusicChunk;
|
|
|
|
class MusicBuffer;
|
|
|
|
|
|
|
|
class MusicChunkDeleter {
|
|
|
|
MusicBuffer *buffer;
|
|
|
|
|
|
|
|
public:
|
|
|
|
MusicChunkDeleter() = default;
|
|
|
|
explicit MusicChunkDeleter(MusicBuffer &_buffer):buffer(&_buffer) {}
|
|
|
|
|
|
|
|
void operator()(MusicChunk *chunk) noexcept;
|
|
|
|
};
|
|
|
|
|
|
|
|
using MusicChunkPtr = std::unique_ptr<MusicChunk, MusicChunkDeleter>;
|
|
|
|
|
|
|
|
#endif
|