annotate plugins/ChangeLog @ 1067:649199f4730e

[gaim-migrate @ 1077] more attempts to prevent segfaults due to logging committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 04 Nov 2000 20:20:27 +0000
parents ece2d1543b20
children 4ebde910e95c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1000
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
1 version 0.11.0:
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
2 Gaim is now multi-connection based. This represents a significant
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
3 change. Most of the code was modified, though most of the modifications
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
4 were small (referencing an int as part of a struct as opposed to as a
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
5 global int). Plugins need to be modified to match the new function
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
6 declarations and such.
1000
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
7
1047
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
8 Gaim now uses GModule from the GLib library for plugins. This brings
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
9 a few changes. gaim_plugin_init is now passed a GModule *, which it
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
10 should use for all of its callbacks. gaim_plugin_init now returns
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
11 char * instead of int instead of void. If gaim_plugin_init returns
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
12 NULL then gaim assumes everything was OK and proceeds. Otherwise, it
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
13 displays the error message and unloads your plugin. There is no more
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
14 gaim_plugin_error (at least, that gaim itself will use. You may wish
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
15 to simply return gaim_plugin_error() in gaim_plugin_init).
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
16
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
17 Because gaim now uses GModule, plugins are opened with RTLD_GLOBAL. I
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
18 had previously wanted to avoid this, but there are simply too many
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
19 benefits gained from using GModule to reject it for this reason. This
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
20 means that plugins can now call each other's functions. Beware, this
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
21 has good and bad implications. If you call a function, it will look
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
22 first in your plugin, and then in gaim's global symbol table, including
ece2d1543b20 [gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 1038
diff changeset
23 other plugins.
1000
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
24
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
25 The new system allows for protocol plugins. New protocols (including
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
26 Yahoo, MSN, IRC, ICQ, etc) can be loaded dynamically. However, most
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
27 of these plugins are going to be controlled by the gaim maintainers.
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
28 If you have interest in writing a protocol plugin, please talk to one
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
29 of us before you start.
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
30
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
31 That's about all that I'm going to talk about. My SN is EWarmenhoven
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
32 if you have any questions (like what the hell struct gaim_connection is
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
33 and what its relation to struct aim_user is).
91b7377e7b45 [gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 834
diff changeset
34
591
a26eb4c472d8 [gaim-migrate @ 601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 445
diff changeset
35 version 0.10.0:
a26eb4c472d8 [gaim-migrate @ 601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 445
diff changeset
36 Rather than have a separate CFLAGS and LDFLAGS for the plugins than
a26eb4c472d8 [gaim-migrate @ 601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 445
diff changeset
37 for gaim, and doing all kinds of crazy things to work around the
a26eb4c472d8 [gaim-migrate @ 601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 445
diff changeset
38 problems that creates, the plugins now have the same CFLAGS and LIBS.
a26eb4c472d8 [gaim-migrate @ 601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 445
diff changeset
39 The plugins also have PLUGIN_LIBS which can be passed at make time.
a26eb4c472d8 [gaim-migrate @ 601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 445
diff changeset
40 This makes things like #ifdef USE_APPLET and #ifdef USE_PERL much more
775
9614e69f68ca [gaim-migrate @ 785]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 591
diff changeset
41 reliable. (#include "config.h" in order to get all the #defines)
591
a26eb4c472d8 [gaim-migrate @ 601]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 445
diff changeset
42
780
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
43 The internals of gaim plugin events got modified slightly. It should
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
44 have no effect on existing plugins or the way plugins are made. The
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
45 change was to make my life easier adding perl. It should also make
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
46 adding new plugin events even easier than before (though I doubt that
834
bac7089491c1 [gaim-migrate @ 844]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
47 any more will ever be added). Also, events are printed to the debug
bac7089491c1 [gaim-migrate @ 844]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
48 window.
780
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
49
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
50 event_buddy_away was being triggered every blist_update for every away
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
51 buddy. This got fixed, but now when you sign on, event_buddy_away may
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
52 be called before event_buddy_signon. Not that it should matter much.
c714def9cebb [gaim-migrate @ 790]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 775
diff changeset
53
808
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 780
diff changeset
54 Just after I finish saying that no more events will be added, I go and
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 780
diff changeset
55 add one. Go figure. Anyway, it's event_new_conversation. Enough people
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 780
diff changeset
56 asked me to add it, and I found it useful enough, that I finally did
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 780
diff changeset
57 add it. It gets passed a char *, the name of the person who the
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 780
diff changeset
58 conversation is with. This gets triggered when a new conversation
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 780
diff changeset
59 window is created, in case you couldn't figure it out on your own.
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 780
diff changeset
60
834
bac7089491c1 [gaim-migrate @ 844]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
61 event_blist_update wasn't being called if you weren't reporting idle
bac7089491c1 [gaim-migrate @ 844]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
62 time or if you were idle. This got fixed.
bac7089491c1 [gaim-migrate @ 844]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
63
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64 version 0.9.20:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
65 It's 3 am the night before finals, it's obviously a good time to hack
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
66 gaim.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67
425
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
68 This became quite long, and if you don't want to read it all, here's
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
69 the important stuff summed up:
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
70 - 9 new events (see SIGNALS file for more details)
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
71 - int gaim_plugin_init(void *) (no longer returns void, see error.c)
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
72 - void gaim_plugin_unload(void *) (to allow plugin to remove itself)
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
73 - can only load 1 instance of the same plugin
445
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
74 - PLUGIN_LIBS for extra libraries for plugin
425
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
75
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76 The first thing to note is that there are about 9 new events plugins
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77 can attach to, most of them dealing with chat, since I know that was a
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 big thing that was missing. Please note that I was nice and decided to
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
79 tack these extra events onto the end of the enum, which means that
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
80 plugins do not have to be recompiled in order for them to still work.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
81
425
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
82 The big change is that gaim_plugin_init no longer returns void, but
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
83 int. If it returns 0+, gaim interprets this as there being no error,
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
84 and continues with loading as normal. (This should be backwards-
398
59d97cd251ff [gaim-migrate @ 408]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 394
diff changeset
85 compatible: returning 0/1 is the equivalent of returning void.) If it
59d97cd251ff [gaim-migrate @ 408]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 394
diff changeset
86 returns a number less than 0, there was an error loading detected by
394
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
87 the plugin. At that point, gaim will try to clean things up by removing
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
88 any callbacks that have been added by the plugin. It will then try to
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
89 call the plugin's gaim_plugin_error function, if there is one. The
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
90 function should take an int (the int returned by gaim_plugin_init) and
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
91 return a char*. If the char* is not NULL, it is displayed by gaim as an
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
92 error message. The plugin is then unloaded and closed and life goes
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
93 back to normal. If any of that was confusing, it was confusing to me,
f73dc7d32ede [gaim-migrate @ 404]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
94 too. I added a plugin, error.c, which should help clear things up.
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
95
425
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
96 Another big thing to note is that plugins can unload themselves. A good
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
97 example of why this is useful is a ticker plugin. If the user closes
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
98 the ticker window, they obviously want the plugin to be unloaded. Gaim
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
99 has no way of knowing that; therefore, the plugin must tell gaim that
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
100 it is to be unloaded. To have a plugin unload itself, simply call
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
101 gaim_plugin_unload(void *) (the void* is the handle passed to
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
102 gaim_plugin_init). Because you are explicitly asking to be removed,
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
103 gaim assumes that you have done any cleanup already, and so does not
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
104 call gaim_plugin_remove. Rather, it simply removes your callbacks and
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
105 unloads the plugin. (There is some trickery to this. Think about it:
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
106 your plugin calls the function, your plugin is unloaded, and execution
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
107 returns to your plugin, which no longer exists. This would cause a
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
108 segfault if it behaved exactly as described. Instead, the plugin is
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
109 removed from the list of plugins, and removed 5 seconds later. By then
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
110 the plugin should be effectively gone, though still in memory.)
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
111
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
112 In previous versions of gaim, you could load multiple copies of the
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
113 same plugin. This is no longer the case. The reason for this was that
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
114 there were not two instances of the plugin in memory; rather, one copy
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
115 and two structures representing the same plugin. Then, the callbacks
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
116 would be called twice (since the plugin would most likely act the same
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
117 across multiple instances), and when one was unloaded, all callbacks
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
118 for both instances would be removed. Rather than deal with two copies
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
119 of the same plugin, it is easier and cleaner to only handle one.
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
120
445
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
121 Sometimes it's necessary to link a plugin with libraries other than the
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
122 ones needed for GTK. Before, it was necessary to modify the Makefile to
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
123 do so (which was usually messy since it's generated by GNU automake).
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
124 Now, you can simply set the environment variable PLUGIN_LIBS to be the
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
125 extra libraries you want to link in. For example, to link plugin.c with
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
126 the math library, you can run the command
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
127 PLUGIN_LIBS=-lm make plugin.so
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
128 To link with multiple plugins, make sure to indicate spaces, e.g.
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
129 PLUGIN_LIBS='-lm -lcrypt' make encrypt.so
e4c34ca88d9b [gaim-migrate @ 455]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
130
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
131 There is a new event, event_quit, which signifies that gaim has exited
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
132 correctly (i.e. didn't segfault). Also, after this event is called, all
404
3d94cc1dc424 [gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 398
diff changeset
133 plugins are removed, and their gaim_plugin_remove function is called.
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
134 This behavior is different from previous versions; however, it is the
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
135 proper way of doing things, and should have no effect on current
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
136 plugins. The reason event_quit exists despite plugins being removed at
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
137 quit is because a plugin can be removed without gaim quitting. They are
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
138 distinctly separate events.
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
139
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
140 The new events mean that some versions of gaim have certain events,
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
141 others don't. The thing I find fascinating though is that even if a
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
142 plugin is compiled for a later version, it will still be backwards-
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
143 compatible, even if it makes use of the newer events. The reason why
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
144 is the names of the events are stored as integers, and those integers
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
145 will never match an event in a prior version. This means you don't
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
146 have to worry about which version the person is using, only which
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
147 version the person is compiling against. For simplicity's sake, please
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
148 assume people are compiling against the latest version. For
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
149 practicality's sake, VERSION is #define'd to be the version you're
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
150 compiling against, starting with 0.9.20. Prior versions do not have
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
151 this defined in the standard plugin Makefile.