archive: replaced setup_stream() with open_stream()

The open_stream() method opens the input_stream.  This allows the
archive plugin to do its own initialization, and it also allows it to
use input_stream.data.  We can remove input_stream.archive now, which
was unnatural to have in the first place.
This commit is contained in:
Max Kellermann
2009-01-30 00:53:32 +01:00
parent dc1cc7e7e5
commit 82cfce76eb
7 changed files with 37 additions and 135 deletions

View File

@@ -70,11 +70,12 @@ struct archive_plugin {
char *(*scan_next)(struct archive_file *);
/**
* this is used to setup input stream handle, to be able to read
* from archive. open method of inputstream can be the used to
* extract particular file
* Opens an input_stream of a file within the archive.
*
* @param path the path within the archive
*/
void (*setup_stream)(struct archive_file *, struct input_stream *is);
bool (*open_stream)(struct archive_file *, struct input_stream *is,
const char *path);
/**
* closes archive file.