Commit cdcd3e77 authored by Max Kellermann's avatar Max Kellermann

TagArchive: refactor TagHandler overload to use ArchiveFile

parent ed5058a3
......@@ -27,19 +27,18 @@
#include "fs/Path.hxx"
#include "util/Error.hxx"
#include "input/InputStream.hxx"
#include "input/plugins/ArchiveInputPlugin.hxx"
#include "thread/Cond.hxx"
#include <assert.h>
bool
tag_archive_scan(Path path, const TagHandler &handler, void *handler_ctx)
tag_archive_scan(ArchiveFile &archive, const char *path_utf8,
const TagHandler &handler, void *handler_ctx)
{
assert(!path.IsNull());
Mutex mutex;
Cond cond;
InputStreamPtr is(OpenArchiveInputStream(path, mutex, cond,
InputStreamPtr is(archive.OpenStream(path_utf8, mutex, cond,
IgnoreError()));
if (!is)
return false;
......
......@@ -23,7 +23,6 @@
#include "check.h"
class ArchiveFile;
class Path;
struct TagHandler;
class TagBuilder;
......@@ -36,7 +35,8 @@ class TagBuilder;
* found)
*/
bool
tag_archive_scan(Path path, const TagHandler &handler, void *handler_ctx);
tag_archive_scan(ArchiveFile &archive, const char *path_utf8,
const TagHandler &handler, void *handler_ctx);
/**
* Scan the tags of a song file inside an archive. Invokes matching
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment