playlist/Plugin: rename with CamelCase
This commit is contained in:
parent
2376527d1f
commit
0d16772dea
|
@ -27,7 +27,7 @@ struct ConfigBlock;
|
|||
struct Tag;
|
||||
class SongEnumerator;
|
||||
|
||||
struct playlist_plugin {
|
||||
struct PlaylistPlugin {
|
||||
const char *name;
|
||||
|
||||
/**
|
||||
|
@ -77,7 +77,7 @@ struct playlist_plugin {
|
|||
* the plugin is not available
|
||||
*/
|
||||
static inline bool
|
||||
playlist_plugin_init(const struct playlist_plugin *plugin,
|
||||
playlist_plugin_init(const PlaylistPlugin *plugin,
|
||||
const ConfigBlock &block)
|
||||
{
|
||||
return plugin->init != nullptr
|
||||
|
@ -89,7 +89,7 @@ playlist_plugin_init(const struct playlist_plugin *plugin,
|
|||
* Deinitialize a plugin which was initialized successfully.
|
||||
*/
|
||||
static inline void
|
||||
playlist_plugin_finish(const struct playlist_plugin *plugin) noexcept
|
||||
playlist_plugin_finish(const PlaylistPlugin *plugin) noexcept
|
||||
{
|
||||
if (plugin->finish != nullptr)
|
||||
plugin->finish();
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
const struct playlist_plugin *const playlist_plugins[] = {
|
||||
const PlaylistPlugin *const playlist_plugins[] = {
|
||||
&extm3u_playlist_plugin,
|
||||
&m3u_playlist_plugin,
|
||||
&pls_playlist_plugin,
|
||||
|
@ -81,7 +81,7 @@ playlist_list_global_init(const ConfigData &config)
|
|||
const ConfigBlock empty;
|
||||
|
||||
for (unsigned i = 0; playlist_plugins[i] != nullptr; ++i) {
|
||||
const struct playlist_plugin *plugin = playlist_plugins[i];
|
||||
const auto *plugin = playlist_plugins[i];
|
||||
const auto *param =
|
||||
config.FindBlock(ConfigBlockOption::PLAYLIST_PLUGIN,
|
||||
"name", plugin->name);
|
||||
|
@ -117,7 +117,7 @@ playlist_list_open_uri_scheme(const char *uri, Mutex &mutex,
|
|||
return nullptr;
|
||||
|
||||
for (unsigned i = 0; playlist_plugins[i] != nullptr; ++i) {
|
||||
const struct playlist_plugin *plugin = playlist_plugins[i];
|
||||
const auto *plugin = playlist_plugins[i];
|
||||
|
||||
assert(!tried[i]);
|
||||
|
||||
|
@ -147,7 +147,7 @@ playlist_list_open_uri_suffix(const char *uri, Mutex &mutex,
|
|||
return nullptr;
|
||||
|
||||
for (unsigned i = 0; playlist_plugins[i] != nullptr; ++i) {
|
||||
const struct playlist_plugin *plugin = playlist_plugins[i];
|
||||
const auto *plugin = playlist_plugins[i];
|
||||
|
||||
if (playlist_plugins_enabled[i] && !tried[i] &&
|
||||
plugin->open_uri != nullptr && plugin->suffixes != nullptr &&
|
||||
|
|
|
@ -25,12 +25,13 @@
|
|||
#include "util/Compiler.h"
|
||||
|
||||
struct ConfigData;
|
||||
struct PlaylistPlugin;
|
||||
class SongEnumerator;
|
||||
|
||||
extern const struct playlist_plugin *const playlist_plugins[];
|
||||
extern const PlaylistPlugin *const playlist_plugins[];
|
||||
|
||||
#define playlist_plugins_for_each(plugin) \
|
||||
for (const struct playlist_plugin *plugin, \
|
||||
for (const PlaylistPlugin *plugin, \
|
||||
*const*playlist_plugin_iterator = &playlist_plugins[0]; \
|
||||
(plugin = *playlist_plugin_iterator) != nullptr; \
|
||||
++playlist_plugin_iterator)
|
||||
|
|
|
@ -166,7 +166,7 @@ static const char *const asx_mime_types[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin asx_playlist_plugin = {
|
||||
const PlaylistPlugin asx_playlist_plugin = {
|
||||
"asx",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_ASX_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_ASX_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin asx_playlist_plugin;
|
||||
extern const struct PlaylistPlugin asx_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -70,7 +70,7 @@ static const char *const cue_playlist_mime_types[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin cue_playlist_plugin = {
|
||||
const PlaylistPlugin cue_playlist_plugin = {
|
||||
"cue",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_CUE_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_CUE_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin cue_playlist_plugin;
|
||||
extern const struct PlaylistPlugin cue_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -159,7 +159,7 @@ static const char *const embcue_playlist_suffixes[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin embcue_playlist_plugin = {
|
||||
const PlaylistPlugin embcue_playlist_plugin = {
|
||||
"embcue",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_EMBCUE_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_EMBCUE_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin embcue_playlist_plugin;
|
||||
extern const struct PlaylistPlugin embcue_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -147,7 +147,7 @@ static const char *const extm3u_mime_types[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin extm3u_playlist_plugin = {
|
||||
const PlaylistPlugin extm3u_playlist_plugin = {
|
||||
"extm3u",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_EXTM3U_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_EXTM3U_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin extm3u_playlist_plugin;
|
||||
extern const struct PlaylistPlugin extm3u_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -103,7 +103,7 @@ static const char *const flac_playlist_suffixes[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin flac_playlist_plugin = {
|
||||
const PlaylistPlugin flac_playlist_plugin = {
|
||||
"flac",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_FLAC_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_FLAC_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin flac_playlist_plugin;
|
||||
extern const struct PlaylistPlugin flac_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -69,7 +69,7 @@ static const char *const m3u_mime_types[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin m3u_playlist_plugin = {
|
||||
const PlaylistPlugin m3u_playlist_plugin = {
|
||||
"m3u",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_M3U_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_M3U_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin m3u_playlist_plugin;
|
||||
extern const struct PlaylistPlugin m3u_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -172,7 +172,7 @@ static const char *const pls_mime_types[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin pls_playlist_plugin = {
|
||||
const PlaylistPlugin pls_playlist_plugin = {
|
||||
"pls",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_PLS_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_PLS_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin pls_playlist_plugin;
|
||||
extern const struct PlaylistPlugin pls_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -165,7 +165,7 @@ static const char *const rss_mime_types[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin rss_playlist_plugin = {
|
||||
const PlaylistPlugin rss_playlist_plugin = {
|
||||
"rss",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_RSS_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_RSS_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin rss_playlist_plugin;
|
||||
extern const struct PlaylistPlugin rss_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -288,7 +288,7 @@ static const char *const soundcloud_schemes[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin soundcloud_playlist_plugin = {
|
||||
const PlaylistPlugin soundcloud_playlist_plugin = {
|
||||
"soundcloud",
|
||||
|
||||
soundcloud_init,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_SOUNDCLOUD_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_SOUNDCLOUD_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin soundcloud_playlist_plugin;
|
||||
extern const struct PlaylistPlugin soundcloud_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -211,7 +211,7 @@ static const char *const xspf_mime_types[] = {
|
|||
nullptr
|
||||
};
|
||||
|
||||
const struct playlist_plugin xspf_playlist_plugin = {
|
||||
const PlaylistPlugin xspf_playlist_plugin = {
|
||||
"xspf",
|
||||
|
||||
nullptr,
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#ifndef MPD_XSPF_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_XSPF_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin xspf_playlist_plugin;
|
||||
extern const struct PlaylistPlugin xspf_playlist_plugin;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue