Mon, 16 Sep 2013 22:53:40 +0530
Refactored finch grouping plugin to use the new plugin API
| 6677 | 1 | #include "internal.h" |
| 2 | #include "debug.h" | |
|
36367
891eea799578
Renamed plugin.[ch] to plugins.[ch], since we (will) no longer have a PurplePlugin structure.
Ankit Vani <a@nevitus.org>
parents:
20288
diff
changeset
|
3 | #include "plugins.h" |
| 9954 | 4 | #include "version.h" |
| 90 | 5 | |
|
13690
bcb427c64568
[gaim-migrate @ 16091]
Richard Laager <rlaager@pidgin.im>
parents:
11256
diff
changeset
|
6 | /** Plugin id : type-author-name (to guarantee uniqueness) */ |
|
bcb427c64568
[gaim-migrate @ 16091]
Richard Laager <rlaager@pidgin.im>
parents:
11256
diff
changeset
|
7 | #define SIMPLE_PLUGIN_ID "core-ewarmenhoven-simple" |
|
bcb427c64568
[gaim-migrate @ 16091]
Richard Laager <rlaager@pidgin.im>
parents:
11256
diff
changeset
|
8 | |
| 36742 | 9 | static PurplePluginInfo * |
| 10 | plugin_query(GError **error) | |
| 11 | { | |
| 12 | const gchar * const authors[] = { | |
| 13 | "Eric Warmenhoven <eric@warmenhoven.org>", | |
| 14 | NULL | |
| 15 | }; | |
| 16 | ||
| 17 | return purple_plugin_info_new( | |
| 18 | "id", SIMPLE_PLUGIN_ID, | |
| 19 | "name", N_("Simple Plugin"), | |
| 20 | "version", DISPLAY_VERSION, | |
| 21 | "category", N_("Testing"), | |
| 22 | "summary", N_("Tests to see that most things are working."), | |
| 23 | "description", N_("Tests to see that most things are working."), | |
| 24 | "authors", authors, | |
| 25 | "website", PURPLE_WEBSITE, | |
| 26 | "abi-version", PURPLE_ABI_VERSION, | |
| 27 | NULL | |
| 28 | ); | |
| 29 | } | |
| 30 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
3565
diff
changeset
|
31 | static gboolean |
| 36742 | 32 | plugin_load(PurplePlugin *plugin, GError **error) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
3565
diff
changeset
|
33 | { |
| 15884 | 34 | purple_debug(PURPLE_DEBUG_INFO, "simple", "simple plugin loaded.\n"); |
|
94
0c6ba3d3fa90
[gaim-migrate @ 104]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
92
diff
changeset
|
35 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
3565
diff
changeset
|
36 | return TRUE; |
| 90 | 37 | } |
| 38 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
3565
diff
changeset
|
39 | static gboolean |
| 36742 | 40 | plugin_unload(PurplePlugin *plugin, GError **error) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
3565
diff
changeset
|
41 | { |
| 15884 | 42 | purple_debug(PURPLE_DEBUG_INFO, "simple", "simple plugin unloaded.\n"); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
3565
diff
changeset
|
43 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
3565
diff
changeset
|
44 | return TRUE; |
| 90 | 45 | } |
|
92
b2cc29da946e
[gaim-migrate @ 102]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
90
diff
changeset
|
46 | |
| 36742 | 47 | PURPLE_PLUGIN_INIT(simple, plugin_query, plugin_load, plugin_unload); |