tag/ApeLoader: use class InputStream instead of FILE*
Prepare for APE tag support on userspace NFS/SMB/CIFS mounts.
This commit is contained in:
@@ -105,6 +105,23 @@ tag_ape_import_item(unsigned long flags,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
tag_ape_scan2(InputStream &is,
|
||||
const struct tag_handler *handler, void *handler_ctx)
|
||||
{
|
||||
bool recognized = false;
|
||||
|
||||
auto callback = [handler, handler_ctx, &recognized]
|
||||
(unsigned long flags, const char *key,
|
||||
StringView value) {
|
||||
recognized |= tag_ape_import_item(flags, key, value,
|
||||
handler, handler_ctx);
|
||||
return true;
|
||||
};
|
||||
|
||||
return tag_ape_scan(is, callback) && recognized;
|
||||
}
|
||||
|
||||
bool
|
||||
tag_ape_scan2(Path path_fs,
|
||||
const struct tag_handler *handler, void *handler_ctx)
|
||||
|
||||
Reference in New Issue
Block a user