Mercurial > pidgin
annotate plugins/ChangeLog @ 398:59d97cd251ff
[gaim-migrate @ 408]
this better work
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 12 Jun 2000 13:59:03 +0000 |
parents | f73dc7d32ede |
children | 3d94cc1dc424 |
rev | line source |
---|---|
391 | 1 version 0.9.20: |
2 It's 3 am the night before finals, it's obviously a good time to hack | |
3 gaim. | |
4 | |
5 The first thing to note is that there are about 9 new events plugins | |
6 can attach to, most of them dealing with chat, since I know that was a | |
7 big thing that was missing. Please note that I was nice and decided to | |
8 tack these extra events onto the end of the enum, which means that | |
9 plugins do not have to be recompiled in order for them to still work. | |
10 | |
11 The big thing to note is that gaim_plugin_init no longer returns void, | |
398
59d97cd251ff
[gaim-migrate @ 408]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
394
diff
changeset
|
12 but int. If it returns 0+, gaim interprets this as there being no |
391 | 13 error, and continues with loading as normal. (This should be backwards- |
398
59d97cd251ff
[gaim-migrate @ 408]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
394
diff
changeset
|
14 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
|
15 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
|
16 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
|
17 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
|
18 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
|
19 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
|
20 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
|
21 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
|
22 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
|
23 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
|
24 |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
25 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
|
26 correctly (i.e. didn't segfault). Also, after this event is called, all |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
27 plugins are removed, and their gaim_plugin_init function is called. |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
28 This behavior is different from previous versions; however, it is the |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
29 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
|
30 plugins. The reason event_quit exists despite plugins being removed at |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
31 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
|
32 distinctly separate events. |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
33 |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
34 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
|
35 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
|
36 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
|
37 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
|
38 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
|
39 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
|
40 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
|
41 version the person is compiling against. For simplicity's sake, please |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
42 assume people are compiling against the latest version. For |
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
43 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
|
44 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
|
45 this defined in the standard plugin Makefile. |