Wed, 14 Jun 2000 02:12:25 +0000
[gaim-migrate @ 414]
It's a good thing I proofread things; otherwise, there would be a lot of
confused people when 0.9.20 comes out.
| 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
c426f81e75ce
[gaim-migrate @ 408]
Eric Warmenhoven <warmenhoven@yahoo.com>
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
c426f81e75ce
[gaim-migrate @ 408]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
394
diff
changeset
|
14 | compatible: returning 0/1 is the equivalent of returning void.) If it |
|
c426f81e75ce
[gaim-migrate @ 408]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
394
diff
changeset
|
15 | returns a number less than 0, there was an error loading detected by |
|
394
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
16 | the plugin. At that point, gaim will try to clean things up by removing |
|
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
17 | any callbacks that have been added by the plugin. It will then try to |
|
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
18 | call the plugin's gaim_plugin_error function, if there is one. The |
|
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
19 | function should take an int (the int returned by gaim_plugin_init) and |
|
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
20 | return a char*. If the char* is not NULL, it is displayed by gaim as an |
|
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
21 | error message. The plugin is then unloaded and closed and life goes |
|
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
22 | back to normal. If any of that was confusing, it was confusing to me, |
|
1f5ad5c7ab1b
[gaim-migrate @ 404]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
392
diff
changeset
|
23 | too. I added a plugin, error.c, which should help clear things up. |
|
392
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
24 | |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
25 | There is a new event, event_quit, which signifies that gaim has exited |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
26 | correctly (i.e. didn't segfault). Also, after this event is called, all |
|
404
0881630e6d25
[gaim-migrate @ 414]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
398
diff
changeset
|
27 | plugins are removed, and their gaim_plugin_remove function is called. |
|
392
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
28 | This behavior is different from previous versions; however, it is the |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
29 | proper way of doing things, and should have no effect on current |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
30 | plugins. The reason event_quit exists despite plugins being removed at |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
31 | quit is because a plugin can be removed without gaim quitting. They are |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
32 | distinctly separate events. |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
33 | |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
34 | The new events mean that some versions of gaim have certain events, |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
35 | others don't. The thing I find fascinating though is that even if a |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
36 | plugin is compiled for a later version, it will still be backwards- |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
37 | compatible, even if it makes use of the newer events. The reason why |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
38 | is the names of the events are stored as integers, and those integers |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
39 | will never match an event in a prior version. This means you don't |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
40 | have to worry about which version the person is using, only which |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
41 | version the person is compiling against. For simplicity's sake, please |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
42 | assume people are compiling against the latest version. For |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
43 | practicality's sake, VERSION is #define'd to be the version you're |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
44 | compiling against, starting with 0.9.20. Prior versions do not have |
|
d3edc6236c3f
[gaim-migrate @ 402]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
391
diff
changeset
|
45 | this defined in the standard plugin Makefile. |