| 254 #warning TODO: Implement this when GPlugin can return dependent plugins. |
254 #warning TODO: Implement this when GPlugin can return dependent plugins. |
| 255 return NULL; |
255 return NULL; |
| 256 } |
256 } |
| 257 |
257 |
| 258 /************************************************************************** |
258 /************************************************************************** |
| 259 * PluginAction API |
|
| 260 **************************************************************************/ |
|
| 261 PurplePluginAction * |
|
| 262 purple_plugin_action_new(const char* label, PurplePluginActionCb callback) |
|
| 263 { |
|
| 264 PurplePluginAction *action; |
|
| 265 |
|
| 266 g_return_val_if_fail(label != NULL && callback != NULL, NULL); |
|
| 267 |
|
| 268 action = g_new0(PurplePluginAction, 1); |
|
| 269 |
|
| 270 action->label = g_strdup(label); |
|
| 271 action->callback = callback; |
|
| 272 |
|
| 273 return action; |
|
| 274 } |
|
| 275 |
|
| 276 void |
|
| 277 purple_plugin_action_free(PurplePluginAction *action) |
|
| 278 { |
|
| 279 g_return_if_fail(action != NULL); |
|
| 280 |
|
| 281 g_free(action->label); |
|
| 282 g_free(action); |
|
| 283 } |
|
| 284 |
|
| 285 static PurplePluginAction * |
|
| 286 purple_plugin_action_copy(PurplePluginAction *action) |
|
| 287 { |
|
| 288 g_return_val_if_fail(action != NULL, NULL); |
|
| 289 |
|
| 290 return purple_plugin_action_new(action->label, action->callback); |
|
| 291 } |
|
| 292 |
|
| 293 G_DEFINE_BOXED_TYPE(PurplePluginAction, purple_plugin_action, |
|
| 294 purple_plugin_action_copy, purple_plugin_action_free) |
|
| 295 |
|
| 296 /************************************************************************** |
|
| 297 * Plugins API |
259 * Plugins API |
| 298 **************************************************************************/ |
260 **************************************************************************/ |
| 299 GList * |
261 GList * |
| 300 purple_plugins_find_all(void) |
262 purple_plugins_find_all(void) |
| 301 { |
263 { |