aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--src/db/update/Archive.cxx5
-rw-r--r--src/db/update/Walk.hxx4
-rw-r--r--src/input/plugins/ArchiveInputPlugin.cxx2
-rw-r--r--test/visit_archive.cxx2
15 files changed, 33 insertions, 27 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
diff --git a/src/db/update/Archive.cxx b/src/db/update/Archive.cxx
index 940448921..300922064 100644
--- a/src/db/update/Archive.cxx
+++ b/src/db/update/Archive.cxx
@@ -105,7 +105,7 @@ class UpdateArchiveVisitor final : public ArchiveVisitor {
void
UpdateWalk::UpdateArchiveFile(Directory &parent, const char *name,
const FileInfo &info,
- const archive_plugin &plugin)
+ const ArchivePlugin &plugin)
{
db_lock();
Directory *directory = parent.FindChild(name);
@@ -158,8 +158,7 @@ UpdateWalk::UpdateArchiveFile(Directory &directory,
const char *name, const char *suffix,
const FileInfo &info)
{
- const struct archive_plugin *plugin =
- archive_plugin_from_suffix(suffix);
+ const ArchivePlugin *plugin = archive_plugin_from_suffix(suffix);
if (plugin == nullptr)
return false;
diff --git a/src/db/update/Walk.hxx b/src/db/update/Walk.hxx
index 2bd56b067..bf3eb8ae4 100644
--- a/src/db/update/Walk.hxx
+++ b/src/db/update/Walk.hxx
@@ -28,7 +28,7 @@
struct stat;
struct FileInfo;
struct Directory;
-struct archive_plugin;
+struct ArchivePlugin;
class Storage;
class ExcludeList;
@@ -93,7 +93,7 @@ private:
void UpdateArchiveFile(Directory &directory, const char *name,
const FileInfo &info,
- const archive_plugin &plugin);
+ const ArchivePlugin &plugin);
#else
diff --git a/src/input/plugins/ArchiveInputPlugin.cxx b/src/input/plugins/ArchiveInputPlugin.cxx
index df1a72585..8e1b216d8 100644
--- a/src/input/plugins/ArchiveInputPlugin.cxx
+++ b/src/input/plugins/ArchiveInputPlugin.cxx
@@ -44,7 +44,7 @@ input_archive_open(const char *pathname,
Mutex &mutex, Cond &cond,
Error &error)
{
- const struct archive_plugin *arplug;
+ const ArchivePlugin *arplug;
InputStream *is;
if (!PathTraitsFS::IsAbsolute(pathname))
diff --git a/test/visit_archive.cxx b/test/visit_archive.cxx
index 0ff5706f2..0f60b8414 100644
--- a/test/visit_archive.cxx
+++ b/test/visit_archive.cxx
@@ -77,7 +77,7 @@ main(int argc, char **argv)
/* open the archive and dump it */
- const archive_plugin *plugin = archive_plugin_from_name(plugin_name);
+ const ArchivePlugin *plugin = archive_plugin_from_name(plugin_name);
if (plugin == nullptr) {
fprintf(stderr, "No such plugin: %s\n", plugin_name);
return EXIT_FAILURE;