# HG changeset patch # User William Pitcock # Date 1214762511 18000 # Node ID 66dea2610f1c81c4884341d8abf673fdf082976e # Parent 48cdebc174ef02054b9b51ec6babb1b2e88c9c72# Parent 04c53c9d261b932a3efa57210c090acff6297599 Automated merge with ssh://hg.atheme.org//hg/audacious diff -r 48cdebc174ef -r 66dea2610f1c src/audacious/Makefile --- a/src/audacious/Makefile Sun Jun 29 18:04:43 2008 +0200 +++ b/src/audacious/Makefile Sun Jun 29 13:01:51 2008 -0500 @@ -102,6 +102,7 @@ i18n.h \ input.h \ hook.h \ + interface.h \ main.h \ mime.h \ output.h \ diff -r 48cdebc174ef -r 66dea2610f1c src/audacious/plugin.h --- a/src/audacious/plugin.h Sun Jun 29 18:04:43 2008 +0200 +++ b/src/audacious/plugin.h Sun Jun 29 13:01:51 2008 -0500 @@ -45,6 +45,7 @@ #include "audacious/playlist_container.h" #include "audacious/main.h" #include "audacious/preferences.h" +#include "audacious/interface.h" #define PLUGIN(x) ((Plugin *)(x)) #define INPUT_PLUGIN(x) ((InputPlugin *)(x)) @@ -191,6 +192,7 @@ GeneralPlugin **gp_list; VisPlugin **vp_list; DiscoveryPlugin **dp_list; + Interface *interface; } PluginHeader; #define PLUGIN_MAGIC 0x8EAC8DE2 @@ -1028,6 +1030,9 @@ #define SIMPLE_DISCOVER_PLUGIN(name, dp_list) \ DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, dp_list) +#define SIMPLE_INTERFACE_PLUGIN(name, interface) \ + DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, interface) + /* Sadly, this is the most we can generalize out of the disparate plugin structs usable with typecasts - descender */ struct _Plugin { diff -r 48cdebc174ef -r 66dea2610f1c src/audacious/pluginenum.c --- a/src/audacious/pluginenum.c Sun Jun 29 18:04:43 2008 +0200 +++ b/src/audacious/pluginenum.c Sun Jun 29 13:01:51 2008 -0500 @@ -714,6 +714,9 @@ discovery_plugin_init(PLUGIN((header->dp_list)[i])); } } + + if (header->interface) + interface_register(header->interface); } void @@ -723,6 +726,9 @@ g_return_if_fail(header->priv_assoc != NULL); + if (header->interface) + interface_deregister(header->interface); + module = header->priv_assoc->handle; g_free(header->priv_assoc->filename);