Fri, 27 Mar 2009 09:09:00 +0000
Free some memory if we exit early due to an error. Thanks to
Mayank Jain Nawal's email to the devel list for pointing this
out. Oh, and I didn't test these changes at all... I guess I
probably should.
| 11660 | 1 | /* |
| 2 | * Mono Plugin Loader | |
| 3 | * | |
| 4 | * -- Thanks to the perl plugin loader for all the great tips ;-) | |
| 5 | * | |
| 6 | * Eoin Coffey | |
| 7 | */ | |
| 8 | ||
| 9 | #ifdef HAVE_CONFIG_H | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
10 | # include <config.h> |
| 11660 | 11 | #endif |
| 12 | ||
| 13 | #include "internal.h" | |
| 14 | #include "debug.h" | |
| 15 | #include "plugin.h" | |
| 16 | #include "version.h" | |
| 17 | #include "mono-helper.h" | |
| 18 | ||
| 19 | #define MONO_PLUGIN_ID "core-mono" | |
| 20 | ||
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
21 | /****************************************************************************** |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
22 | * Loader Stuff |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
23 | *****************************************************************************/ |
| 11660 | 24 | /* probes the given plugin to determine if its a plugin */ |
| 15884 | 25 | static gboolean probe_mono_plugin(PurplePlugin *plugin) |
| 11660 | 26 | { |
| 27 | MonoAssembly *assm; | |
| 28 | MonoMethod *m = NULL; | |
| 29 | MonoObject *plugin_info; | |
|
15938
1b037158411e
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
30 | gboolean found_load = FALSE, found_unload = FALSE, found_destroy = FALSE; |
| 11660 | 31 | gpointer iter = NULL; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
32 | |
| 15884 | 33 | PurplePluginInfo *info; |
| 34 | PurpleMonoPlugin *mplug; | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
35 | |
| 11660 | 36 | char *file = plugin->path; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
37 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
38 | assm = mono_domain_assembly_open(ml_get_domain(), file); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
39 | |
| 11660 | 40 | if (!assm) { |
| 41 | return FALSE; | |
|
26560
efe8c89bad1b
Remove a wee bit of stray whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
42 | } |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
43 | |
| 15884 | 44 | purple_debug(PURPLE_DEBUG_INFO, "mono", "Probing plugin\n"); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
45 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
46 | if (ml_is_api_dll(mono_assembly_get_image(assm))) { |
|
26562
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
47 | purple_debug_info("mono", "Found our PurpleAPI.dll\n"); |
|
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
48 | mono_assembly_close(assm); |
| 11660 | 49 | return FALSE; |
| 50 | } | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
51 | |
| 15884 | 52 | mplug = g_new0(PurpleMonoPlugin, 1); |
|
26560
efe8c89bad1b
Remove a wee bit of stray whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
53 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
54 | mplug->signal_data = NULL; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
55 | |
| 11660 | 56 | mplug->assm = assm; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
57 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
58 | mplug->klass = ml_find_plugin_class(mono_assembly_get_image(mplug->assm)); |
| 11660 | 59 | if (!mplug->klass) { |
| 15884 | 60 | purple_debug(PURPLE_DEBUG_ERROR, "mono", "no plugin class in \'%s\'\n", file); |
|
26562
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
61 | mono_assembly_close(assm); |
|
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
62 | g_free(mplug); |
| 11660 | 63 | return FALSE; |
| 64 | } | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
65 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
66 | mplug->obj = mono_object_new(ml_get_domain(), mplug->klass); |
| 11660 | 67 | if (!mplug->obj) { |
| 15884 | 68 | purple_debug(PURPLE_DEBUG_ERROR, "mono", "obj not valid\n"); |
|
26562
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
69 | mono_assembly_close(assm); |
|
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
70 | g_free(mplug); |
| 11660 | 71 | return FALSE; |
| 72 | } | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
73 | |
| 11660 | 74 | mono_runtime_object_init(mplug->obj); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
75 | |
| 11660 | 76 | while ((m = mono_class_get_methods(mplug->klass, &iter))) { |
|
15938
1b037158411e
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
77 | purple_debug_info("mono", "plugin method: %s\n", mono_method_get_name(m)); |
| 11660 | 78 | if (strcmp(mono_method_get_name(m), "Load") == 0) { |
| 79 | mplug->load = m; | |
| 80 | found_load = TRUE; | |
| 81 | } else if (strcmp(mono_method_get_name(m), "Unload") == 0) { | |
| 82 | mplug->unload = m; | |
| 83 | found_unload = TRUE; | |
| 84 | } else if (strcmp(mono_method_get_name(m), "Destroy") == 0) { | |
| 85 | mplug->destroy = m; | |
| 86 | found_destroy = TRUE; | |
| 87 | } | |
| 88 | } | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
89 | |
|
15938
1b037158411e
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
90 | if (!(found_load && found_unload && found_destroy)) { |
| 15884 | 91 | purple_debug(PURPLE_DEBUG_ERROR, "mono", "did not find the required methods\n"); |
|
26562
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
92 | mono_assembly_close(assm); |
|
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
93 | g_free(mplug); |
| 11660 | 94 | return FALSE; |
| 95 | } | |
|
26560
efe8c89bad1b
Remove a wee bit of stray whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
96 | |
|
15938
1b037158411e
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
97 | plugin_info = ml_get_info_prop(mplug->obj); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
98 | |
| 11660 | 99 | /* now that the methods are filled out we can populate |
| 100 | the info struct with all the needed info */ | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
101 | |
|
26562
c279f7316767
Free some memory if we exit early due to an error. Thanks to
Mark Doliner <markdoliner@pidgin.im>
parents:
26560
diff
changeset
|
102 | info = g_new0(PurplePluginInfo, 1); |
|
15938
1b037158411e
SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
103 | info->id = ml_get_prop_string(plugin_info, "Id"); |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
104 | info->name = ml_get_prop_string(plugin_info, "Name"); |
|
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
105 | info->version = ml_get_prop_string(plugin_info, "Version"); |
|
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
106 | info->summary = ml_get_prop_string(plugin_info, "Summary"); |
|
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
107 | info->description = ml_get_prop_string(plugin_info, "Description"); |
|
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
108 | info->author = ml_get_prop_string(plugin_info, "Author"); |
|
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
109 | info->homepage = ml_get_prop_string(plugin_info, "Homepage"); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
110 | |
| 15884 | 111 | info->magic = PURPLE_PLUGIN_MAGIC; |
| 112 | info->major_version = PURPLE_MAJOR_VERSION; | |
| 113 | info->minor_version = PURPLE_MINOR_VERSION; | |
| 114 | info->type = PURPLE_PLUGIN_STANDARD; | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
115 | |
| 11660 | 116 | /* this plugin depends on us; duh */ |
| 117 | info->dependencies = g_list_append(info->dependencies, MONO_PLUGIN_ID); | |
| 118 | mplug->plugin = plugin; | |
|
26560
efe8c89bad1b
Remove a wee bit of stray whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
119 | |
| 11660 | 120 | plugin->info = info; |
| 121 | info->extra_info = mplug; | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
122 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
123 | ml_add_plugin(mplug); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
124 | |
| 15884 | 125 | return purple_plugin_register(plugin); |
| 11660 | 126 | } |
| 127 | ||
| 128 | /* Loads a Mono Plugin by calling 'load' in the class */ | |
| 15884 | 129 | static gboolean load_mono_plugin(PurplePlugin *plugin) |
| 11660 | 130 | { |
| 15884 | 131 | PurpleMonoPlugin *mplug; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
132 | |
| 15884 | 133 | purple_debug(PURPLE_DEBUG_INFO, "mono", "Loading plugin\n"); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
134 | |
| 15884 | 135 | mplug = (PurpleMonoPlugin*)plugin->info->extra_info; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
136 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
137 | ml_invoke(mplug->load, mplug->obj, NULL); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
138 | |
| 11660 | 139 | return TRUE; |
| 140 | } | |
| 141 | ||
| 142 | /* Unloads a Mono Plugin by calling 'unload' in the class */ | |
| 15884 | 143 | static gboolean unload_mono_plugin(PurplePlugin *plugin) |
| 11660 | 144 | { |
| 15884 | 145 | PurpleMonoPlugin *mplug; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
146 | |
| 15884 | 147 | purple_debug(PURPLE_DEBUG_INFO, "mono", "Unloading plugin\n"); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
148 | |
| 15884 | 149 | mplug = (PurpleMonoPlugin*)plugin->info->extra_info; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
150 | |
| 15884 | 151 | purple_signals_disconnect_by_handle((gpointer)mplug->klass); |
|
11996
858bd928831c
[gaim-migrate @ 14289]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11980
diff
changeset
|
152 | g_list_foreach(mplug->signal_data, (GFunc)g_free, NULL); |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
153 | g_list_free(mplug->signal_data); |
|
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
154 | mplug->signal_data = NULL; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
155 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
156 | ml_invoke(mplug->unload, mplug->obj, NULL); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
157 | |
| 11660 | 158 | return TRUE; |
| 159 | } | |
| 160 | ||
| 15884 | 161 | static void destroy_mono_plugin(PurplePlugin *plugin) |
| 11660 | 162 | { |
| 15884 | 163 | PurpleMonoPlugin *mplug; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
164 | |
| 15884 | 165 | purple_debug(PURPLE_DEBUG_INFO, "mono", "Destroying plugin\n"); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
166 | |
| 15884 | 167 | mplug = (PurpleMonoPlugin*)plugin->info->extra_info; |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
168 | |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
169 | ml_invoke(mplug->destroy, mplug->obj, NULL); |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
170 | |
| 11660 | 171 | if (plugin->info) { |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
172 | g_free(plugin->info->name); |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
173 | g_free(plugin->info->version); |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
174 | g_free(plugin->info->summary); |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
175 | g_free(plugin->info->description); |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
176 | g_free(plugin->info->author); |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
177 | g_free(plugin->info->homepage); |
| 11660 | 178 | } |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
179 | |
| 11660 | 180 | if (mplug) { |
| 181 | if (mplug->assm) { | |
| 182 | mono_assembly_close(mplug->assm); | |
| 183 | } | |
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
184 | |
| 11660 | 185 | g_free(mplug); |
| 186 | mplug = NULL; | |
| 187 | } | |
| 188 | } | |
| 189 | ||
|
11786
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
190 | /****************************************************************************** |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
191 | * Plugin Stuff |
|
d0067c6e542a
[gaim-migrate @ 14077]
Gary Kramlich <grim@reaperworld.com>
parents:
11679
diff
changeset
|
192 | *****************************************************************************/ |
| 15884 | 193 | static void plugin_destroy(PurplePlugin *plugin) |
| 11660 | 194 | { |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
195 | ml_uninit(); |
| 11660 | 196 | } |
| 197 | ||
| 15884 | 198 | static PurplePluginLoaderInfo loader_info = |
| 11660 | 199 | { |
| 200 | NULL, | |
| 201 | probe_mono_plugin, | |
| 202 | load_mono_plugin, | |
| 203 | unload_mono_plugin, | |
|
16750
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
204 | destroy_mono_plugin, |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
205 | |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
206 | /* padding */ |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
207 | NULL, |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
208 | NULL, |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
209 | NULL, |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
210 | NULL |
| 11660 | 211 | }; |
| 212 | ||
| 15884 | 213 | static PurplePluginInfo info = |
| 11660 | 214 | { |
| 15884 | 215 | PURPLE_PLUGIN_MAGIC, |
| 216 | PURPLE_MAJOR_VERSION, | |
| 217 | PURPLE_MINOR_VERSION, | |
| 218 | PURPLE_PLUGIN_LOADER, | |
| 11660 | 219 | NULL, |
| 220 | 0, | |
| 221 | NULL, | |
| 15884 | 222 | PURPLE_PRIORITY_DEFAULT, |
| 11660 | 223 | MONO_PLUGIN_ID, |
| 224 | N_("Mono Plugin Loader"), | |
|
20288
5ca925a094e2
applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16750
diff
changeset
|
225 | DISPLAY_VERSION, |
| 11660 | 226 | N_("Loads .NET plugins with Mono."), |
| 227 | N_("Loads .NET plugins with Mono."), | |
| 228 | "Eoin Coffey <ecoffey@simla.colostate.edu>", | |
| 15884 | 229 | PURPLE_WEBSITE, |
| 11660 | 230 | NULL, |
| 231 | NULL, | |
| 232 | plugin_destroy, | |
| 233 | NULL, | |
| 234 | &loader_info, | |
| 235 | NULL, | |
|
16750
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
236 | NULL, |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
237 | |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
238 | /* padding */ |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
239 | NULL, |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
240 | NULL, |
|
a568944eee52
Updating the loaders since I missed them since I'm not building any of them right now
Gary Kramlich <grim@reaperworld.com>
parents:
15938
diff
changeset
|
241 | NULL, |
| 11660 | 242 | NULL |
| 243 | }; | |
| 244 | ||
| 15884 | 245 | static void init_plugin(PurplePlugin *plugin) |
| 11660 | 246 | { |
|
11980
fe5c2c58508c
[gaim-migrate @ 14273]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
11952
diff
changeset
|
247 | ml_init(); |
|
26560
efe8c89bad1b
Remove a wee bit of stray whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
20288
diff
changeset
|
248 | |
| 11660 | 249 | loader_info.exts = g_list_append(loader_info.exts, "dll"); |
| 250 | } | |
| 251 | ||
| 15884 | 252 | PURPLE_INIT_PLUGIN(mono, init_plugin, info) |