libpurple/plugins.h

changeset 42391
090b03385984
parent 42376
c6aa66fec38a
child 42398
00178e755de6
equal deleted inserted replaced
42390:c2cd0378e212 42391:090b03385984
45 typedef GPluginPlugin PurplePlugin; 45 typedef GPluginPlugin PurplePlugin;
46 46
47 typedef GPluginPluginInterface PurplePluginInterface; 47 typedef GPluginPluginInterface PurplePluginInterface;
48 48
49 #include "purpleplugininfo.h" 49 #include "purpleplugininfo.h"
50 #include "purpleversion.h"
50 51
51 G_BEGIN_DECLS 52 G_BEGIN_DECLS
52 53
53 /**************************************************************************/ 54 /**************************************************************************/
54 /* Plugin API */ 55 /* Plugin API */
101 * Returns: (transfer none): The plugin's #PurplePluginInfo instance. 102 * Returns: (transfer none): The plugin's #PurplePluginInfo instance.
102 * GPlugin refs the plugin info object before returning it. This workaround 103 * GPlugin refs the plugin info object before returning it. This workaround
103 * is to avoid managing the reference counts everywhere in our codebase 104 * is to avoid managing the reference counts everywhere in our codebase
104 * where we use the plugin info. The plugin info instance is guaranteed to 105 * where we use the plugin info. The plugin info instance is guaranteed to
105 * exist as long as the plugin exists. 106 * exist as long as the plugin exists.
106 */ 107 *
108 * Since: 3.0.0
109 */
110 PURPLE_AVAILABLE_IN_3_0
107 PurplePluginInfo *purple_plugin_get_info(PurplePlugin *plugin); 111 PurplePluginInfo *purple_plugin_get_info(PurplePlugin *plugin);
108 112
109 /** 113 /**
110 * purple_plugin_disable: 114 * purple_plugin_disable:
111 * 115 *
126 * required additional functionality to the libpurple core. These plugins must 130 * required additional functionality to the libpurple core. These plugins must
127 * not be shown in plugin lists. Examples of such plugins are in-tree protocol 131 * not be shown in plugin lists. Examples of such plugins are in-tree protocol
128 * plugins, loaders etc. 132 * plugins, loaders etc.
129 * 133 *
130 * Returns: %TRUE if the plugin is an internal plugin, %FALSE otherwise. 134 * Returns: %TRUE if the plugin is an internal plugin, %FALSE otherwise.
131 */ 135 *
136 * Since: 3.0.0
137 */
138 PURPLE_AVAILABLE_IN_3_0
132 gboolean purple_plugin_is_internal(PurplePlugin *plugin); 139 gboolean purple_plugin_is_internal(PurplePlugin *plugin);
133 140
134 /** 141 /**
135 * purple_plugin_get_dependent_plugins: 142 * purple_plugin_get_dependent_plugins:
136 * @plugin: The plugin whose dependent plugins are returned. 143 * @plugin: The plugin whose dependent plugins are returned.
137 * 144 *
138 * Returns a list of plugins that depend on a particular plugin. 145 * Returns a list of plugins that depend on a particular plugin.
139 * 146 *
140 * Returns: (element-type PurplePlugin) (transfer none): The list of a plugins that depend on the specified 147 * Returns: (element-type PurplePlugin) (transfer none): The list of a plugins that depend on the specified
141 * plugin. 148 * plugin.
142 */ 149 *
150 * Since: 3.0.0
151 */
152 PURPLE_AVAILABLE_IN_3_0
143 GSList *purple_plugin_get_dependent_plugins(PurplePlugin *plugin); 153 GSList *purple_plugin_get_dependent_plugins(PurplePlugin *plugin);
144 154
145 /**************************************************************************/ 155 /**************************************************************************/
146 /* Plugins API */ 156 /* Plugins API */
147 /**************************************************************************/ 157 /**************************************************************************/
152 * Returns a list of all plugins, whether loaded or not. 162 * Returns a list of all plugins, whether loaded or not.
153 * 163 *
154 * Returns: (element-type PurplePlugin) (transfer full): A list of all plugins. 164 * Returns: (element-type PurplePlugin) (transfer full): A list of all plugins.
155 * The list is owned by the caller, and must be 165 * The list is owned by the caller, and must be
156 * g_list_free()d to avoid leaking the nodes. 166 * g_list_free()d to avoid leaking the nodes.
157 */ 167 *
168 * Since: 3.0.0
169 */
170 PURPLE_AVAILABLE_IN_3_0
158 GList *purple_plugins_find_all(void); 171 GList *purple_plugins_find_all(void);
159 172
160 /** 173 /**
161 * purple_plugins_get_loaded: 174 * purple_plugins_get_loaded:
162 * 175 *
179 * 192 *
180 * Forces a refresh of all plugins found in the search paths, and loads plugins 193 * Forces a refresh of all plugins found in the search paths, and loads plugins
181 * that are to be auto-loaded. 194 * that are to be auto-loaded.
182 * 195 *
183 * See purple_plugins_add_search_path(). 196 * See purple_plugins_add_search_path().
184 */ 197 *
198 * Since: 3.0.0
199 */
200 PURPLE_AVAILABLE_IN_3_0
185 void purple_plugins_refresh(void); 201 void purple_plugins_refresh(void);
186 202
187 /** 203 /**
188 * purple_plugins_find_plugin: 204 * purple_plugins_find_plugin:
189 * @id: The plugin ID. 205 * @id: The plugin ID.
190 * 206 *
191 * Finds a plugin with the specified plugin ID. 207 * Finds a plugin with the specified plugin ID.
192 * 208 *
193 * Returns: (transfer none): The plugin if found, or %NULL if not found. 209 * Returns: (transfer none): The plugin if found, or %NULL if not found.
194 */ 210 *
211 * Since: 3.0.0
212 */
213 PURPLE_AVAILABLE_IN_3_0
195 PurplePlugin *purple_plugins_find_plugin(const gchar *id); 214 PurplePlugin *purple_plugins_find_plugin(const gchar *id);
196 215
197 /** 216 /**
198 * purple_plugins_find_by_filename: 217 * purple_plugins_find_by_filename:
199 * @filename: The plugin filename. 218 * @filename: The plugin filename.
200 * 219 *
201 * Finds a plugin with the specified filename (filename with a path). 220 * Finds a plugin with the specified filename (filename with a path).
202 * 221 *
203 * Returns: (transfer none): The plugin if found, or %NULL if not found. 222 * Returns: (transfer none): The plugin if found, or %NULL if not found.
204 */ 223 *
224 * Since: 3.0.0
225 */
226 PURPLE_AVAILABLE_IN_3_0
205 PurplePlugin *purple_plugins_find_by_filename(const char *filename); 227 PurplePlugin *purple_plugins_find_by_filename(const char *filename);
206 228
207 /** 229 /**
208 * purple_plugins_save_loaded: 230 * purple_plugins_save_loaded:
209 * @key: The preference key to save the list of plugins to. 231 * @key: The preference key to save the list of plugins to.

mercurial