comparison libpurple/plugin.h @ 21204:8a89c2caf9d8

propagate from branch 'im.pidgin.pidgin' (head 1e697229b1c9a564fa1e509cc9a4a83da6e664df) to branch 'im.pidgin.pidgin.next.minor' (head 74cedc552bbe5f33b7933fdfb6fe0b7105f6c576)
author Richard Laager <rlaager@wiktel.com>
date Wed, 10 Oct 2007 03:57:39 +0000
parents f296be2a1039 fb8f9bf86315
children 6de09629f091
comparison
equal deleted inserted replaced
20871:34fc2a999977 21204:8a89c2caf9d8
68 /** 68 /**
69 * Detailed information about a plugin. 69 * Detailed information about a plugin.
70 * 70 *
71 * This is used in the version 2.0 API and up. 71 * This is used in the version 2.0 API and up.
72 */ 72 */
73 /* TODO We need to figure out exactly what parts of this are required. The
74 * dependent plugin unloading stuff was causing crashes with perl and tcl
75 * plugins because they didn't set ids and the dependency code was requiring
76 * them. Then we need to actually make sure that plugins have all the right
77 * parts before loading them. */
78 struct _PurplePluginInfo 73 struct _PurplePluginInfo
79 { 74 {
80 unsigned int magic; 75 unsigned int magic;
81 unsigned int major_version; 76 unsigned int major_version;
82 unsigned int minor_version; 77 unsigned int minor_version;
294 * @see purple_plugin_reload() 289 * @see purple_plugin_reload()
295 */ 290 */
296 gboolean purple_plugin_unload(PurplePlugin *plugin); 291 gboolean purple_plugin_unload(PurplePlugin *plugin);
297 292
298 /** 293 /**
294 * Disable a plugin.
295 *
296 * This function adds the plugin to a list of plugins to "disable at the next
297 * startup" by excluding said plugins from the list of plugins to save. The
298 * UI needs to call purple_plugins_save_loaded() after calling this for it
299 * to have any effect.
300 *
301 * @since 2.3.0
302 */
303 void purple_plugin_disable(PurplePlugin *plugin);
304
305 /**
299 * Reloads a plugin. 306 * Reloads a plugin.
300 * 307 *
301 * @param plugin The old plugin handle. 308 * @param plugin The old plugin handle.
302 * 309 *
303 * @return @c TRUE if successful, or @c FALSE otherwise. 310 * @return @c TRUE if successful, or @c FALSE otherwise.
523 * 530 *
524 * @return TRUE if plugin support is enabled, or FALSE otherwise. 531 * @return TRUE if plugin support is enabled, or FALSE otherwise.
525 */ 532 */
526 gboolean purple_plugins_enabled(void); 533 gboolean purple_plugins_enabled(void);
527 534
535 #ifndef PURPLE_DISABLE_DEPRECATED
528 /** 536 /**
529 * Registers a function that will be called when probing is finished. 537 * Registers a function that will be called when probing is finished.
530 * 538 *
531 * @param func The callback function. 539 * @param func The callback function.
532 * @param data Data to pass to the callback. 540 * @param data Data to pass to the callback.
541 * @deprecated If you need this, ask for a plugin-probe signal to be added.
533 */ 542 */
534 void purple_plugins_register_probe_notify_cb(void (*func)(void *), void *data); 543 void purple_plugins_register_probe_notify_cb(void (*func)(void *), void *data);
535 544 #endif
545
546 #ifndef PURPLE_DISABLE_DEPRECATED
536 /** 547 /**
537 * Unregisters a function that would be called when probing is finished. 548 * Unregisters a function that would be called when probing is finished.
538 * 549 *
539 * @param func The callback function. 550 * @param func The callback function.
551 * @deprecated If you need this, ask for a plugin-probe signal to be added.
540 */ 552 */
541 void purple_plugins_unregister_probe_notify_cb(void (*func)(void *)); 553 void purple_plugins_unregister_probe_notify_cb(void (*func)(void *));
542 554 #endif
555
556 #ifndef PURPLE_DISABLE_DEPRECATED
543 /** 557 /**
544 * Registers a function that will be called when a plugin is loaded. 558 * Registers a function that will be called when a plugin is loaded.
545 * 559 *
546 * @param func The callback function. 560 * @param func The callback function.
547 * @param data Data to pass to the callback. 561 * @param data Data to pass to the callback.
562 * @deprecated Use the plugin-load signal instead.
548 */ 563 */
549 void purple_plugins_register_load_notify_cb(void (*func)(PurplePlugin *, void *), 564 void purple_plugins_register_load_notify_cb(void (*func)(PurplePlugin *, void *),
550 void *data); 565 void *data);
551 566 #endif
567
568 #ifndef PURPLE_DISABLE_DEPRECATED
552 /** 569 /**
553 * Unregisters a function that would be called when a plugin is loaded. 570 * Unregisters a function that would be called when a plugin is loaded.
554 * 571 *
555 * @param func The callback function. 572 * @param func The callback function.
573 * @deprecated Use the plugin-load signal instead.
556 */ 574 */
557 void purple_plugins_unregister_load_notify_cb(void (*func)(PurplePlugin *, void *)); 575 void purple_plugins_unregister_load_notify_cb(void (*func)(PurplePlugin *, void *));
558 576 #endif
577
578 #ifndef PURPLE_DISABLE_DEPRECATED
559 /** 579 /**
560 * Registers a function that will be called when a plugin is unloaded. 580 * Registers a function that will be called when a plugin is unloaded.
561 * 581 *
562 * @param func The callback function. 582 * @param func The callback function.
563 * @param data Data to pass to the callback. 583 * @param data Data to pass to the callback.
584 * @deprecated Use the plugin-unload signal instead.
564 */ 585 */
565 void purple_plugins_register_unload_notify_cb(void (*func)(PurplePlugin *, void *), 586 void purple_plugins_register_unload_notify_cb(void (*func)(PurplePlugin *, void *),
566 void *data); 587 void *data);
567 588 #endif
589
590 #ifndef PURPLE_DISABLE_DEPRECATED
568 /** 591 /**
569 * Unregisters a function that would be called when a plugin is unloaded. 592 * Unregisters a function that would be called when a plugin is unloaded.
570 * 593 *
571 * @param func The callback function. 594 * @param func The callback function.
595 * @deprecated Use the plugin-unload signal instead.
572 */ 596 */
573 void purple_plugins_unregister_unload_notify_cb(void (*func)(PurplePlugin *, 597 void purple_plugins_unregister_unload_notify_cb(void (*func)(PurplePlugin *,
574 void *)); 598 void *));
599 #endif
575 600
576 /** 601 /**
577 * Finds a plugin with the specified name. 602 * Finds a plugin with the specified name.
578 * 603 *
579 * @param name The plugin name. 604 * @param name The plugin name.