diff options
author | Max Kellermann <max@duempel.org> | 2009-12-16 16:28:26 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-16 17:09:58 +0100 |
commit | 0bc8c0c1da4490aad502dddbbc7c60564c4083a7 (patch) | |
tree | 3a7b9ed55fbbdb757e4822e7ea262237d0562dbc /src/update_walk.c | |
parent | 74156d5bed810209a777ba6ade7ef279691f3091 (diff) | |
download | mpd-0bc8c0c1da4490aad502dddbbc7c60564c4083a7.tar.gz mpd-0bc8c0c1da4490aad502dddbbc7c60564c4083a7.tar.xz mpd-0bc8c0c1da4490aad502dddbbc7c60564c4083a7.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/update_walk.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/update_walk.c b/src/update_walk.c index 31b60bd67..f6f924bd6 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 |