1.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/plugin.h Sun Jun 21 22:04:11 2009 -0400
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,712 +0,0 @@
1.4 -/**
1.5 - * @file plugin.h Plugin API
1.6 - * @ingroup core
1.7 - * @see @ref plugin-signals
1.8 - * @see @ref plugin-ids
1.9 - * @see @ref plugin-i18n
1.10 - */
1.11 -
1.12 -/* purple
1.13 - *
1.14 - * Purple is the legal property of its developers, whose names are too numerous
1.15 - * to list here. Please refer to the COPYRIGHT file distributed with this
1.16 - * source distribution.
1.17 - *
1.18 - * This program is free software; you can redistribute it and/or modify
1.19 - * it under the terms of the GNU General Public License as published by
1.20 - * the Free Software Foundation; either version 2 of the License, or
1.21 - * (at your option) any later version.
1.22 - *
1.23 - * This program is distributed in the hope that it will be useful,
1.24 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.25 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.26 - * GNU General Public License for more details.
1.27 - *
1.28 - * You should have received a copy of the GNU General Public License
1.29 - * along with this program; if not, write to the Free Software
1.30 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
1.31 - */
1.32 -#ifndef _PURPLE_PLUGIN_H_
1.33 -#define _PURPLE_PLUGIN_H_
1.34 -
1.35 -#include <glib/glist.h>
1.36 -#include <gmodule.h>
1.37 -#include "signals.h"
1.38 -#include "value.h"
1.39 -
1.40 -/** @copydoc _PurplePlugin */
1.41 -typedef struct _PurplePlugin PurplePlugin;
1.42 -/** @copydoc _PurplePluginInfo */
1.43 -typedef struct _PurplePluginInfo PurplePluginInfo;
1.44 -/** @copydoc _PurplePluginUiInfo */
1.45 -typedef struct _PurplePluginUiInfo PurplePluginUiInfo;
1.46 -/** @copydoc _PurplePluginLoaderInfo */
1.47 -typedef struct _PurplePluginLoaderInfo PurplePluginLoaderInfo;
1.48 -
1.49 -/** @copydoc _PurplePluginAction */
1.50 -typedef struct _PurplePluginAction PurplePluginAction;
1.51 -
1.52 -typedef int PurplePluginPriority; /**< Plugin priority. */
1.53 -
1.54 -#include "pluginpref.h"
1.55 -
1.56 -/**
1.57 - * Plugin types.
1.58 - */
1.59 -typedef enum
1.60 -{
1.61 - PURPLE_PLUGIN_UNKNOWN = -1, /**< Unknown type. */
1.62 - PURPLE_PLUGIN_STANDARD = 0, /**< Standard plugin. */
1.63 - PURPLE_PLUGIN_LOADER, /**< Loader plugin. */
1.64 - PURPLE_PLUGIN_PROTOCOL /**< Protocol plugin. */
1.65 -
1.66 -} PurplePluginType;
1.67 -
1.68 -#define PURPLE_PRIORITY_DEFAULT 0
1.69 -#define PURPLE_PRIORITY_HIGHEST 9999
1.70 -#define PURPLE_PRIORITY_LOWEST -9999
1.71 -
1.72 -#define PURPLE_PLUGIN_FLAG_INVISIBLE 0x01
1.73 -
1.74 -#define PURPLE_PLUGIN_MAGIC 5 /* once we hit 6.0.0 I think we can remove this */
1.75 -
1.76 -/**
1.77 - * Detailed information about a plugin.
1.78 - *
1.79 - * This is used in the version 2.0 API and up.
1.80 - */
1.81 -struct _PurplePluginInfo
1.82 -{
1.83 - unsigned int magic;
1.84 - unsigned int major_version;
1.85 - unsigned int minor_version;
1.86 - PurplePluginType type;
1.87 - char *ui_requirement;
1.88 - unsigned long flags;
1.89 - GList *dependencies;
1.90 - PurplePluginPriority priority;
1.91 -
1.92 - char *id;
1.93 - char *name;
1.94 - char *version;
1.95 - char *summary;
1.96 - char *description;
1.97 - char *author;
1.98 - char *homepage;
1.99 -
1.100 - /**
1.101 - * If a plugin defines a 'load' function, and it returns FALSE,
1.102 - * then the plugin will not be loaded.
1.103 - */
1.104 - gboolean (*load)(PurplePlugin *plugin);
1.105 - gboolean (*unload)(PurplePlugin *plugin);
1.106 - void (*destroy)(PurplePlugin *plugin);
1.107 -
1.108 - void *ui_info; /**< Used only by UI-specific plugins to build a preference screen with a custom UI */
1.109 - void *extra_info;
1.110 - PurplePluginUiInfo *prefs_info; /**< Used by any plugin to display preferences. If #ui_info has been specified, this will be ignored. */
1.111 - GList *(*actions)(PurplePlugin *plugin, gpointer context);
1.112 -
1.113 - void (*_purple_reserved1)(void);
1.114 - void (*_purple_reserved2)(void);
1.115 - void (*_purple_reserved3)(void);
1.116 - void (*_purple_reserved4)(void);
1.117 -};
1.118 -
1.119 -/**
1.120 - * Extra information for loader plugins.
1.121 - */
1.122 -struct _PurplePluginLoaderInfo
1.123 -{
1.124 - GList *exts;
1.125 -
1.126 - gboolean (*probe)(PurplePlugin *plugin);
1.127 - gboolean (*load)(PurplePlugin *plugin);
1.128 - gboolean (*unload)(PurplePlugin *plugin);
1.129 - void (*destroy)(PurplePlugin *plugin);
1.130 -
1.131 - void (*_purple_reserved1)(void);
1.132 - void (*_purple_reserved2)(void);
1.133 - void (*_purple_reserved3)(void);
1.134 - void (*_purple_reserved4)(void);
1.135 -};
1.136 -
1.137 -/**
1.138 - * A plugin handle.
1.139 - */
1.140 -struct _PurplePlugin
1.141 -{
1.142 - gboolean native_plugin; /**< Native C plugin. */
1.143 - gboolean loaded; /**< The loaded state. */
1.144 - void *handle; /**< The module handle. */
1.145 - char *path; /**< The path to the plugin. */
1.146 - PurplePluginInfo *info; /**< The plugin information. */
1.147 - char *error;
1.148 - void *ipc_data; /**< IPC data. */
1.149 - void *extra; /**< Plugin-specific data. */
1.150 - gboolean unloadable; /**< Unloadable */
1.151 - GList *dependent_plugins; /**< Plugins depending on this */
1.152 -
1.153 - void (*_purple_reserved1)(void);
1.154 - void (*_purple_reserved2)(void);
1.155 - void (*_purple_reserved3)(void);
1.156 - void (*_purple_reserved4)(void);
1.157 -};
1.158 -
1.159 -#define PURPLE_PLUGIN_LOADER_INFO(plugin) \
1.160 - ((PurplePluginLoaderInfo *)(plugin)->info->extra_info)
1.161 -
1.162 -struct _PurplePluginUiInfo {
1.163 - PurplePluginPrefFrame *(*get_plugin_pref_frame)(PurplePlugin *plugin);
1.164 -
1.165 - int page_num; /**< Reserved */
1.166 - PurplePluginPrefFrame *frame; /**< Reserved */
1.167 -
1.168 - void (*_purple_reserved1)(void);
1.169 - void (*_purple_reserved2)(void);
1.170 - void (*_purple_reserved3)(void);
1.171 - void (*_purple_reserved4)(void);
1.172 -};
1.173 -
1.174 -#define PURPLE_PLUGIN_HAS_PREF_FRAME(plugin) \
1.175 - ((plugin)->info != NULL && (plugin)->info->prefs_info != NULL)
1.176 -
1.177 -#define PURPLE_PLUGIN_UI_INFO(plugin) \
1.178 - ((PurplePluginUiInfo*)(plugin)->info->prefs_info)
1.179 -
1.180 -
1.181 -/**
1.182 - * The structure used in the actions member of PurplePluginInfo
1.183 - */
1.184 -struct _PurplePluginAction {
1.185 - char *label;
1.186 - void (*callback)(PurplePluginAction *);
1.187 -
1.188 - /** set to the owning plugin */
1.189 - PurplePlugin *plugin;
1.190 -
1.191 - /** NULL for plugin actions menu, set to the PurpleConnection for
1.192 - account actions menu */
1.193 - gpointer context;
1.194 -
1.195 - gpointer user_data;
1.196 -};
1.197 -
1.198 -#define PURPLE_PLUGIN_HAS_ACTIONS(plugin) \
1.199 - ((plugin)->info != NULL && (plugin)->info->actions != NULL)
1.200 -
1.201 -#define PURPLE_PLUGIN_ACTIONS(plugin, context) \
1.202 - (PURPLE_PLUGIN_HAS_ACTIONS(plugin)? \
1.203 - (plugin)->info->actions(plugin, context): NULL)
1.204 -
1.205 -
1.206 -/**
1.207 - * Handles the initialization of modules.
1.208 - */
1.209 -#if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL)
1.210 -# define _FUNC_NAME(x) purple_init_##x##_plugin
1.211 -# define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
1.212 - gboolean _FUNC_NAME(pluginname)(void);\
1.213 - gboolean _FUNC_NAME(pluginname)(void) { \
1.214 - PurplePlugin *plugin = purple_plugin_new(TRUE, NULL); \
1.215 - plugin->info = &(plugininfo); \
1.216 - initfunc((plugin)); \
1.217 - purple_plugin_load((plugin)); \
1.218 - return purple_plugin_register(plugin); \
1.219 - }
1.220 -#else /* PURPLE_PLUGINS && !PURPLE_STATIC_PRPL */
1.221 -# define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
1.222 - G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin); \
1.223 - G_MODULE_EXPORT gboolean purple_init_plugin(PurplePlugin *plugin) { \
1.224 - plugin->info = &(plugininfo); \
1.225 - initfunc((plugin)); \
1.226 - return purple_plugin_register(plugin); \
1.227 - }
1.228 -#endif
1.229 -
1.230 -
1.231 -#ifdef __cplusplus
1.232 -extern "C" {
1.233 -#endif
1.234 -
1.235 -/**************************************************************************/
1.236 -/** @name Plugin API */
1.237 -/**************************************************************************/
1.238 -/*@{*/
1.239 -
1.240 -/**
1.241 - * Creates a new plugin structure.
1.242 - *
1.243 - * @param native Whether or not the plugin is native.
1.244 - * @param path The path to the plugin, or @c NULL if statically compiled.
1.245 - *
1.246 - * @return A new PurplePlugin structure.
1.247 - */
1.248 -PurplePlugin *purple_plugin_new(gboolean native, const char *path);
1.249 -
1.250 -/**
1.251 - * Probes a plugin, retrieving the information on it and adding it to the
1.252 - * list of available plugins.
1.253 - *
1.254 - * @param filename The plugin's filename.
1.255 - *
1.256 - * @return The plugin handle.
1.257 - *
1.258 - * @see purple_plugin_load()
1.259 - * @see purple_plugin_destroy()
1.260 - */
1.261 -PurplePlugin *purple_plugin_probe(const char *filename);
1.262 -
1.263 -/**
1.264 - * Registers a plugin and prepares it for loading.
1.265 - *
1.266 - * This shouldn't be called by anything but the internal module code.
1.267 - * Plugins should use the PURPLE_INIT_PLUGIN() macro to register themselves
1.268 - * with the core.
1.269 - *
1.270 - * @param plugin The plugin to register.
1.271 - *
1.272 - * @return @c TRUE if the plugin was registered successfully. Otherwise
1.273 - * @c FALSE is returned (this happens if the plugin does not contain
1.274 - * the necessary information).
1.275 - */
1.276 -gboolean purple_plugin_register(PurplePlugin *plugin);
1.277 -
1.278 -/**
1.279 - * Attempts to load a previously probed plugin.
1.280 - *
1.281 - * @param plugin The plugin to load.
1.282 - *
1.283 - * @return @c TRUE if successful, or @c FALSE otherwise.
1.284 - *
1.285 - * @see purple_plugin_reload()
1.286 - * @see purple_plugin_unload()
1.287 - */
1.288 -gboolean purple_plugin_load(PurplePlugin *plugin);
1.289 -
1.290 -/**
1.291 - * Unloads the specified plugin.
1.292 - *
1.293 - * @param plugin The plugin handle.
1.294 - *
1.295 - * @return @c TRUE if successful, or @c FALSE otherwise.
1.296 - *
1.297 - * @see purple_plugin_load()
1.298 - * @see purple_plugin_reload()
1.299 - */
1.300 -gboolean purple_plugin_unload(PurplePlugin *plugin);
1.301 -
1.302 -/**
1.303 - * Disable a plugin.
1.304 - *
1.305 - * This function adds the plugin to a list of plugins to "disable at the next
1.306 - * startup" by excluding said plugins from the list of plugins to save. The
1.307 - * UI needs to call purple_plugins_save_loaded() after calling this for it
1.308 - * to have any effect.
1.309 - *
1.310 - * @since 2.3.0
1.311 - */
1.312 -void purple_plugin_disable(PurplePlugin *plugin);
1.313 -
1.314 -/**
1.315 - * Reloads a plugin.
1.316 - *
1.317 - * @param plugin The old plugin handle.
1.318 - *
1.319 - * @return @c TRUE if successful, or @c FALSE otherwise.
1.320 - *
1.321 - * @see purple_plugin_load()
1.322 - * @see purple_plugin_unload()
1.323 - */
1.324 -gboolean purple_plugin_reload(PurplePlugin *plugin);
1.325 -
1.326 -/**
1.327 - * Unloads a plugin and destroys the structure from memory.
1.328 - *
1.329 - * @param plugin The plugin handle.
1.330 - */
1.331 -void purple_plugin_destroy(PurplePlugin *plugin);
1.332 -
1.333 -/**
1.334 - * Returns whether or not a plugin is currently loaded.
1.335 - *
1.336 - * @param plugin The plugin.
1.337 - *
1.338 - * @return @c TRUE if loaded, or @c FALSE otherwise.
1.339 - */
1.340 -gboolean purple_plugin_is_loaded(const PurplePlugin *plugin);
1.341 -
1.342 -/**
1.343 - * Returns whether or not a plugin is unloadable.
1.344 - *
1.345 - * If this returns @c TRUE, the plugin is guaranteed to not
1.346 - * be loadable. However, a return value of @c FALSE does not
1.347 - * guarantee the plugin is loadable.
1.348 - *
1.349 - * @param plugin The plugin.
1.350 - *
1.351 - * @return @c TRUE if the plugin is known to be unloadable,\
1.352 - * @c FALSE otherwise
1.353 - */
1.354 -gboolean purple_plugin_is_unloadable(const PurplePlugin *plugin);
1.355 -
1.356 -/**
1.357 - * Returns a plugin's id.
1.358 - *
1.359 - * @param plugin The plugin.
1.360 - *
1.361 - * @return The plugin's id.
1.362 - */
1.363 -const gchar *purple_plugin_get_id(const PurplePlugin *plugin);
1.364 -
1.365 -/**
1.366 - * Returns a plugin's name.
1.367 - *
1.368 - * @param plugin The plugin.
1.369 - *
1.370 - * @return THe name of the plugin, or @c NULL.
1.371 - */
1.372 -const gchar *purple_plugin_get_name(const PurplePlugin *plugin);
1.373 -
1.374 -/**
1.375 - * Returns a plugin's version.
1.376 - *
1.377 - * @param plugin The plugin.
1.378 - *
1.379 - * @return The plugin's version or @c NULL.
1.380 - */
1.381 -const gchar *purple_plugin_get_version(const PurplePlugin *plugin);
1.382 -
1.383 -/**
1.384 - * Returns a plugin's summary.
1.385 - *
1.386 - * @param plugin The plugin.
1.387 - *
1.388 - * @return The plugin's summary.
1.389 - */
1.390 -const gchar *purple_plugin_get_summary(const PurplePlugin *plugin);
1.391 -
1.392 -/**
1.393 - * Returns a plugin's description.
1.394 - *
1.395 - * @param plugin The plugin.
1.396 - *
1.397 - * @return The plugin's description.
1.398 - */
1.399 -const gchar *purple_plugin_get_description(const PurplePlugin *plugin);
1.400 -
1.401 -/**
1.402 - * Returns a plugin's author.
1.403 - *
1.404 - * @param plugin The plugin.
1.405 - *
1.406 - * @return The plugin's author.
1.407 - */
1.408 -const gchar *purple_plugin_get_author(const PurplePlugin *plugin);
1.409 -
1.410 -/**
1.411 - * Returns a plugin's homepage.
1.412 - *
1.413 - * @param plugin The plugin.
1.414 - *
1.415 - * @return The plugin's homepage.
1.416 - */
1.417 -const gchar *purple_plugin_get_homepage(const PurplePlugin *plugin);
1.418 -
1.419 -/*@}*/
1.420 -
1.421 -/**************************************************************************/
1.422 -/** @name Plugin IPC API */
1.423 -/**************************************************************************/
1.424 -/*@{*/
1.425 -
1.426 -/**
1.427 - * Registers an IPC command in a plugin.
1.428 - *
1.429 - * @param plugin The plugin to register the command with.
1.430 - * @param command The name of the command.
1.431 - * @param func The function to execute.
1.432 - * @param marshal The marshalling function.
1.433 - * @param ret_value The return value type.
1.434 - * @param num_params The number of parameters.
1.435 - * @param ... The parameter types.
1.436 - *
1.437 - * @return TRUE if the function was registered successfully, or
1.438 - * FALSE otherwise.
1.439 - */
1.440 -gboolean purple_plugin_ipc_register(PurplePlugin *plugin, const char *command,
1.441 - PurpleCallback func,
1.442 - PurpleSignalMarshalFunc marshal,
1.443 - PurpleValue *ret_value, int num_params, ...);
1.444 -
1.445 -/**
1.446 - * Unregisters an IPC command in a plugin.
1.447 - *
1.448 - * @param plugin The plugin to unregister the command from.
1.449 - * @param command The name of the command.
1.450 - */
1.451 -void purple_plugin_ipc_unregister(PurplePlugin *plugin, const char *command);
1.452 -
1.453 -/**
1.454 - * Unregisters all IPC commands in a plugin.
1.455 - *
1.456 - * @param plugin The plugin to unregister the commands from.
1.457 - */
1.458 -void purple_plugin_ipc_unregister_all(PurplePlugin *plugin);
1.459 -
1.460 -/**
1.461 - * Returns a list of value types used for an IPC command.
1.462 - *
1.463 - * @param plugin The plugin.
1.464 - * @param command The name of the command.
1.465 - * @param ret_value The returned return value.
1.466 - * @param num_params The returned number of parameters.
1.467 - * @param params The returned list of parameters.
1.468 - *
1.469 - * @return TRUE if the command was found, or FALSE otherwise.
1.470 - */
1.471 -gboolean purple_plugin_ipc_get_params(PurplePlugin *plugin, const char *command,
1.472 - PurpleValue **ret_value, int *num_params,
1.473 - PurpleValue ***params);
1.474 -
1.475 -/**
1.476 - * Executes an IPC command.
1.477 - *
1.478 - * @param plugin The plugin to execute the command on.
1.479 - * @param command The name of the command.
1.480 - * @param ok TRUE if the call was successful, or FALSE otherwise.
1.481 - * @param ... The parameters to pass.
1.482 - *
1.483 - * @return The return value, which will be NULL if the command doesn't
1.484 - * return a value.
1.485 - */
1.486 -void *purple_plugin_ipc_call(PurplePlugin *plugin, const char *command,
1.487 - gboolean *ok, ...);
1.488 -
1.489 -/*@}*/
1.490 -
1.491 -/**************************************************************************/
1.492 -/** @name Plugins API */
1.493 -/**************************************************************************/
1.494 -/*@{*/
1.495 -
1.496 -/**
1.497 - * Add a new directory to search for plugins
1.498 - *
1.499 - * @param path The new search path.
1.500 - */
1.501 -void purple_plugins_add_search_path(const char *path);
1.502 -
1.503 -/**
1.504 - * Unloads all loaded plugins.
1.505 - */
1.506 -void purple_plugins_unload_all(void);
1.507 -
1.508 -/**
1.509 - * Destroys all registered plugins.
1.510 - */
1.511 -void purple_plugins_destroy_all(void);
1.512 -
1.513 -/**
1.514 - * Saves the list of loaded plugins to the specified preference key
1.515 - *
1.516 - * @param key The preference key to save the list of plugins to.
1.517 - */
1.518 -void purple_plugins_save_loaded(const char *key);
1.519 -
1.520 -/**
1.521 - * Attempts to load all the plugins in the specified preference key
1.522 - * that were loaded when purple last quit.
1.523 - *
1.524 - * @param key The preference key containing the list of plugins.
1.525 - */
1.526 -void purple_plugins_load_saved(const char *key);
1.527 -
1.528 -/**
1.529 - * Probes for plugins in the registered module paths.
1.530 - *
1.531 - * @param ext The extension type to probe for, or @c NULL for all.
1.532 - *
1.533 - * @see purple_plugin_set_probe_path()
1.534 - */
1.535 -void purple_plugins_probe(const char *ext);
1.536 -
1.537 -/**
1.538 - * Returns whether or not plugin support is enabled.
1.539 - *
1.540 - * @return TRUE if plugin support is enabled, or FALSE otherwise.
1.541 - */
1.542 -gboolean purple_plugins_enabled(void);
1.543 -
1.544 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
1.545 -/**
1.546 - * Registers a function that will be called when probing is finished.
1.547 - *
1.548 - * @param func The callback function.
1.549 - * @param data Data to pass to the callback.
1.550 - * @deprecated If you need this, ask for a plugin-probe signal to be added.
1.551 - */
1.552 -void purple_plugins_register_probe_notify_cb(void (*func)(void *), void *data);
1.553 -#endif
1.554 -
1.555 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
1.556 -/**
1.557 - * Unregisters a function that would be called when probing is finished.
1.558 - *
1.559 - * @param func The callback function.
1.560 - * @deprecated If you need this, ask for a plugin-probe signal to be added.
1.561 - */
1.562 -void purple_plugins_unregister_probe_notify_cb(void (*func)(void *));
1.563 -#endif
1.564 -
1.565 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
1.566 -/**
1.567 - * Registers a function that will be called when a plugin is loaded.
1.568 - *
1.569 - * @param func The callback function.
1.570 - * @param data Data to pass to the callback.
1.571 - * @deprecated Use the plugin-load signal instead.
1.572 - */
1.573 -void purple_plugins_register_load_notify_cb(void (*func)(PurplePlugin *, void *),
1.574 - void *data);
1.575 -#endif
1.576 -
1.577 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
1.578 -/**
1.579 - * Unregisters a function that would be called when a plugin is loaded.
1.580 - *
1.581 - * @param func The callback function.
1.582 - * @deprecated Use the plugin-load signal instead.
1.583 - */
1.584 -void purple_plugins_unregister_load_notify_cb(void (*func)(PurplePlugin *, void *));
1.585 -#endif
1.586 -
1.587 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
1.588 -/**
1.589 - * Registers a function that will be called when a plugin is unloaded.
1.590 - *
1.591 - * @param func The callback function.
1.592 - * @param data Data to pass to the callback.
1.593 - * @deprecated Use the plugin-unload signal instead.
1.594 - */
1.595 -void purple_plugins_register_unload_notify_cb(void (*func)(PurplePlugin *, void *),
1.596 - void *data);
1.597 -#endif
1.598 -
1.599 -#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_PLUGIN_C_)
1.600 -/**
1.601 - * Unregisters a function that would be called when a plugin is unloaded.
1.602 - *
1.603 - * @param func The callback function.
1.604 - * @deprecated Use the plugin-unload signal instead.
1.605 - */
1.606 -void purple_plugins_unregister_unload_notify_cb(void (*func)(PurplePlugin *,
1.607 - void *));
1.608 -#endif
1.609 -
1.610 -/**
1.611 - * Finds a plugin with the specified name.
1.612 - *
1.613 - * @param name The plugin name.
1.614 - *
1.615 - * @return The plugin if found, or @c NULL if not found.
1.616 - */
1.617 -PurplePlugin *purple_plugins_find_with_name(const char *name);
1.618 -
1.619 -/**
1.620 - * Finds a plugin with the specified filename (filename with a path).
1.621 - *
1.622 - * @param filename The plugin filename.
1.623 - *
1.624 - * @return The plugin if found, or @c NULL if not found.
1.625 - */
1.626 -PurplePlugin *purple_plugins_find_with_filename(const char *filename);
1.627 -
1.628 -/**
1.629 - * Finds a plugin with the specified basename (filename without a path).
1.630 - *
1.631 - * @param basename The plugin basename.
1.632 - *
1.633 - * @return The plugin if found, or @c NULL if not found.
1.634 - */
1.635 -PurplePlugin *purple_plugins_find_with_basename(const char *basename);
1.636 -
1.637 -/**
1.638 - * Finds a plugin with the specified plugin ID.
1.639 - *
1.640 - * @param id The plugin ID.
1.641 - *
1.642 - * @return The plugin if found, or @c NULL if not found.
1.643 - */
1.644 -PurplePlugin *purple_plugins_find_with_id(const char *id);
1.645 -
1.646 -/**
1.647 - * Returns a list of all loaded plugins.
1.648 - *
1.649 - * @constreturn A list of all loaded plugins.
1.650 - */
1.651 -GList *purple_plugins_get_loaded(void);
1.652 -
1.653 -/**
1.654 - * Returns a list of all valid protocol plugins. A protocol
1.655 - * plugin is considered invalid if it does not contain the call
1.656 - * to the PURPLE_INIT_PLUGIN() macro, or if it was compiled
1.657 - * against an incompatable API version.
1.658 - *
1.659 - * @constreturn A list of all protocol plugins.
1.660 - */
1.661 -GList *purple_plugins_get_protocols(void);
1.662 -
1.663 -/**
1.664 - * Returns a list of all plugins, whether loaded or not.
1.665 - *
1.666 - * @constreturn A list of all plugins.
1.667 - */
1.668 -GList *purple_plugins_get_all(void);
1.669 -
1.670 -/*@}*/
1.671 -
1.672 -/**************************************************************************/
1.673 -/** @name Plugins SubSytem API */
1.674 -/**************************************************************************/
1.675 -/*@{*/
1.676 -
1.677 -/**
1.678 - * Returns the plugin subsystem handle.
1.679 - *
1.680 - * @return The plugin sybsystem handle.
1.681 - */
1.682 -void *purple_plugins_get_handle(void);
1.683 -
1.684 -/**
1.685 - * Initializes the plugin subsystem
1.686 - */
1.687 -void purple_plugins_init(void);
1.688 -
1.689 -/**
1.690 - * Uninitializes the plugin subsystem
1.691 - */
1.692 -void purple_plugins_uninit(void);
1.693 -
1.694 -/*@}*/
1.695 -
1.696 -/**
1.697 - * Allocates and returns a new PurplePluginAction.
1.698 - *
1.699 - * @param label The description of the action to show to the user.
1.700 - * @param callback The callback to call when the user selects this action.
1.701 - */
1.702 -PurplePluginAction *purple_plugin_action_new(const char* label, void (*callback)(PurplePluginAction *));
1.703 -
1.704 -/**
1.705 - * Frees a PurplePluginAction
1.706 - *
1.707 - * @param action The PurplePluginAction to free.
1.708 - */
1.709 -void purple_plugin_action_free(PurplePluginAction *action);
1.710 -
1.711 -#ifdef __cplusplus
1.712 -}
1.713 -#endif
1.714 -
1.715 -#endif /* _PURPLE_PLUGIN_H_ */