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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user