From 0bc8c0c1da4490aad502dddbbc7c60564c4083a7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 16 Dec 2009 16:28:26 +0100 Subject: 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. --- src/archive_plugin.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/archive_plugin.h') diff --git a/src/archive_plugin.h b/src/archive_plugin.h index 864eb5e72..1c35293d1 100644 --- a/src/archive_plugin.h +++ b/src/archive_plugin.h @@ -89,5 +89,20 @@ struct archive_plugin { const char *const*suffixes; }; -#endif +struct archive_file * +archive_file_open(const struct archive_plugin *plugin, const char *path); + +void +archive_file_close(struct archive_file *file); + +void +archive_file_scan_reset(struct archive_file *file); +char * +archive_file_scan_next(struct archive_file *file); + +bool +archive_file_open_stream(struct archive_file *file, struct input_stream *is, + const char *path, GError **error_r); + +#endif -- cgit v1.2.3