mpd/src/archive/ArchiveList.hxx

50 lines
1.5 KiB
C++
Raw Normal View History

/*
2016-02-26 17:54:05 +01:00
* Copyright 2003-2016 The Music Player Daemon Project
* http://www.musicpd.org
2008-12-16 21:42:34 +01:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2008-12-16 21:42:34 +01:00
*/
2013-01-24 19:18:58 +01:00
#ifndef MPD_ARCHIVE_LIST_HXX
#define MPD_ARCHIVE_LIST_HXX
2008-12-16 21:42:34 +01:00
struct ArchivePlugin;
2008-12-16 21:42:34 +01:00
extern const ArchivePlugin *const archive_plugins[];
2012-06-12 20:50:51 +02:00
#define archive_plugins_for_each(plugin) \
for (const ArchivePlugin *plugin, \
2012-06-12 20:50:51 +02:00
*const*archive_plugin_iterator = &archive_plugins[0]; \
2013-10-19 18:19:03 +02:00
(plugin = *archive_plugin_iterator) != nullptr; \
2012-06-12 20:50:51 +02:00
++archive_plugin_iterator)
2008-12-16 21:42:34 +01:00
/* interface for using plugins */
const ArchivePlugin *
2008-12-16 21:42:34 +01:00
archive_plugin_from_suffix(const char *suffix);
const ArchivePlugin *
2008-12-16 21:42:34 +01:00
archive_plugin_from_name(const char *name);
/* this is where we "load" all the "plugins" ;-) */
void
archive_plugin_init_all();
2008-12-16 21:42:34 +01:00
/* this is where we "unload" all the "plugins" */
void
archive_plugin_deinit_all();
2008-12-16 21:42:34 +01:00
#endif