aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-08 13:22:13 +0100
committerMax Kellermann <max@duempel.org>2014-02-08 13:22:13 +0100
commit9906daeca71b7e552721f85f3696d9e6a20f7a5b (patch)
tree89c934549bbfb4eb7051fa9af868d4fd4014a001 /src/archive
parent5fb54095d22e38662383fc73bc1af56da357756c (diff)
downloadmpd-9906daeca71b7e552721f85f3696d9e6a20f7a5b.tar.gz
mpd-9906daeca71b7e552721f85f3696d9e6a20f7a5b.tar.xz
mpd-9906daeca71b7e552721f85f3696d9e6a20f7a5b.zip
ArchivePlugin: rename struct archive_plugin to ArchivePlugin
Diffstat (limited to '')
-rw-r--r--src/archive/ArchiveFile.hxx5
-rw-r--r--src/archive/ArchiveList.cxx8
-rw-r--r--src/archive/ArchiveList.hxx10
-rw-r--r--src/archive/ArchivePlugin.cxx2
-rw-r--r--src/archive/ArchivePlugin.hxx4
-rw-r--r--src/archive/plugins/Bzip2ArchivePlugin.cxx2
-rw-r--r--src/archive/plugins/Bzip2ArchivePlugin.hxx4
-rw-r--r--src/archive/plugins/Iso9660ArchivePlugin.cxx2
-rw-r--r--src/archive/plugins/Iso9660ArchivePlugin.hxx4
-rw-r--r--src/archive/plugins/ZzipArchivePlugin.cxx2
-rw-r--r--src/archive/plugins/ZzipArchivePlugin.hxx4
11 files changed, 27 insertions, 20 deletions
diff --git a/src/archive/ArchiveFile.hxx b/src/archive/ArchiveFile.hxx
index b95edcc8d..7d6c9e17c 100644
--- a/src/archive/ArchiveFile.hxx
+++ b/src/archive/ArchiveFile.hxx
@@ -23,14 +23,15 @@
class Mutex;
class Cond;
class Error;
+struct ArchivePlugin;
class ArchiveVisitor;
struct InputStream;
class ArchiveFile {
public:
- const struct archive_plugin &plugin;
+ const ArchivePlugin &plugin;
- ArchiveFile(const struct archive_plugin &_plugin)
+ ArchiveFile(const ArchivePlugin &_plugin)
:plugin(_plugin) {}
protected:
diff --git a/src/archive/ArchiveList.cxx b/src/archive/ArchiveList.cxx
index bf6493588..79c3a16fe 100644
--- a/src/archive/ArchiveList.cxx
+++ b/src/archive/ArchiveList.cxx
@@ -28,7 +28,7 @@
#include <string.h>
-const struct archive_plugin *const archive_plugins[] = {
+const ArchivePlugin *const archive_plugins[] = {
#ifdef HAVE_BZ2
&bz2_archive_plugin,
#endif
@@ -48,7 +48,7 @@ static bool archive_plugins_enabled[ARRAY_SIZE(archive_plugins) - 1];
archive_plugins_for_each(plugin) \
if (archive_plugins_enabled[archive_plugin_iterator - archive_plugins])
-const struct archive_plugin *
+const ArchivePlugin *
archive_plugin_from_suffix(const char *suffix)
{
if (suffix == nullptr)
@@ -62,7 +62,7 @@ archive_plugin_from_suffix(const char *suffix)
return nullptr;
}
-const struct archive_plugin *
+const ArchivePlugin *
archive_plugin_from_name(const char *name)
{
archive_plugins_for_each_enabled(plugin)
@@ -75,7 +75,7 @@ archive_plugin_from_name(const char *name)
void archive_plugin_init_all(void)
{
for (unsigned i = 0; archive_plugins[i] != nullptr; ++i) {
- const struct archive_plugin *plugin = archive_plugins[i];
+ const ArchivePlugin *plugin = archive_plugins[i];
if (plugin->init == nullptr || archive_plugins[i]->init())
archive_plugins_enabled[i] = true;
}
diff --git a/src/archive/ArchiveList.hxx b/src/archive/ArchiveList.hxx
index 49798a93e..1f1b0ae96 100644
--- a/src/archive/ArchiveList.hxx
+++ b/src/archive/ArchiveList.hxx
@@ -20,22 +20,22 @@
#ifndef MPD_ARCHIVE_LIST_HXX
#define MPD_ARCHIVE_LIST_HXX
-struct archive_plugin;
+struct ArchivePlugin;
-extern const struct archive_plugin *const archive_plugins[];
+extern const ArchivePlugin *const archive_plugins[];
#define archive_plugins_for_each(plugin) \
- for (const struct archive_plugin *plugin, \
+ for (const ArchivePlugin *plugin, \
*const*archive_plugin_iterator = &archive_plugins[0]; \
(plugin = *archive_plugin_iterator) != nullptr; \
++archive_plugin_iterator)
/* interface for using plugins */
-const struct archive_plugin *
+const ArchivePlugin *
archive_plugin_from_suffix(const char *suffix);
-const struct archive_plugin *
+const ArchivePlugin *
archive_plugin_from_name(const char *name);
/* this is where we "load" all the "plugins" ;-) */
diff --git a/src/archive/ArchivePlugin.cxx b/src/archive/ArchivePlugin.cxx
index f8025a121..6633c1748 100644
--- a/src/archive/ArchivePlugin.cxx
+++ b/src/archive/ArchivePlugin.cxx
@@ -25,7 +25,7 @@
#include <assert.h>
ArchiveFile *
-archive_file_open(const struct archive_plugin *plugin, const char *path,
+archive_file_open(const ArchivePlugin *plugin, const char *path,
Error &error)
{
assert(plugin != nullptr);
diff --git a/src/archive/ArchivePlugin.hxx b/src/archive/ArchivePlugin.hxx
index 602de240a..023c933f3 100644
--- a/src/archive/ArchivePlugin.hxx
+++ b/src/archive/ArchivePlugin.hxx
@@ -23,7 +23,7 @@
class ArchiveFile;
class Error;
-struct archive_plugin {
+struct ArchivePlugin {
const char *name;
/**
@@ -54,7 +54,7 @@ struct archive_plugin {
};
ArchiveFile *
-archive_file_open(const struct archive_plugin *plugin, const char *path,
+archive_file_open(const ArchivePlugin *plugin, const char *path,
Error &error);
#endif
diff --git a/src/archive/plugins/Bzip2ArchivePlugin.cxx b/src/archive/plugins/Bzip2ArchivePlugin.cxx
index c9648050b..272a3f81c 100644
--- a/src/archive/plugins/Bzip2ArchivePlugin.cxx
+++ b/src/archive/plugins/Bzip2ArchivePlugin.cxx
@@ -282,7 +282,7 @@ const InputPlugin bz2_inputplugin = {
nullptr,
};
-const struct archive_plugin bz2_archive_plugin = {
+const ArchivePlugin bz2_archive_plugin = {
"bz2",
nullptr,
nullptr,
diff --git a/src/archive/plugins/Bzip2ArchivePlugin.hxx b/src/archive/plugins/Bzip2ArchivePlugin.hxx
index 060780633..1a0a578d1 100644
--- a/src/archive/plugins/Bzip2ArchivePlugin.hxx
+++ b/src/archive/plugins/Bzip2ArchivePlugin.hxx
@@ -20,6 +20,8 @@
#ifndef MPD_ARCHIVE_BZ2_HXX
#define MPD_ARCHIVE_BZ2_HXX
-extern const struct archive_plugin bz2_archive_plugin;
+struct ArchivePlugin;
+
+extern const ArchivePlugin bz2_archive_plugin;
#endif
diff --git a/src/archive/plugins/Iso9660ArchivePlugin.cxx b/src/archive/plugins/Iso9660ArchivePlugin.cxx
index 1a126d0f2..d84cbc2cd 100644
--- a/src/archive/plugins/Iso9660ArchivePlugin.cxx
+++ b/src/archive/plugins/Iso9660ArchivePlugin.cxx
@@ -266,7 +266,7 @@ const InputPlugin iso9660_input_plugin = {
nullptr,
};
-const struct archive_plugin iso9660_archive_plugin = {
+const ArchivePlugin iso9660_archive_plugin = {
"iso",
nullptr,
nullptr,
diff --git a/src/archive/plugins/Iso9660ArchivePlugin.hxx b/src/archive/plugins/Iso9660ArchivePlugin.hxx
index e92d5962b..9335e83b3 100644
--- a/src/archive/plugins/Iso9660ArchivePlugin.hxx
+++ b/src/archive/plugins/Iso9660ArchivePlugin.hxx
@@ -20,6 +20,8 @@
#ifndef MPD_ARCHIVE_ISO9660_HXX
#define MPD_ARCHIVE_ISO9660_HXX
-extern const struct archive_plugin iso9660_archive_plugin;
+struct ArchivePlugin;
+
+extern const ArchivePlugin iso9660_archive_plugin;
#endif
diff --git a/src/archive/plugins/ZzipArchivePlugin.cxx b/src/archive/plugins/ZzipArchivePlugin.cxx
index 61b3c2b45..5ae3ace8d 100644
--- a/src/archive/plugins/ZzipArchivePlugin.cxx
+++ b/src/archive/plugins/ZzipArchivePlugin.cxx
@@ -214,7 +214,7 @@ const InputPlugin zzip_input_plugin = {
zzip_input_seek,
};
-const struct archive_plugin zzip_archive_plugin = {
+const ArchivePlugin zzip_archive_plugin = {
"zzip",
nullptr,
nullptr,
diff --git a/src/archive/plugins/ZzipArchivePlugin.hxx b/src/archive/plugins/ZzipArchivePlugin.hxx
index f82f62eb6..cc92b7c52 100644
--- a/src/archive/plugins/ZzipArchivePlugin.hxx
+++ b/src/archive/plugins/ZzipArchivePlugin.hxx
@@ -20,6 +20,8 @@
#ifndef MPD_ARCHIVE_ZZIP_HXX
#define MPD_ARCHIVE_ZZIP_HXX
-extern const struct archive_plugin zzip_archive_plugin;
+struct ArchivePlugin;
+
+extern const ArchivePlugin zzip_archive_plugin;
#endif