libpurple/plugins.h

changeset 37402
404282320cf8
parent 37146
b5b9c75a4b54
child 38016
3ac0882cd563
equal deleted inserted replaced
37401:11138a33d498 37402:404282320cf8
96 96
97 typedef struct _PurplePluginAction PurplePluginAction; 97 typedef struct _PurplePluginAction PurplePluginAction;
98 98
99 #include "pluginpref.h" 99 #include "pluginpref.h"
100 100
101 typedef void (*PurplePluginActionCb)(PurplePluginAction *); 101 /**
102 typedef GList *(*PurplePluginActionsCb)(PurplePlugin *); 102 * PurplePluginActionCb:
103 typedef gchar *(*PurplePluginExtraCb)(PurplePlugin *); 103 * @action: the action information.
104 typedef PurplePluginPrefFrame *(*PurplePluginPrefFrameCb)(PurplePlugin *); 104 *
105 typedef gpointer (*PurplePluginPrefRequestCb)(PurplePlugin *); 105 * A function called when the related Action Menu is activated.
106 */
107 typedef void (*PurplePluginActionCb)(PurplePluginAction *action);
108
109 /**
110 * PurplePluginActionsCb:
111 * @plugin: the plugin associated with this callback.
112 *
113 * Returns a list of actions the plugin can perform.
114 *
115 * Returns: (transfer none): A list of actions the plugin can perform.
116 */
117 typedef GList *(*PurplePluginActionsCb)(PurplePlugin *plugin);
118
119 /**
120 * PurplePluginExtraCb:
121 * @plugin: the plugin associated with this callback.
122 *
123 * Gives extra information about the plguin.
124 *
125 * Returns: a newly allocated string denoting extra information
126 * about a plugin.
127 */
128 typedef gchar *(*PurplePluginExtraCb)(PurplePlugin *plugin);
129
130 /**
131 * PurplePluginPrefFrameCb:
132 * @plugin: the plugin associated with this callback.
133 *
134 * Returns the preferences frame for the plugin.
135 *
136 * Returns: Preference frame.
137 */
138 typedef PurplePluginPrefFrame *(*PurplePluginPrefFrameCb)(PurplePlugin *plugin);
139
140 /**
141 * PurplePrefRequestCb:
142 *
143 * Returns the preferences request handle for a plugin.
144 *
145 * Returns: Preferences request handle.
146 */
147 typedef gpointer (*PurplePluginPrefRequestCb)(PurplePlugin *plugin);
106 148
107 /** 149 /**
108 * PurplePluginInfoFlags: 150 * PurplePluginInfoFlags:
109 * @PURPLE_PLUGIN_INFO_FLAGS_INTERNAL: Plugin is not shown in UI lists 151 * @PURPLE_PLUGIN_INFO_FLAGS_INTERNAL: Plugin is not shown in UI lists
110 * @PURPLE_PLUGIN_INFO_FLAGS_AUTO_LOAD: Auto-load the plugin 152 * @PURPLE_PLUGIN_INFO_FLAGS_AUTO_LOAD: Auto-load the plugin
467 * purple_plugin_get_info: 509 * purple_plugin_get_info:
468 * @plugin: The plugin. 510 * @plugin: The plugin.
469 * 511 *
470 * Returns a plugin's #PurplePluginInfo instance. 512 * Returns a plugin's #PurplePluginInfo instance.
471 * 513 *
472 * Returns: The plugin's #PurplePluginInfo instance. 514 * Returns: (transfer none) The plugin's #PurplePluginInfo instance.
515 * GPlugin refs the plugin info object before returning it. This workaround
516 * is to avoid managing the reference counts everywhere in our codebase
517 * where we use the plugin info. The plugin info instance is guaranteed to
518 * exist as long as the plugin exists.
473 */ 519 */
474 PurplePluginInfo *purple_plugin_get_info(const PurplePlugin *plugin); 520 PurplePluginInfo *purple_plugin_get_info(const PurplePlugin *plugin);
475 521
476 /** 522 /**
477 * purple_plugin_disable: 523 * purple_plugin_disable:
533 * purple_plugin_get_dependent_plugins: 579 * purple_plugin_get_dependent_plugins:
534 * @plugin: The plugin whose dependent plugins are returned. 580 * @plugin: The plugin whose dependent plugins are returned.
535 * 581 *
536 * Returns a list of plugins that depend on a particular plugin. 582 * Returns a list of plugins that depend on a particular plugin.
537 * 583 *
538 * Returns: (transfer none): The list of a plugins that depend on the specified 584 * Returns: (element-type PurplePlugin) (transfer none): The list of a plugins that depend on the specified
539 * plugin. 585 * plugin.
540 */ 586 */
541 GSList *purple_plugin_get_dependent_plugins(const PurplePlugin *plugin); 587 GSList *purple_plugin_get_dependent_plugins(const PurplePlugin *plugin);
542 588
543 /**************************************************************************/ 589 /**************************************************************************/
917 /** 963 /**
918 * purple_plugins_find_all: 964 * purple_plugins_find_all:
919 * 965 *
920 * Returns a list of all plugins, whether loaded or not. 966 * Returns a list of all plugins, whether loaded or not.
921 * 967 *
922 * Returns: A list of all plugins. The list is owned by the caller, and must be 968 * Returns: (element-type PurplePlugin) (transfer full): A list of all plugins.
969 * The list is owned by the caller, and must be
923 * g_list_free()d to avoid leaking the nodes. 970 * g_list_free()d to avoid leaking the nodes.
924 */ 971 */
925 GList *purple_plugins_find_all(void); 972 GList *purple_plugins_find_all(void);
926 973
927 /** 974 /**
928 * purple_plugins_get_loaded: 975 * purple_plugins_get_loaded:
929 * 976 *
930 * Returns a list of all loaded plugins. 977 * Returns a list of all loaded plugins.
931 * 978 *
932 * Returns: (transfer none): A list of all loaded plugins. 979 * Returns: (element-type PurplePlugin) (transfer none): A list of all loaded plugins.
933 */ 980 */
934 GList *purple_plugins_get_loaded(void); 981 GList *purple_plugins_get_loaded(void);
935 982
936 /** 983 /**
937 * purple_plugins_add_search_path: 984 * purple_plugins_add_search_path:
955 * purple_plugins_find_plugin: 1002 * purple_plugins_find_plugin:
956 * @id: The plugin ID. 1003 * @id: The plugin ID.
957 * 1004 *
958 * Finds a plugin with the specified plugin ID. 1005 * Finds a plugin with the specified plugin ID.
959 * 1006 *
960 * Returns: The plugin if found, or %NULL if not found. 1007 * Returns: (transfer none): The plugin if found, or %NULL if not found.
961 */ 1008 */
962 PurplePlugin *purple_plugins_find_plugin(const gchar *id); 1009 PurplePlugin *purple_plugins_find_plugin(const gchar *id);
963 1010
964 /** 1011 /**
965 * purple_plugins_find_by_filename: 1012 * purple_plugins_find_by_filename:
966 * @filename: The plugin filename. 1013 * @filename: The plugin filename.
967 * 1014 *
968 * Finds a plugin with the specified filename (filename with a path). 1015 * Finds a plugin with the specified filename (filename with a path).
969 * 1016 *
970 * Returns: The plugin if found, or %NULL if not found. 1017 * Returns: (transfer none): The plugin if found, or %NULL if not found.
971 */ 1018 */
972 PurplePlugin *purple_plugins_find_by_filename(const char *filename); 1019 PurplePlugin *purple_plugins_find_by_filename(const char *filename);
973 1020
974 /** 1021 /**
975 * purple_plugins_save_loaded: 1022 * purple_plugins_save_loaded:
996 /** 1043 /**
997 * purple_plugins_get_handle: 1044 * purple_plugins_get_handle:
998 * 1045 *
999 * Returns the plugin subsystem handle. 1046 * Returns the plugin subsystem handle.
1000 * 1047 *
1001 * Returns: The plugin sybsystem handle. 1048 * Returns: (transfer none): The plugin sybsystem handle.
1002 */ 1049 */
1003 void *purple_plugins_get_handle(void); 1050 void *purple_plugins_get_handle(void);
1004 1051
1005 /** 1052 /**
1006 * purple_plugins_init: 1053 * purple_plugins_init:

mercurial