diff 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
line wrap: on
line diff
--- a/libpurple/plugin.h	Wed Oct 10 02:18:48 2007 +0000
+++ b/libpurple/plugin.h	Wed Oct 10 03:57:39 2007 +0000
@@ -70,11 +70,6 @@
  *
  * This is used in the version 2.0 API and up.
  */
-/* TODO We need to figure out exactly what parts of this are required. The
- * dependent plugin unloading stuff was causing crashes with perl and tcl
- * plugins because they didn't set ids and the dependency code was requiring
- * them. Then we need to actually make sure that plugins have all the right
- * parts before loading them. */
 struct _PurplePluginInfo
 {
 	unsigned int magic;
@@ -296,6 +291,18 @@
 gboolean purple_plugin_unload(PurplePlugin *plugin);
 
 /**
+ * Disable a plugin.
+ *
+ * This function adds the plugin to a list of plugins to "disable at the next
+ * startup" by excluding said plugins from the list of plugins to save.  The
+ * UI needs to call purple_plugins_save_loaded() after calling this for it
+ * to have any effect.
+ *
+ * @since 2.3.0
+ */
+void purple_plugin_disable(PurplePlugin *plugin);
+
+/**
  * Reloads a plugin.
  *
  * @param plugin The old plugin handle.
@@ -525,53 +532,71 @@
  */
 gboolean purple_plugins_enabled(void);
 
+#ifndef PURPLE_DISABLE_DEPRECATED
 /**
  * Registers a function that will be called when probing is finished.
  *
  * @param func The callback function.
  * @param data Data to pass to the callback.
+ * @deprecated If you need this, ask for a plugin-probe signal to be added.
  */
 void purple_plugins_register_probe_notify_cb(void (*func)(void *), void *data);
+#endif
 
+#ifndef PURPLE_DISABLE_DEPRECATED
 /**
  * Unregisters a function that would be called when probing is finished.
  *
  * @param func The callback function.
+ * @deprecated If you need this, ask for a plugin-probe signal to be added.
  */
 void purple_plugins_unregister_probe_notify_cb(void (*func)(void *));
+#endif
 
+#ifndef PURPLE_DISABLE_DEPRECATED
 /**
  * Registers a function that will be called when a plugin is loaded.
  *
  * @param func The callback function.
  * @param data Data to pass to the callback.
+ * @deprecated Use the plugin-load signal instead.
  */
 void purple_plugins_register_load_notify_cb(void (*func)(PurplePlugin *, void *),
 										  void *data);
+#endif
 
+#ifndef PURPLE_DISABLE_DEPRECATED
 /**
  * Unregisters a function that would be called when a plugin is loaded.
  *
  * @param func The callback function.
+ * @deprecated Use the plugin-load signal instead.
  */
 void purple_plugins_unregister_load_notify_cb(void (*func)(PurplePlugin *, void *));
+#endif
 
+#ifndef PURPLE_DISABLE_DEPRECATED
 /**
  * Registers a function that will be called when a plugin is unloaded.
  *
  * @param func The callback function.
  * @param data Data to pass to the callback.
+ * @deprecated Use the plugin-unload signal instead.
  */
 void purple_plugins_register_unload_notify_cb(void (*func)(PurplePlugin *, void *),
 											void *data);
+#endif
 
+#ifndef PURPLE_DISABLE_DEPRECATED
 /**
  * Unregisters a function that would be called when a plugin is unloaded.
  *
  * @param func The callback function.
+ * @deprecated Use the plugin-unload signal instead.
  */
 void purple_plugins_unregister_unload_notify_cb(void (*func)(PurplePlugin *,
 														   void *));
+#endif
 
 /**
  * Finds a plugin with the specified name.