# HG changeset patch # User Nathan Walp # Date 1094246485 0 # Node ID f8e395a054e28c340489286cd991e9e3d5e6b3df # Parent 3941c39ccff51634b0654e16bb2210adb97f5fa2 [gaim-migrate @ 10835] this all seemed to work last night...hopefully no stray cosmic rays did anything to break it since then committer: Tailor Script diff -r 3941c39ccff5 -r f8e395a054e2 VERSION --- a/VERSION Fri Sep 03 03:05:56 2004 +0000 +++ b/VERSION Fri Sep 03 21:21:25 2004 +0000 @@ -1,1 +1,1 @@ -0.83cvs +1.0.0cvs diff -r 3941c39ccff5 -r f8e395a054e2 configure.ac --- a/configure.ac Fri Sep 03 03:05:56 2004 +0000 +++ b/configure.ac Fri Sep 03 21:21:25 2004 +0000 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([gaim], [0.83cvs], [gaim-devel@lists.sourceforge.net]) +AC_INIT([gaim], [1.0.0cvs], [gaim-devel@lists.sourceforge.net]) AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) diff -r 3941c39ccff5 -r f8e395a054e2 plugins/autorecon.c --- a/plugins/autorecon.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/autorecon.c Fri Sep 03 21:21:25 2004 +0000 @@ -5,6 +5,7 @@ #include "pluginpref.h" #include "prpl.h" #include "signals.h" +#include "version.h" #define AUTORECON_PLUGIN_ID "core-autorecon" @@ -256,7 +257,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/docklet/docklet.c --- a/plugins/docklet/docklet.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/docklet/docklet.c Fri Sep 03 21:21:25 2004 +0000 @@ -37,6 +37,7 @@ #include "prefs.h" #include "signals.h" #include "sound.h" +#include "version.h" #include "away.h" #include "gtkaccount.h" @@ -533,7 +534,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/extplacement.c --- a/plugins/extplacement.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/extplacement.c Fri Sep 03 21:21:25 2004 +0000 @@ -23,6 +23,7 @@ #include "internal.h" #include "gtkgaim.h" #include "conversation.h" +#include "version.h" #include "gtkplugin.h" static void @@ -117,7 +118,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/gaim-remote/remote.c --- a/plugins/gaim-remote/remote.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/gaim-remote/remote.c Fri Sep 03 21:21:25 2004 +0000 @@ -36,6 +36,7 @@ #include "debug.h" #include "prpl.h" #include "notify.h" +#include "version.h" /* XXX */ #include "away.h" @@ -728,7 +729,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/gestures/gestures.c --- a/plugins/gestures/gestures.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/gestures/gestures.c Fri Sep 03 21:21:25 2004 +0000 @@ -24,6 +24,7 @@ #include "debug.h" #include "prefs.h" #include "signals.h" +#include "version.h" #include "gtkconv.h" #include "gtkplugin.h" @@ -260,7 +261,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/history.c --- a/plugins/history.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/history.c Fri Sep 03 21:21:25 2004 +0000 @@ -10,6 +10,7 @@ #include "prefs.h" #include "signals.h" #include "util.h" +#include "version.h" #include "gtkconv.h" #include "gtkimhtml.h" @@ -79,7 +80,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0, diff -r 3941c39ccff5 -r f8e395a054e2 plugins/iconaway.c --- a/plugins/iconaway.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/iconaway.c Fri Sep 03 21:21:25 2004 +0000 @@ -23,6 +23,7 @@ #include "conversation.h" #include "signals.h" +#include "version.h" #include "gtkconv.h" #include "gtkplugin.h" @@ -90,7 +91,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/idle.c --- a/plugins/idle.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/idle.c Fri Sep 03 21:21:25 2004 +0000 @@ -10,6 +10,7 @@ #include "plugin.h" #include "request.h" #include "server.h" +#include "version.h" #define IDLE_PLUGIN_ID "gtk-idle" @@ -85,7 +86,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, NULL, 0, diff -r 3941c39ccff5 -r f8e395a054e2 plugins/notify.c --- a/plugins/notify.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/notify.c Fri Sep 03 21:21:25 2004 +0000 @@ -72,6 +72,7 @@ #include "debug.h" #include "prefs.h" #include "signals.h" +#include "version.h" #include "gtkplugin.h" #include "gtkutils.h" @@ -782,7 +783,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/perl/perl.c --- a/plugins/perl/perl.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/perl/perl.c Fri Sep 03 21:21:25 2004 +0000 @@ -89,6 +89,7 @@ #include "debug.h" #include "plugin.h" #include "signals.h" +#include "version.h" #include "perl-common.h" #include "perl-handlers.h" @@ -289,7 +290,9 @@ info = g_new0(GaimPluginInfo, 1); gps = g_new0(GaimPerlScript, 1); - info->api_version = GAIM_PLUGIN_API_VERSION; + info->magic = GAIM_PLUGIN_MAGIC; + info->major_version = GAIM_MAJOR_VERSION; + info->minor_version = GAIM_MINOR_VERSION; info->type = GAIM_PLUGIN_STANDARD; info->dependencies = g_list_append(info->dependencies, @@ -510,9 +513,7 @@ static GaimPluginLoaderInfo loader_info = { - GAIM_LOADER_API_VERSION, /**< api_version */ NULL, /**< exts */ - probe_perl_plugin, /**< probe */ load_perl_plugin, /**< load */ unload_perl_plugin, /**< unload */ @@ -521,7 +522,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_LOADER, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/relnot.c --- a/plugins/relnot.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/relnot.c Fri Sep 03 21:21:25 2004 +0000 @@ -36,6 +36,7 @@ #include "notify.h" #include "prefs.h" #include "util.h" +#include "version.h" /* 1 day */ #define MIN_CHECK_INTERVAL 60 * 60 * 24 @@ -123,7 +124,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/spellchk.c --- a/plugins/spellchk.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/spellchk.c Fri Sep 03 21:21:25 2004 +0000 @@ -8,6 +8,7 @@ #include "debug.h" #include "signals.h" #include "util.h" +#include "version.h" #include "gtkplugin.h" #include "gtkutils.h" @@ -526,7 +527,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, GAIM_GTK_PLUGIN_TYPE, 0, diff -r 3941c39ccff5 -r f8e395a054e2 plugins/ssl/ssl-gnutls.c --- a/plugins/ssl/ssl-gnutls.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/ssl/ssl-gnutls.c Fri Sep 03 21:21:25 2004 +0000 @@ -23,6 +23,7 @@ #include "debug.h" #include "plugin.h" #include "sslconn.h" +#include "version.h" #define SSL_GNUTLS_PLUGIN_ID "ssl-gnutls" @@ -212,7 +213,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/ssl/ssl-nss.c --- a/plugins/ssl/ssl-nss.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/ssl/ssl-nss.c Fri Sep 03 21:21:25 2004 +0000 @@ -23,6 +23,7 @@ #include "debug.h" #include "plugin.h" #include "sslconn.h" +#include "version.h" #define SSL_NSS_PLUGIN_ID "ssl-nss" @@ -303,7 +304,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/ssl/ssl.c --- a/plugins/ssl/ssl.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/ssl/ssl.c Fri Sep 03 21:21:25 2004 +0000 @@ -23,6 +23,7 @@ #include "debug.h" #include "plugin.h" #include "sslconn.h" +#include "version.h" #define SSL_PLUGIN_ID "core-ssl" @@ -80,7 +81,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/statenotify.c --- a/plugins/statenotify.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/statenotify.c Fri Sep 03 21:21:25 2004 +0000 @@ -4,6 +4,7 @@ #include "conversation.h" #include "debug.h" #include "signals.h" +#include "version.h" #include "plugin.h" #include "pluginpref.h" @@ -102,7 +103,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/tcl/tcl.c --- a/plugins/tcl/tcl.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/tcl/tcl.c Fri Sep 03 21:21:25 2004 +0000 @@ -4,7 +4,7 @@ * gaim * * Copyright (C) 2003 Ethan Blanton - * + * * 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 @@ -43,6 +43,7 @@ #include "signals.h" #include "debug.h" #include "util.h" +#include "version.h" struct tcl_plugin_data { GaimPlugin *plugin; @@ -69,7 +70,7 @@ static int tcl_init_interp(Tcl_Interp *interp) { char *rcfile; - char init[] = + char init[] = "namespace eval ::gaim {\n" " namespace export account buddy connection conversation\n" " namespace export core debug notify prefs send_im\n" @@ -221,7 +222,9 @@ if (nelems == 6) { info = g_new0(GaimPluginInfo, 1); - info->api_version = GAIM_PLUGIN_API_VERSION; + info->magic = GAIM_PLUGIN_MAGIC; + info->major_version = GAIM_MAJOR_VERSION; + info->minor_version = GAIM_MINOR_VERSION; info->type = GAIM_PLUGIN_STANDARD; info->dependencies = g_list_append(info->dependencies, "core-tcl"); @@ -339,7 +342,6 @@ static GaimPluginLoaderInfo tcl_loader_info = { - GAIM_LOADER_API_VERSION, NULL, tcl_probe_plugin, tcl_load_plugin, @@ -349,7 +351,9 @@ static GaimPluginInfo tcl_info = { - GAIM_PLUGIN_API_VERSION, + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_LOADER, NULL, 0, diff -r 3941c39ccff5 -r f8e395a054e2 plugins/ticker/ticker.c --- a/plugins/ticker/ticker.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/ticker/ticker.c Fri Sep 03 21:21:25 2004 +0000 @@ -32,6 +32,7 @@ #include "debug.h" #include "prpl.h" #include "signals.h" +#include "version.h" #include "gtkblist.h" #include "gtkplugin.h" @@ -317,7 +318,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 plugins/timestamp.c --- a/plugins/timestamp.c Fri Sep 03 03:05:56 2004 +0000 +++ b/plugins/timestamp.c Fri Sep 03 21:21:25 2004 +0000 @@ -28,6 +28,7 @@ #include "debug.h" #include "prefs.h" #include "signals.h" +#include "version.h" #include "gtkimhtml.h" #include "gtkplugin.h" @@ -257,7 +258,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/plugin.c --- a/src/plugin.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/plugin.c Fri Sep 03 21:21:25 2004 +0000 @@ -28,6 +28,7 @@ #include "prpl.h" #include "request.h" #include "signals.h" +#include "version.h" #ifdef _WIN32 # define PLUGIN_EXT ".dll" @@ -239,10 +240,12 @@ return NULL; } - if (plugin->info->api_version != GAIM_PLUGIN_API_VERSION) + if (plugin->info->magic != GAIM_PLUGIN_MAGIC || + plugin->info->major_version != GAIM_MAJOR_VERSION || + plugin->info->minor_version > GAIM_MINOR_VERSION) { - gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: API version mismatch %d (need %d)\n", - plugin->path, plugin->info->api_version, GAIM_PLUGIN_API_VERSION); + gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: API version mismatch %d.%d.x (need %d.%d.x)\n", + plugin->path, plugin->info->major_version, plugin->info->minor_version, GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION); gaim_plugin_destroy(plugin); return NULL; } @@ -479,6 +482,17 @@ if (load_queue != NULL) load_queue = g_list_remove(load_queue, plugin); + /* true, this may leak a little memory if there is a major version + * mismatch, but it's a lot better than trying to free something + * we shouldn't, and crashing while trying to load an old plugin */ + if(plugin->info == NULL || plugin->info->magic != GAIM_PLUGIN_MAGIC || + plugin->info->major_version != GAIM_MAJOR_VERSION) { + if(plugin->handle) + g_module_close(plugin->handle); + g_free(plugin); + return; + } + if (plugin->info != NULL && plugin->info->dependencies != NULL) g_list_free(plugin->info->dependencies); @@ -492,8 +506,7 @@ loader_info = GAIM_PLUGIN_LOADER_INFO(plugin); - if (loader_info != NULL && plugin->info->api_version >= 3 && - loader_info->exts != NULL) + if (loader_info != NULL && loader_info->exts != NULL) { for (exts = GAIM_PLUGIN_LOADER_INFO(plugin)->exts; exts != NULL; @@ -971,11 +984,10 @@ loader_info = GAIM_PLUGIN_LOADER_INFO(plugin); - if (loader_info == NULL || - loader_info->api_version != GAIM_LOADER_API_VERSION) + if (loader_info == NULL) { - gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: API version mismatch %d (need %d)\n", - plugin->path, loader_info->api_version, GAIM_LOADER_API_VERSION); + gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable\n", + plugin->path); return FALSE; } @@ -987,11 +999,10 @@ prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(plugin); - if (prpl_info == NULL || - prpl_info->api_version != GAIM_PRPL_API_VERSION) + if (prpl_info == NULL) { - gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable: API version mismatch %d (need %d)\n", - plugin->path, prpl_info->api_version, GAIM_PRPL_API_VERSION); + gaim_debug(GAIM_DEBUG_ERROR, "plugins", "%s is unloadable\n", + plugin->path); return FALSE; } diff -r 3941c39ccff5 -r f8e395a054e2 src/plugin.h --- a/src/plugin.h Fri Sep 03 03:05:56 2004 +0000 +++ b/src/plugin.h Fri Sep 03 21:21:25 2004 +0000 @@ -59,8 +59,7 @@ #define GAIM_PLUGIN_FLAG_INVISIBLE 0x01 -#define GAIM_PLUGIN_API_VERSION 4 -#define GAIM_LOADER_API_VERSION 2 +#define GAIM_PLUGIN_MAGIC 0xc0cac01a /* this must be greater than 4 */ /** * Detailed information about a plugin. @@ -69,7 +68,9 @@ */ struct _GaimPluginInfo { - unsigned int api_version; + unsigned int magic; + unsigned int major_version; + unsigned int minor_version; GaimPluginType type; char *ui_requirement; unsigned long flags; @@ -99,8 +100,6 @@ */ struct _GaimPluginLoaderInfo { - unsigned int api_version; - GList *exts; gboolean (*probe)(GaimPlugin *plugin); diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/gg/gg.c --- a/src/protocols/gg/gg.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/gg/gg.c Fri Sep 03 21:21:25 2004 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 10819 2004-09-01 01:07:42Z lschiere $ + * $Id: gg.c 10835 2004-09-03 21:21:25Z faceprint $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz * @@ -33,6 +33,7 @@ #include "prpl.h" #include "server.h" #include "util.h" +#include "version.h" #define GG_CONNECT_STEPS 5 @@ -1611,7 +1612,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, 0, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -1674,7 +1674,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/irc/irc.c Fri Sep 03 21:21:25 2004 +0000 @@ -33,6 +33,7 @@ #include "prpl.h" #include "plugin.h" #include "util.h" +#include "version.h" #include "irc.h" @@ -583,7 +584,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -647,7 +647,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/jabber/jabber.c Fri Sep 03 21:21:25 2004 +0000 @@ -32,6 +32,7 @@ #include "request.h" #include "server.h" #include "util.h" +#include "version.h" #include "auth.h" #include "buddy.h" @@ -1479,7 +1480,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -1542,7 +1542,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/msn/msn.c --- a/src/protocols/msn/msn.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/msn/msn.c Fri Sep 03 21:21:25 2004 +0000 @@ -36,6 +36,7 @@ #include "utils.h" #include "prpl.h" #include "util.h" +#include "version.h" #include "switchboard.h" #include "notification.h" @@ -1639,7 +1640,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_MAIL_CHECK, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -1702,7 +1702,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/napster/napster.c --- a/src/protocols/napster/napster.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/napster/napster.c Fri Sep 03 21:21:25 2004 +0000 @@ -28,6 +28,7 @@ #include "prpl.h" #include "proxy.h" #include "util.h" +#include "version.h" #define NAP_SERVER "64.124.41.187" #define NAP_PORT 8888 @@ -571,7 +572,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -634,7 +634,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/novell/novell.c --- a/src/protocols/novell/novell.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/novell/novell.c Fri Sep 03 21:21:25 2004 +0000 @@ -30,6 +30,7 @@ #include "request.h" #include "network.h" #include "privacy.h" +#include "version.h" #define DEFAULT_PORT 8300 #define NOVELL_CONNECT_STEPS 4 @@ -3390,7 +3391,6 @@ } static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, 0, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -3452,7 +3452,9 @@ }; static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/oscar/oscar.c Fri Sep 03 21:21:25 2004 +0000 @@ -41,6 +41,7 @@ #include "proxy.h" #include "request.h" #include "util.h" +#include "version.h" #include "aim.h" #include "md5.h" @@ -7326,7 +7327,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_MAIL_CHECK | OPT_PROTO_IM_IMAGE, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -7399,7 +7399,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/silc/silc.c --- a/src/protocols/silc/silc.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/silc/silc.c Fri Sep 03 21:21:25 2004 +0000 @@ -20,6 +20,7 @@ #include "silcincludes.h" #include "silcclient.h" #include "silcgaim.h" +#include "version.h" extern SilcClientOperations ops; static GaimPlugin *silc_plugin = NULL; @@ -1480,7 +1481,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_PASSWORD_OPTIONAL, NULL, /* user_splits */ @@ -1544,7 +1544,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Fri Sep 03 21:21:25 2004 +0000 @@ -34,6 +34,7 @@ #include "request.h" #include "server.h" #include "util.h" +#include "version.h" #include "sha.h" #include "yahoo.h" @@ -3280,7 +3281,6 @@ static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_MAIL_CHECK | OPT_PROTO_CHAT_TOPIC, NULL, /* user_splits */ NULL, /* protocol_options */ @@ -3343,7 +3343,9 @@ static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/protocols/zephyr/zephyr.c --- a/src/protocols/zephyr/zephyr.c Fri Sep 03 03:05:56 2004 +0000 +++ b/src/protocols/zephyr/zephyr.c Fri Sep 03 21:21:25 2004 +0000 @@ -37,6 +37,7 @@ #include "util.h" #include "cmds.h" #include "privacy.h" +#include "version.h" #include "zephyr.h" #include "internal.h" @@ -2646,7 +2647,6 @@ static GaimPlugin *my_protocol = NULL; static GaimPluginProtocolInfo prpl_info = { - GAIM_PRPL_API_VERSION, OPT_PROTO_CHAT_TOPIC | OPT_PROTO_NO_PASSWORD, NULL, /* ??? user_splits */ NULL, /* ??? protocol_options */ @@ -2708,7 +2708,9 @@ }; static GaimPluginInfo info = { - GAIM_PLUGIN_API_VERSION, /**< api_version */ + GAIM_PLUGIN_MAGIC, + GAIM_MAJOR_VERSION, + GAIM_MINOR_VERSION, GAIM_PLUGIN_PROTOCOL, /**< type */ NULL, /**< ui_requirement */ 0, /**< flags */ diff -r 3941c39ccff5 -r f8e395a054e2 src/prpl.h --- a/src/prpl.h Fri Sep 03 03:05:56 2004 +0000 +++ b/src/prpl.h Fri Sep 03 21:21:25 2004 +0000 @@ -191,8 +191,6 @@ */ struct _GaimPluginProtocolInfo { - unsigned int api_version; /**< API version number. */ - GaimProtocolOptions options; /**< Protocol options. */ GList *user_splits; /* A GList of GaimAccountUserSplit */ @@ -315,11 +313,6 @@ #define GAIM_PLUGIN_PROTOCOL_INFO(plugin) \ ((GaimPluginProtocolInfo *)(plugin)->info->extra_info) -/* It's not like we're going to run out of integers for this version - number, but we only want to really change it once per release. */ -/* GAIM_PRPL_API_VERSION last changed for version: 0.83 */ -#define GAIM_PRPL_API_VERSION 8 - #ifdef __cplusplus extern "C" { #endif diff -r 3941c39ccff5 -r f8e395a054e2 src/version.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/version.h Fri Sep 03 21:21:25 2004 +0000 @@ -0,0 +1,42 @@ +/** + * @file version.h Gaim Versioning + * + * gaim + * + * Gaim is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef _GAIM_VERSION_H_ +#define _GAIM_VERSION_H_ + +#define GAIM_MAJOR_VERSION 1 +#define GAIM_MINOR_VERSION 0 +#define GAIM_MICRO_VERSION 0 + +#define GAIM_VERSION_CHECK(x,y,z) ((x) == GAIM_MAJOR_VERSION && (y) <= GAIM_MINOR_VERSION && (z) <= GAIM_MICRO_VERSION) + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _GAIM_VERSION_H_ */ +