diff options
author | Max Kellermann <max@duempel.org> | 2013-01-29 23:36:58 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-30 15:30:19 +0100 |
commit | 16afdfd8747a1bd5af2d1acb4e0845bf9d0b89e7 (patch) | |
tree | 39afbcabd53af0000a8b200301bbfc1178fdadd5 /src/ArchiveFile.hxx | |
parent | 701fff03d27be629f416534744217eadbde11da4 (diff) | |
download | mpd-16afdfd8747a1bd5af2d1acb4e0845bf9d0b89e7.tar.gz mpd-16afdfd8747a1bd5af2d1acb4e0845bf9d0b89e7.tar.xz mpd-16afdfd8747a1bd5af2d1acb4e0845bf9d0b89e7.zip |
ArchivePlugin: move instance methods to class ArchiveFile
Diffstat (limited to 'src/ArchiveFile.hxx')
-rw-r--r-- | src/ArchiveFile.hxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ArchiveFile.hxx b/src/ArchiveFile.hxx index 52e5a4910..c7933ebd1 100644 --- a/src/ArchiveFile.hxx +++ b/src/ArchiveFile.hxx @@ -26,6 +26,31 @@ public: ArchiveFile(const struct archive_plugin &_plugin) :plugin(_plugin) {} + +protected: + /** + * Use Close() instead of delete. + */ + ~ArchiveFile() {} + +public: + virtual void Close() = 0; + + /** + * Visit all entries inside this archive. + */ + virtual void Visit(ArchiveVisitor &visitor) = 0; + + /** + * Opens an input_stream of a file within the archive. + * + * @param path the path within the archive + * @param error_r location to store the error occurring, or + * NULL to ignore errors + */ + virtual input_stream *OpenStream(const char *path, + Mutex &mutex, Cond &cond, + GError **error_r) = 0; }; #endif |