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:
Max Kellermann
2009-12-16 16:28:26 +01:00
parent 74156d5bed
commit 0bc8c0c1da
9 changed files with 133 additions and 12 deletions

View File

@@ -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;
}