Audacious $Id:Doxyfile42802007-03-2104:39:00Znenolod$
plugins.h
Go to the documentation of this file.
00001 /*
00002  * plugins.h
00003  * Copyright 2010 John Lindgren
00004  *
00005  * This file is part of Audacious.
00006  *
00007  * Audacious is free software: you can redistribute it and/or modify it under
00008  * the terms of the GNU General Public License as published by the Free Software
00009  * Foundation, version 2 or version 3 of the License.
00010  *
00011  * Audacious is distributed in the hope that it will be useful, but WITHOUT ANY
00012  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00013  * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License along with
00016  * Audacious. If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  * The Audacious team does not consider modular code linking to Audacious or
00019  * using our public API to be a derived work.
00020  */
00021 
00022 #ifndef AUDACIOUS_PLUGINS_H
00023 #define AUDACIOUS_PLUGINS_H
00024 
00025 #include <glib.h>
00026 
00027 #include <audacious/api.h>
00028 #include <audacious/types.h>
00029 
00030 typedef gboolean (* PluginForEachFunc) (PluginHandle * plugin, void * data);
00031 
00032 #define AUD_API_NAME PluginsAPI
00033 #define AUD_API_SYMBOL plugins_api
00034 
00035 #ifdef _AUDACIOUS_CORE
00036 
00037 #include "api-local-begin.h"
00038 #include "plugins-api.h"
00039 #include "api-local-end.h"
00040 
00041 enum {
00042  INPUT_KEY_SCHEME,
00043  INPUT_KEY_EXTENSION,
00044  INPUT_KEY_MIME,
00045  INPUT_KEYS};
00046 
00047 /* plugin-init.c */
00048 void start_plugins_one (void);
00049 void start_plugins_two (void);
00050 void stop_plugins_two (void);
00051 void stop_plugins_one (void);
00052 
00053 /* plugin-registry.c */
00054 void plugin_registry_load (void);
00055 void plugin_registry_prune (void);
00056 void plugin_registry_save (void);
00057 
00058 void plugin_register (const gchar * path);
00059 void plugin_register_loaded (const gchar * path, Plugin * header);
00060 
00061 void plugin_set_enabled (PluginHandle * plugin, gboolean enabled);
00062 
00063 PluginHandle * transport_plugin_for_scheme (const gchar * scheme);
00064 PluginHandle * playlist_plugin_for_extension (const gchar * extension);
00065 void input_plugin_for_key (gint key, const gchar * value, PluginForEachFunc
00066  func, void * data);
00067 gboolean input_plugin_has_images (PluginHandle * plugin);
00068 gboolean input_plugin_has_subtunes (PluginHandle * plugin);
00069 gboolean input_plugin_can_write_tuple (PluginHandle * plugin);
00070 gboolean input_plugin_has_infowin (PluginHandle * plugin);
00071 
00072 /* pluginenum.c */
00073 void plugin_system_init (void);
00074 void plugin_system_cleanup (void);
00075 void plugin_load (const gchar * path);
00076 
00077 #else
00078 
00079 #include <audacious/api-define-begin.h>
00080 #include <audacious/plugins-api.h>
00081 #include <audacious/api-define-end.h>
00082 
00083 #include <audacious/api-alias-begin.h>
00084 #include <audacious/plugins-api.h>
00085 #include <audacious/api-alias-end.h>
00086 
00087 #endif
00088 
00089 #undef AUD_API_NAME
00090 #undef AUD_API_SYMBOL
00091 
00092 #endif
00093 
00094 #ifdef AUD_API_DECLARE
00095 
00096 #define AUD_API_NAME PluginsAPI
00097 #define AUD_API_SYMBOL plugins_api
00098 
00099 #include "api-define-begin.h"
00100 #include "plugins-api.h"
00101 #include "api-define-end.h"
00102 
00103 #include "api-declare-begin.h"
00104 #include "plugins-api.h"
00105 #include "api-declare-end.h"
00106 
00107 #undef AUD_API_NAME
00108 #undef AUD_API_SYMBOL
00109 
00110 #endif