From f5c0b0d3168d6c34010f86a4b6878b7181d10237 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 29 Jan 2013 23:26:51 +0100 Subject: ArchiveFile: convert to a class --- src/ArchivePlugin.hxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/ArchivePlugin.hxx') diff --git a/src/ArchivePlugin.hxx b/src/ArchivePlugin.hxx index 007a4f15..6d043dfa 100644 --- a/src/ArchivePlugin.hxx +++ b/src/ArchivePlugin.hxx @@ -25,7 +25,7 @@ #include "gerror.h" struct input_stream; -struct archive_file; +class ArchiveFile; class ArchiveVisitor; struct archive_plugin { @@ -49,12 +49,12 @@ struct archive_plugin { * returns pointer to handle used is all operations with this archive * or NULL when opening fails */ - struct archive_file *(*open)(const char *path_fs, GError **error_r); + ArchiveFile *(*open)(const char *path_fs, GError **error_r); /** * Visit all entries inside this archive. */ - void (*visit)(archive_file *af, ArchiveVisitor &visitor); + void (*visit)(ArchiveFile *af, ArchiveVisitor &visitor); /** * Opens an input_stream of a file within the archive. @@ -63,7 +63,7 @@ struct archive_plugin { * @param error_r location to store the error occurring, or * NULL to ignore errors */ - struct input_stream *(*open_stream)(struct archive_file *af, + struct input_stream *(*open_stream)(ArchiveFile *af, const char *path, Mutex &mutex, Cond &cond, GError **error_r); @@ -71,7 +71,7 @@ struct archive_plugin { /** * closes archive file. */ - void (*close)(struct archive_file *); + void (*close)(ArchiveFile *); /** * suffixes handled by this plugin. @@ -80,18 +80,18 @@ struct archive_plugin { const char *const*suffixes; }; -struct archive_file * +ArchiveFile * archive_file_open(const struct archive_plugin *plugin, const char *path, GError **error_r); void -archive_file_close(struct archive_file *file); +archive_file_close(ArchiveFile *file); void -archive_file_visit(archive_file *file, ArchiveVisitor &visitor); +archive_file_visit(ArchiveFile *file, ArchiveVisitor &visitor); struct input_stream * -archive_file_open_stream(struct archive_file *file, const char *path, +archive_file_open_stream(ArchiveFile *file, const char *path, Mutex &mutex, Cond &cond, GError **error_r); -- cgit v1.2.3