| 28 */ |
28 */ |
| 29 #ifndef _PURPLE_PLUGINS_H_ |
29 #ifndef _PURPLE_PLUGINS_H_ |
| 30 #define _PURPLE_PLUGINS_H_ |
30 #define _PURPLE_PLUGINS_H_ |
| 31 |
31 |
| 32 #include <gplugin.h> |
32 #include <gplugin.h> |
| |
33 |
| |
34 /** Returns an ABI version to set in plugins using major and minor versions */ |
| |
35 #define PURPLE_PLUGIN_ABI_VERSION(major,minor) ((major << 16) + minor) |
| |
36 /** Returns the major version from an ABI version */ |
| |
37 #define PURPLE_PLUGIN_ABI_MAJOR_VERSION(abi) (abi >> 16) |
| |
38 /** Returns the minor version from an ABI version */ |
| |
39 #define PURPLE_PLUGIN_ABI_MINOR_VERSION(abi) (abi & 0xFFFF) |
| 33 |
40 |
| 34 #define PURPLE_TYPE_PLUGIN_INFO (purple_plugin_info_get_type()) |
41 #define PURPLE_TYPE_PLUGIN_INFO (purple_plugin_info_get_type()) |
| 35 #define PURPLE_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_PLUGIN_INFO, PurplePluginInfo)) |
42 #define PURPLE_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_PLUGIN_INFO, PurplePluginInfo)) |
| 36 #define PURPLE_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_PLUGIN_INFO, PurplePluginInfoClass)) |
43 #define PURPLE_PLUGIN_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_PLUGIN_INFO, PurplePluginInfoClass)) |
| 37 #define PURPLE_IS_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PLUGIN_INFO)) |
44 #define PURPLE_IS_PLUGIN_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_PLUGIN_INFO)) |
| 167 * @see purple_plugin_add_action() |
174 * @see purple_plugin_add_action() |
| 168 */ |
175 */ |
| 169 GList *purple_plugin_info_get_actions(PurplePluginInfo *plugin_info); |
176 GList *purple_plugin_info_get_actions(PurplePluginInfo *plugin_info); |
| 170 |
177 |
| 171 /** |
178 /** |
| |
179 * Returns whether or not a plugin is loadable. |
| |
180 * |
| |
181 * If this returns @c FALSE, the plugin is guaranteed to not |
| |
182 * be loadable. However, a return value of @c TRUE does not |
| |
183 * guarantee the plugin is loadable. |
| |
184 * An error is set if the plugin is not loadable. |
| |
185 * |
| |
186 * @param plugin_info The plugin info of the plugin. |
| |
187 * |
| |
188 * @return @c TRUE if the plugin may be loadable, @c FALSE if the plugin is not |
| |
189 * loadable. |
| |
190 * |
| |
191 * @see purple_plugin_info_get_error() |
| |
192 */ |
| |
193 gboolean purple_plugin_info_is_loadable(PurplePluginInfo *plugin_info); |
| |
194 |
| |
195 /** |
| |
196 * If a plugin is not loadable, this returns the reason. |
| |
197 * |
| |
198 * @param plugin_info The plugin info of the plugin. |
| |
199 * |
| |
200 * @return The reason why the plugin is not loadable. |
| |
201 */ |
| |
202 gchar *purple_plugin_info_get_error(PurplePluginInfo *plugin_info); |
| |
203 |
| |
204 /** |
| 172 * Sets a callback to be invoked to retrieve the preferences frame for a plugin. |
205 * Sets a callback to be invoked to retrieve the preferences frame for a plugin. |
| 173 * |
206 * |
| 174 * @param plugin_info The plugin info to set the callback for. |
207 * @param plugin_info The plugin info to set the callback for. |
| 175 * @param callback The callback that returns the preferences frame. |
208 * @param callback The callback that returns the preferences frame. |
| 176 */ |
209 */ |