summaryrefslogtreecommitdiff
path: root/src/TagArchive.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-02-26 14:46:01 +0100
committerMax Kellermann <max@duempel.org>2016-02-26 14:46:01 +0100
commitae37e254526d707eb5bcdafe6c9846f6055b16a8 (patch)
tree88f5e6c3e8b090ae531613e20df24e8bea6e01d0 /src/TagArchive.cxx
parentc4537fe6f68aafcd71280e96cbb609b2d535661c (diff)
TagArchive: add overload with ArchiveFile&
Diffstat (limited to 'src/TagArchive.cxx')
-rw-r--r--src/TagArchive.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/TagArchive.cxx b/src/TagArchive.cxx
index 20a9c7a2e..935669025 100644
--- a/src/TagArchive.cxx
+++ b/src/TagArchive.cxx
@@ -23,6 +23,7 @@
#include "tag/Generic.hxx"
#include "tag/TagHandler.hxx"
#include "tag/TagBuilder.hxx"
+#include "archive/ArchiveFile.hxx"
#include "fs/Path.hxx"
#include "util/Error.hxx"
#include "input/InputStream.hxx"
@@ -57,3 +58,15 @@ tag_archive_scan(Path path, TagBuilder &builder)
IgnoreError()));
return is && tag_stream_scan(*is, builder);
}
+
+bool
+tag_archive_scan(ArchiveFile &archive, const char *path_utf8,
+ TagBuilder &builder)
+{
+ Mutex mutex;
+ Cond cond;
+
+ InputStreamPtr is(archive.OpenStream(path_utf8, mutex, cond,
+ IgnoreError()));
+ return is && tag_stream_scan(*is, builder);
+}