diff options
author | Steve Frécinaux <code@istique.net> | 2010-05-14 16:06:00 +0200 |
---|---|---|
committer | Steve Frécinaux <code@istique.net> | 2010-05-14 21:08:15 +0200 |
commit | 7485a731f7c4b905f4e1fb10c514392078307060 (patch) | |
tree | 7915c78bfc112defad82b36058825676579de495 /libpeas/peas-plugin-loader.c | |
parent | 5ff8d4d54f5f34aa898468dfc3d99838d2593b68 (diff) | |
download | libpeas-7485a731f7c4b905f4e1fb10c514392078307060.tar.gz |
Add a way to know if a plugin provides a certain extension.
Diffstat (limited to 'libpeas/peas-plugin-loader.c')
-rw-r--r-- | libpeas/peas-plugin-loader.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpeas/peas-plugin-loader.c b/libpeas/peas-plugin-loader.c index 7e0cbb8..157036e 100644 --- a/libpeas/peas-plugin-loader.c +++ b/libpeas/peas-plugin-loader.c @@ -75,6 +75,21 @@ peas_plugin_loader_unload (PeasPluginLoader *loader, klass->unload (loader, info); } +gboolean +peas_plugin_loader_provides_extension (PeasPluginLoader *loader, + PeasPluginInfo *info, + GType ext_type) +{ + PeasPluginLoaderClass *klass; + + g_return_val_if_fail (PEAS_IS_PLUGIN_LOADER (loader), FALSE); + + klass = PEAS_PLUGIN_LOADER_GET_CLASS (loader); + g_return_val_if_fail (klass->provides_extension != NULL, FALSE); + + return klass->provides_extension (loader, info, ext_type); +} + PeasExtension * peas_plugin_loader_get_extension (PeasPluginLoader *loader, PeasPluginInfo *info, |