TagArchive: refactor TagHandler overload to use ArchiveFile
This commit is contained in:
parent
ed5058a363
commit
cdcd3e77b3
@ -27,20 +27,19 @@
|
|||||||
#include "fs/Path.hxx"
|
#include "fs/Path.hxx"
|
||||||
#include "util/Error.hxx"
|
#include "util/Error.hxx"
|
||||||
#include "input/InputStream.hxx"
|
#include "input/InputStream.hxx"
|
||||||
#include "input/plugins/ArchiveInputPlugin.hxx"
|
|
||||||
#include "thread/Cond.hxx"
|
#include "thread/Cond.hxx"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
bool
|
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;
|
Mutex mutex;
|
||||||
Cond cond;
|
Cond cond;
|
||||||
InputStreamPtr is(OpenArchiveInputStream(path, mutex, cond,
|
|
||||||
IgnoreError()));
|
InputStreamPtr is(archive.OpenStream(path_utf8, mutex, cond,
|
||||||
|
IgnoreError()));
|
||||||
if (!is)
|
if (!is)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
class ArchiveFile;
|
class ArchiveFile;
|
||||||
class Path;
|
|
||||||
struct TagHandler;
|
struct TagHandler;
|
||||||
class TagBuilder;
|
class TagBuilder;
|
||||||
|
|
||||||
@ -36,7 +35,8 @@ class TagBuilder;
|
|||||||
* found)
|
* found)
|
||||||
*/
|
*/
|
||||||
bool
|
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
|
* Scan the tags of a song file inside an archive. Invokes matching
|
||||||
|
Loading…
Reference in New Issue
Block a user