aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive/iso9660_archive_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-16 16:28:26 +0100
committerMax Kellermann <max@duempel.org>2009-12-16 17:09:58 +0100
commit0bc8c0c1da4490aad502dddbbc7c60564c4083a7 (patch)
tree3a7b9ed55fbbdb757e4822e7ea262237d0562dbc /src/archive/iso9660_archive_plugin.c
parent74156d5bed810209a777ba6ade7ef279691f3091 (diff)
downloadmpd-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 'src/archive/iso9660_archive_plugin.c')
-rw-r--r--src/archive/iso9660_archive_plugin.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/archive/iso9660_archive_plugin.c b/src/archive/iso9660_archive_plugin.c
index 0c21d5128..ccab9e614 100644
--- a/src/archive/iso9660_archive_plugin.c
+++ b/src/archive/iso9660_archive_plugin.c
@@ -35,6 +35,8 @@
#define CEILING(x, y) ((x+(y-1))/y)
struct iso9660_archive_file {
+ struct archive_file base;
+
iso9660_t *iso;
iso9660_stat_t *statbuf;
size_t cur_ofs;
@@ -93,6 +95,8 @@ iso9660_archive_open(const char *pathname)
struct iso9660_archive_file *context =
g_new(struct iso9660_archive_file, 1);
+ archive_file_init(&context->base, &iso9660_archive_plugin);
+
context->list = NULL;
/* open archive */
@@ -104,7 +108,7 @@ iso9660_archive_open(const char *pathname)
listdir_recur("/", context);
- return (struct archive_file *)context;
+ return &context->base;
}
static void