Mercurial > pidgin.yaz
changeset 8749:d7b8eb1f0a18
[gaim-migrate @ 9504]
Bumped up the plugin API version number, and added version numbers for
loader plugins and protocol plugins. Authors will want to update their
plugins, and possibly use GAIM_PLUGIN_API_VERSION, GAIM_PRPL_API_VERSION,
and GAIM_LOADER_API_VERSION constants.
committer: Tailor Script <tailor@pidgin.im>
line wrap: on
line diff
--- a/ChangeLog Wed Apr 21 23:40:39 2004 +0000 +++ b/ChangeLog Thu Apr 22 01:53:18 2004 +0000 @@ -16,6 +16,10 @@ * Plugins can now add preferences (Gary Kramlich) * The TOC protocol is no longer built by default. The plugin is not being properly tested and is no longer officially supported. + * Bumped up the plugin API version number, and added version numbers + for loader plugins and protocol plugins. Authors will want to + update their plugins, and possibly use GAIM_PLUGIN_API_VERSION, + GAIM_PRPL_API_VERSION, and GAIM_LOADER_API_VERSION constants. Bug Fixes: * Formatting in the Log viewer is fixed (Kevin Stange)
--- a/plugins/autorecon.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/autorecon.c Thu Apr 22 01:53:18 2004 +0000 @@ -99,7 +99,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/contact_priority.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/contact_priority.c Thu Apr 22 01:53:18 2004 +0000 @@ -180,7 +180,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/docklet/docklet.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/docklet/docklet.c Thu Apr 22 01:53:18 2004 +0000 @@ -495,7 +495,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/filectl.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/filectl.c Thu Apr 22 01:53:18 2004 +0000 @@ -211,7 +211,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/gaim-remote/remote.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/gaim-remote/remote.c Thu Apr 22 01:53:18 2004 +0000 @@ -711,7 +711,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/gaiminc.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/gaiminc.c Thu Apr 22 01:53:18 2004 +0000 @@ -76,7 +76,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/gestures/gestures.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/gestures/gestures.c Thu Apr 22 01:53:18 2004 +0000 @@ -260,7 +260,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/gevolution/assoc-buddy.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/gevolution/assoc-buddy.c Thu Apr 22 01:53:18 2004 +0000 @@ -44,8 +44,6 @@ static gint delete_win_cb(GtkWidget *w, GdkEvent *event, GevoAssociateBuddyDialog *dialog) { - GList *l; - gtk_widget_destroy(dialog->win); g_list_foreach(dialog->contacts, (GFunc)g_free, NULL);
--- a/plugins/gevolution/gevolution.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/gevolution/gevolution.c Thu Apr 22 01:53:18 2004 +0000 @@ -450,7 +450,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/history.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/history.c Thu Apr 22 01:53:18 2004 +0000 @@ -60,7 +60,7 @@ static GaimPluginInfo info = { - 2, + GAIM_PLUGIN_API_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0,
--- a/plugins/iconaway.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/iconaway.c Thu Apr 22 01:53:18 2004 +0000 @@ -69,7 +69,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/idle.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/idle.c Thu Apr 22 01:53:18 2004 +0000 @@ -109,7 +109,7 @@ static GaimPluginInfo info = { - 2, + GAIM_PLUGIN_API_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0,
--- a/plugins/ipc-test-client.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/ipc-test-client.c Thu Apr 22 01:53:18 2004 +0000 @@ -73,7 +73,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/ipc-test-server.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/ipc-test-server.c Thu Apr 22 01:53:18 2004 +0000 @@ -60,7 +60,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/mailchk.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/mailchk.c Thu Apr 22 01:53:18 2004 +0000 @@ -147,7 +147,7 @@ static GaimPluginInfo info = { - 2, + GAIM_PLUGIN_API_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0,
--- a/plugins/notify.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/notify.c Thu Apr 22 01:53:18 2004 +0000 @@ -751,7 +751,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/perl/perl.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/perl/perl.c Thu Apr 22 01:53:18 2004 +0000 @@ -509,6 +509,7 @@ static GaimPluginLoaderInfo loader_info = { + GAIM_LOADER_API_VERSION, /**< api_version */ NULL, /**< exts */ probe_perl_plugin, /**< probe */ @@ -519,7 +520,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_LOADER, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/pluginpref_example.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/pluginpref_example.c Thu Apr 22 01:53:18 2004 +0000 @@ -106,7 +106,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/raw.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/raw.c Thu Apr 22 01:53:18 2004 +0000 @@ -144,7 +144,7 @@ static GaimPluginInfo info = { - 2, + GAIM_PLUGIN_API_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0,
--- a/plugins/relnot.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/relnot.c Thu Apr 22 01:53:18 2004 +0000 @@ -123,7 +123,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/signals-test.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/signals-test.c Thu Apr 22 01:53:18 2004 +0000 @@ -454,7 +454,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/simple.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/simple.c Thu Apr 22 01:53:18 2004 +0000 @@ -20,7 +20,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/spellchk.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/spellchk.c Thu Apr 22 01:53:18 2004 +0000 @@ -525,7 +525,7 @@ static GaimPluginInfo info = { - 2, + GAIM_PLUGIN_API_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0,
--- a/plugins/ssl/ssl-gnutls.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/ssl/ssl-gnutls.c Thu Apr 22 01:53:18 2004 +0000 @@ -212,7 +212,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */
--- a/plugins/ssl/ssl-nss.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/ssl/ssl-nss.c Thu Apr 22 01:53:18 2004 +0000 @@ -301,7 +301,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */
--- a/plugins/ssl/ssl.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/ssl/ssl.c Thu Apr 22 01:53:18 2004 +0000 @@ -80,7 +80,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */
--- a/plugins/statenotify.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/statenotify.c Thu Apr 22 01:53:18 2004 +0000 @@ -67,7 +67,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/tcl/tcl.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/tcl/tcl.c Thu Apr 22 01:53:18 2004 +0000 @@ -330,6 +330,7 @@ static GaimPluginLoaderInfo tcl_loader_info = { + GAIM_PLUGIN_LOADER_VERSION, NULL, tcl_probe_plugin, tcl_load_plugin, @@ -339,7 +340,7 @@ static GaimPluginInfo tcl_info = { - 2, + GAIM_PLUGIN_API_VERSION, GAIM_PLUGIN_LOADER, NULL, 0,
--- a/plugins/ticker/ticker.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/ticker/ticker.c Thu Apr 22 01:53:18 2004 +0000 @@ -317,7 +317,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/timestamp.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/timestamp.c Thu Apr 22 01:53:18 2004 +0000 @@ -162,7 +162,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/win32/transparency/win2ktrans.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/win32/transparency/win2ktrans.c Thu Apr 22 01:53:18 2004 +0000 @@ -411,7 +411,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */
--- a/plugins/win32/winprefs/winprefs.c Wed Apr 21 23:40:39 2004 +0000 +++ b/plugins/win32/winprefs/winprefs.c Thu Apr 22 01:53:18 2004 +0000 @@ -399,7 +399,7 @@ static GaimPluginInfo info = { - 2, + GAIM_PLUGIN_API_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0,
--- a/src/plugin.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/plugin.c Thu Apr 22 01:53:18 2004 +0000 @@ -230,6 +230,13 @@ return NULL; } + if (plugin->info->api_version != GAIM_PLUGIN_API_VERSION) + { + gaim_plugin_destroy(plugin); + + return NULL; + } + return plugin; #else return NULL; @@ -460,28 +467,40 @@ if (plugin->info != NULL && plugin->info->dependencies != NULL) g_list_free(plugin->info->dependencies); - if (plugin->native_plugin) { - - if (plugin->info != NULL && plugin->info->type == GAIM_PLUGIN_LOADER) { + if (plugin->native_plugin) + { + if (plugin->info != NULL && plugin->info->type == GAIM_PLUGIN_LOADER) + { + GaimPluginLoaderInfo *loader_info; GList *exts, *l, *next_l; GaimPlugin *p2; - for (exts = GAIM_PLUGIN_LOADER_INFO(plugin)->exts; - exts != NULL; - exts = exts->next) { + loader_info = GAIM_PLUGIN_LOADER_INFO(plugin); - for (l = gaim_plugins_get_all(); l != NULL; l = next_l) { - next_l = l->next; + if (loader_info != NULL && plugin->info->api_version >= 3 && + loader_info->exts != NULL) + { + for (exts = GAIM_PLUGIN_LOADER_INFO(plugin)->exts; + exts != NULL; + exts = exts->next) { + + for (l = gaim_plugins_get_all(); l != NULL; l = next_l) + { + next_l = l->next; - p2 = l->data; + p2 = l->data; - if (p2->path != NULL && is_so_file(p2->path, exts->data)) - gaim_plugin_destroy(p2); + if (p2->path != NULL && + is_so_file(p2->path, exts->data)) + { + gaim_plugin_destroy(p2); + } + } } + + g_list_free(loader_info->exts); } - g_list_free(GAIM_PLUGIN_LOADER_INFO(plugin)->exts); - plugin_loaders = g_list_remove(plugin_loaders, plugin); } @@ -491,13 +510,15 @@ if (plugin->handle != NULL) g_module_close(plugin->handle); } - else { + else + { GaimPlugin *loader; GaimPluginLoaderInfo *loader_info; loader = find_loader_for_plugin(plugin); - if (loader != NULL) { + if (loader != NULL) + { loader_info = GAIM_PLUGIN_LOADER_INFO(loader); if (loader_info->destroy != NULL) @@ -870,7 +891,6 @@ } else if (plugin->info->type == GAIM_PLUGIN_PROTOCOL) { - /* We'll just load this right now. */ if (!gaim_plugin_load(plugin)) { @@ -912,10 +932,32 @@ if (g_list_find(plugins, plugin)) return TRUE; - if (plugin->info->type == GAIM_PLUGIN_LOADER || - plugin->info->type == GAIM_PLUGIN_PROTOCOL) + if (plugin->info->type == GAIM_PLUGIN_LOADER) { - /* Special exception for loader plugins. We want them loaded NOW! */ + GaimPluginLoaderInfo *loader_info; + + loader_info = GAIM_PLUGIN_LOADER_INFO(plugin); + + if (loader_info == NULL || + loader_info->api_version != GAIM_LOADER_API_VERSION) + { + return FALSE; + } + + load_queue = g_list_append(load_queue, plugin); + } + else if (plugin->info->type == GAIM_PLUGIN_PROTOCOL) + { + GaimPluginProtocolInfo *prpl_info; + + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin); + + if (prpl_info == NULL || + prpl_info->api_version != GAIM_PRPL_API_VERSION) + { + return FALSE; + } + load_queue = g_list_append(load_queue, plugin); }
--- a/src/plugin.h Wed Apr 21 23:40:39 2004 +0000 +++ b/src/plugin.h Thu Apr 22 01:53:18 2004 +0000 @@ -29,9 +29,9 @@ #include "signals.h" #include "value.h" -typedef struct _GaimPlugin GaimPlugin; /**< GaimPlugin */ -typedef struct _GaimPluginInfo GaimPluginInfo; /**< GaimPluginInfo */ -typedef struct _GaimPluginUiInfo GaimPluginUiInfo; /**< GaimPluginUiInfo */ +typedef struct _GaimPlugin GaimPlugin; +typedef struct _GaimPluginInfo GaimPluginInfo; +typedef struct _GaimPluginUiInfo GaimPluginUiInfo; typedef struct _GaimPluginLoaderInfo GaimPluginLoaderInfo; typedef int GaimPluginPriority; /**< Plugin priority. */ @@ -56,6 +56,9 @@ #define GAIM_PLUGIN_FLAG_INVISIBLE 0x01 +#define GAIM_PLUGIN_API_VERSION 3 +#define GAIM_LOADER_API_VERSION 2 + /** * Detailed information about a plugin. * @@ -92,6 +95,8 @@ */ struct _GaimPluginLoaderInfo { + unsigned int api_version; + GList *exts; gboolean (*probe)(GaimPlugin *plugin);
--- a/src/protocols/gg/gg.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/gg/gg.c Thu Apr 22 01:53:18 2004 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 9467 2004-04-19 21:12:45Z lschiere $ + * $Id: gg.c 9504 2004-04-22 01:53:18Z chipx86 $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -1305,6 +1305,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, 0, NULL, NULL, @@ -1359,7 +1360,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/irc/irc.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/irc/irc.c Thu Apr 22 01:53:18 2004 +0000 @@ -536,6 +536,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL, NULL, NULL, @@ -599,7 +600,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/jabber/jabber.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/jabber/jabber.c Thu Apr 22 01:53:18 2004 +0000 @@ -1285,6 +1285,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME, NULL, NULL, @@ -1347,7 +1348,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/msn/msn.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/msn/msn.c Thu Apr 22 01:53:18 2004 +0000 @@ -1640,6 +1640,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_MAIL_CHECK /* | OPT_PROTO_BUDDY_ICON */, NULL, NULL, @@ -1702,7 +1703,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/napster/napster.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/napster/napster.c Thu Apr 22 01:53:18 2004 +0000 @@ -563,6 +563,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC, NULL, NULL, @@ -625,7 +626,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/novell/novell.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/novell/novell.c Thu Apr 22 01:53:18 2004 +0000 @@ -2339,6 +2339,7 @@ } static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, 0, NULL, NULL, @@ -2394,7 +2395,7 @@ }; static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/oscar/oscar.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/oscar/oscar.c Thu Apr 22 01:53:18 2004 +0000 @@ -6919,6 +6919,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_MAIL_CHECK | OPT_PROTO_BUDDY_ICON | OPT_PROTO_IM_IMAGE, NULL, NULL, @@ -6987,7 +6988,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/rendezvous/rendezvous.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/rendezvous/rendezvous.c Thu Apr 22 01:53:18 2004 +0000 @@ -566,6 +566,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_NO_PASSWORD | OPT_PROTO_BUDDY_ICON, NULL, NULL, @@ -620,7 +621,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/trepia/trepia.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/trepia/trepia.c Thu Apr 22 01:53:18 2004 +0000 @@ -1206,6 +1206,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_BUDDY_ICON, NULL, NULL, @@ -1268,7 +1269,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/yahoo/yahoo.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Thu Apr 22 01:53:18 2004 +0000 @@ -3213,6 +3213,7 @@ static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_MAIL_CHECK | OPT_PROTO_CHAT_TOPIC, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -3280,7 +3281,7 @@ static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/protocols/zephyr/zephyr.c Wed Apr 21 23:40:39 2004 +0000 +++ b/src/protocols/zephyr/zephyr.c Thu Apr 22 01:53:18 2004 +0000 @@ -1297,6 +1297,7 @@ static GaimPlugin *my_protocol = NULL; static GaimPluginProtocolInfo prpl_info = { + GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC | OPT_PROTO_NO_PASSWORD, NULL, NULL, @@ -1358,7 +1359,7 @@ }; static GaimPluginInfo info = { - 2, /**< api_version */ + GAIM_PLUGIN_API_VERSION, /**< api_version */ GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */
--- a/src/prpl.h Wed Apr 21 23:40:39 2004 +0000 +++ b/src/prpl.h Thu Apr 22 01:53:18 2004 +0000 @@ -97,6 +97,7 @@ { GAIM_CONV_IM_AUTO_RESP = 0x0001, /**< Auto response. */ GAIM_CONV_IM_IMAGES = 0x0002 /**< Contains images. */ + } GaimConvImFlags; #include "blist.h" @@ -205,6 +206,8 @@ */ struct _GaimPluginProtocolInfo { + unsigned int api_version; /**< API version number. */ + GaimProtocolOptions options; /**< Protocol options. */ GList *user_splits; /* A GList of GaimAccountUserSplit */ @@ -343,6 +346,7 @@ #define GAIM_PLUGIN_PROTOCOL_INFO(plugin) \ ((GaimPluginProtocolInfo *)(plugin)->info->extra_info) +#define GAIM_PRPL_API_VERSION 2 #ifdef __cplusplus extern "C" {