mpd/src/archive/ArchiveFile.hxx

33 lines
651 B
C++
Raw Normal View History

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
2008-12-16 21:42:34 +01:00
2013-01-29 23:26:51 +01:00
#ifndef MPD_ARCHIVE_FILE_HXX
#define MPD_ARCHIVE_FILE_HXX
2008-12-16 21:42:34 +01:00
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
2013-11-28 11:50:54 +01:00
class ArchiveVisitor;
2013-01-29 23:26:51 +01:00
class ArchiveFile {
public:
virtual ~ArchiveFile() noexcept = default;
/**
* Visit all entries inside this archive.
*/
virtual void Visit(ArchiveVisitor &visitor) = 0;
/**
* Opens an InputStream of a file within the archive.
*
* Throws std::runtime_error on error.
*
* @param path the path within the archive
*/
virtual InputStreamPtr OpenStream(const char *path,
Mutex &mutex) = 0;
2013-01-29 23:26:51 +01:00
};
2008-12-16 21:42:34 +01:00
#endif