comparison plugins/ChangeLog @ 392:df5127560034

[gaim-migrate @ 402] More updates to plugins committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 12 Jun 2000 13:07:53 +0000
parents be408b41c172
children f73dc7d32ede
comparison
equal deleted inserted replaced
391:be408b41c172 392:df5127560034
7 big thing that was missing. Please note that I was nice and decided to 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 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. 9 plugins do not have to be recompiled in order for them to still work.
10 10
11 The big thing to note is that gaim_plugin_init no longer returns void, 11 The big thing to note is that gaim_plugin_init no longer returns void,
12 but int. If it returns 0, gaim interprets this as there being no 12 but int. If it returns 1, gaim interprets this as there being no
13 error, and continues with loading as normal. (This should be backwards- 13 error, and continues with loading as normal. (This should be backwards-
14 compatible: returning 0 is the equivalent of returning void.) If it 14 compatible: returning 1 is the equivalent of returning void.) If it
15 returns a non-zero number, there was an error loading detected by the 15 returns a non-zero number, there was an error loading detected by the
16 plugin. At that point, gaim will try to clean things up by removing any 16 plugin. At that point, gaim will try to clean things up by removing any
17 callbacks that have been added by the plugin. It will then try to call 17 callbacks that have been added by the plugin. It will then try to call
18 the plugin's gaim_plugin_error function, if there is one. The function 18 the plugin's gaim_plugin_error function, if there is one. The function
19 should take an int (the int returned by gaim_plugin_init) and return a 19 should take an int (the int returned by gaim_plugin_init) and return a
20 char*. If the char* is not NULL, it is displayed by gaim as an error 20 char*. If the char* is not NULL, it is displayed by gaim as an error
21 message. The plugin is then unloaded and closed and life goes back to 21 message. The plugin is then unloaded and closed and life goes back to
22 normal. If any of that was confusing, it was confusing to me, too. I 22 normal. If any of that was confusing, it was confusing to me, too. I
23 added a plugin, error.c, which should help clear things up. 23 added a plugin, error.c, which should help clear things up.
24
25 There is a new event, event_quit, which signifies that gaim has exited
26 correctly (i.e. didn't segfault). Also, after this event is called, all
27 plugins are removed, and their gaim_plugin_init function is called.
28 This behavior is different from previous versions; however, it is the
29 proper way of doing things, and should have no effect on current
30 plugins. The reason event_quit exists despite plugins being removed at
31 quit is because a plugin can be removed without gaim quitting. They are
32 distinctly separate events.
33
34 The new events mean that some versions of gaim have certain events,
35 others don't. The thing I find fascinating though is that even if a
36 plugin is compiled for a later version, it will still be backwards-
37 compatible, even if it makes use of the newer events. The reason why
38 is the names of the events are stored as integers, and those integers
39 will never match an event in a prior version. This means you don't
40 have to worry about which version the person is using, only which
41 version the person is compiling against. For simplicity's sake, please
42 assume people are compiling against the latest version. For
43 practicality's sake, VERSION is #define'd to be the version you're
44 compiling against, starting with 0.9.20. Prior versions do not have
45 this defined in the standard plugin Makefile.