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/update_walk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/update_walk.c') diff --git a/src/update_walk.c b/src/update_walk.c index 31b60bd6..f6f924bd 100644 --- a/src/update_walk.c +++ b/src/update_walk.c @@ -409,7 +409,7 @@ update_archive_file(struct directory *parent, const char *name, path_fs = map_directory_child_fs(parent, name); /* open archive */ - file = plugin->open(path_fs); + file = archive_file_open(plugin, path_fs); if (file == NULL) { g_warning("unable to open archive %s", path_fs); g_free(path_fs); @@ -429,15 +429,15 @@ update_archive_file(struct directory *parent, const char *name, directory->mtime = st->st_mtime; - plugin->scan_reset(file); + archive_file_scan_reset(file); - while ((filepath = plugin->scan_next(file)) != NULL) { + while ((filepath = archive_file_scan_next(file)) != NULL) { /* split name into directory and file */ g_debug("adding archive file: %s", filepath); update_archive_tree(directory, filepath); } - plugin->close(file); + archive_file_close(file); } #endif -- cgit v1.2.3