archive_plugin: wrap method calls
Make archive_file a "real" struct, extended by all plugins. Add the plugin pointer to it. Wrap all method calls in functions.
This commit is contained in:
@@ -61,14 +61,14 @@ input_archive_open(struct input_stream *is, const char *pathname,
|
||||
return false;
|
||||
}
|
||||
|
||||
file = arplug->open(archive);
|
||||
file = archive_file_open(arplug, archive);
|
||||
|
||||
//setup fileops
|
||||
opened = arplug->open_stream(file, is, filename, error_r);
|
||||
opened = archive_file_open_stream(file, is, filename, error_r);
|
||||
g_free(pname);
|
||||
|
||||
if (!opened) {
|
||||
arplug->close(file);
|
||||
archive_file_close(file);
|
||||
} else {
|
||||
is->ready = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user