summaryrefslogtreecommitdiff
path: root/src/plugins/plugin.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-27 20:44:31 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-27 20:44:31 (GMT)
commit4b1367d2fee7be0789744e1db35d6f9200b29163 (patch)
tree3b22581bf6a6d2da6d73a7fef30540282808ecb7 /src/plugins/plugin.c
parentf6490769c12dbb3b7766c7e6861284b8fee9f9e6 (diff)
Updated the API in order to allow Python plugins to rely on native plugins.
Diffstat (limited to 'src/plugins/plugin.c')
-rw-r--r--src/plugins/plugin.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index 1608032..a9bd9da 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -288,6 +288,27 @@ GPluginModule *g_plugin_module_new(const gchar *filename)
break;
+ case DPS_CORE_MANAGEMENT:
+
+ switch (action)
+ {
+ case PGA_NATIVE_LOADED:
+ if (!load_plugin_symbol(result->module,
+ "chrysalide_plugin_on_native_loaded",
+ &result->native_loaded))
+ goto bad_plugin;
+ break;
+
+ default:
+ log_variadic_message(LMT_WARNING,
+ _("Unknown action '0x%02x' in plugin '%s'..."),
+ result->interface->actions[i], filename);
+ break;
+
+ }
+
+ break;
+
default:
log_variadic_message(LMT_WARNING,
_("Unknown sub-category '0x%02x' in plugin '%s'..."), sub, filename);
@@ -775,6 +796,27 @@ void g_plugin_module_log_variadic_message(const GPluginModule *plugin, LogMessag
/******************************************************************************
* *
+* Paramètres : plugin = greffon à manipuler. *
+* action = type d'action attendue. *
+* unused = variable non utilisé pour l'usage de __VA_ARGS__. *
+* *
+* Description : Accompagne la fin du chargement des modules natifs. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+void g_plugin_module_notify_native_loaded(GPluginModule *plugin, PluginAction action, void *unused)
+{
+ plugin->native_loaded(plugin, action);
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : plugin = greffon à manipuler. *
* action = type d'action attendue. *
* resources = liste de ressources à constituer. [OUT] *