Question regarding the Telepathy prpl

Florian Quèze florian at instantbird.org
Thu Apr 23 04:52:22 EDT 2009


On Thu, Apr 23, 2009 at 08:22, Mark Doliner <mark at kingant.net> wrote:
> <snip>
> If you add the ability for a single plugin to
> register itself twice, it's possible it could be used by the oscar
> prpl to register prpl-aim and prpl-icq (instead of having two separate
> libaim.so and libicq.so files).

For what is worth, we already do this for Instantbird to work around
limitations in the Mozilla build system that make it impossible (or
overly complicated) to create more than one library from a single
source code folder.

There are probably better ways to do it, but if you don't mind a
little hackery, it's already pretty easy to do, you just have to link
all the files in the oscar folder into a single library and change the
code like this:

diff -ru extract/pidgin-2.5.5/libpurple/protocols/oscar/libaim.c
libpurple/protocols/oscar/libaim.c
--- extract/pidgin-2.5.5/libpurple/protocols/oscar/libaim.c	2008-06-12
06:25:38.000000000 +0200
+++ libpurple/protocols/oscar/libaim.c	2008-11-14 11:10:23.000000000 +0100
@@ -137,9 +137,12 @@
 	NULL
 };

+gboolean purple_init_icq_plugin(void);
+
 static void
 init_plugin(PurplePlugin *plugin)
 {
 	oscar_init(PURPLE_PLUGIN_PROTOCOL_INFO(plugin));
+	purple_init_icq_plugin();
 }

diff -ru extract/pidgin-2.5.5/libpurple/protocols/oscar/libicq.c
libpurple/protocols/oscar/libicq.c
--- extract/pidgin-2.5.5/libpurple/protocols/oscar/libicq.c	2008-09-23
18:34:04.000000000 +0200
+++ libpurple/protocols/oscar/libicq.c	2008-11-14 11:10:23.000000000 +0100
@@ -25,6 +25,7 @@
  */


+#define PURPLE_STATIC_PRPL
 #include "oscarcommon.h"

 static GHashTable *

-- 
Florian Quèze




More information about the Devel mailing list