libpurple/plugins.h

branch
soc.2013.gobjectification.plugins
changeset 36467
52aa83c47311
parent 36463
b1ce7f2998e4
child 36468
64d359bbe6f6
--- a/libpurple/plugins.h	Wed Aug 07 15:55:20 2013 +0530
+++ b/libpurple/plugins.h	Wed Aug 07 19:42:45 2013 +0530
@@ -70,6 +70,7 @@
 #define PURPLE_PLUGIN_GET_CLASS(obj)   G_OBJECT_GET_CLASS(obj)
 
 #define GPLUGIN_PLUGIN_INFO_FLAGS_LOAD_ON_QUERY 0
+#define GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL      0
 
 typedef GObject PurplePlugin;
 typedef GObjectClass PurplePluginClass;
@@ -306,6 +307,17 @@
 GList *purple_plugin_get_actions(const PurplePlugin *plugin);
 
 /**
+ * Returns whether a plugin is an internal plugin. Internal plugins provide
+ * required additional functionality to the libpurple core. Examples of such
+ * plugins are in-tree protocol plugins, loaders etc.
+ *
+ * @param plugin The plugin.
+ *
+ * @return @c TRUE if the plugin is an internal plugin, @c FALSE otherwise.
+ */
+gboolean purple_plugin_is_internal(const PurplePlugin *plugin);
+
+/**
  * Returns whether or not a plugin is loadable.
  *
  * If this returns @c FALSE, the plugin is guaranteed to not
@@ -323,16 +335,6 @@
 gboolean purple_plugin_is_loadable(const PurplePlugin *plugin);
 
 /**
- * Returns whether a plugin auto-loads on query or not. Plugins that auto-loaded
- * on query are not saved by purple_plugins_save_loaded().
- *
- * @param plugin The plugin.
- *
- * @return @c TRUE if the plugin auto-loads on query, @c FALSE if it doesn't.
- */
-gboolean purple_plugin_loads_on_query(const PurplePlugin *plugin);
-
-/**
  * If a plugin is not loadable, this returns the reason.
  *
  * @param plugin The plugin.
@@ -384,6 +386,12 @@
  * "preferences_frame"  (PurplePluginPrefFrameCallback) Callback that returns
  *                      a preferences frame for the plugin.
  *
+ * Additionally, you can provide a "flags" property if the plugin is to be
+ * distributed with libpurple, the value for which should be a bitwise
+ * combination of:                                                           \n
+ * GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL: Internal plugin, not shown in lists.  \n
+ * GPLUGIN_PLUGIN_INFO_FLAGS_LOAD_ON_QUERY: Auto-load on query.              \n
+ *
  * @param first_property  The first property name
  * @param ...  The value of the first property, followed optionally by more
  *             name/value pairs, followed by @c NULL
@@ -559,7 +567,6 @@
  * that are to be loaded on query.
  *
  * @see purple_plugins_add_search_path()
- * @see purple_plugin_loads_on_query()
  */
 void purple_plugins_refresh(void);
 
@@ -582,7 +589,8 @@
 PurplePlugin *purple_plugins_find_by_filename(const char *filename);
 
 /**
- * Saves the list of loaded plugins to the specified preference key
+ * Saves the list of loaded plugins to the specified preference key.
+ * Plugins that are set to load on query are not saved.
  *
  * @param key The preference key to save the list of plugins to.
  */

mercurial