diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-03-31 21:12:35 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-03-31 21:12:35 (GMT) |
commit | 7cbdd17b441b35d48624956aa438bde69f18bc37 (patch) | |
tree | 438af8d0a994d6e203cf66ea91cf336bb071ee44 /src/plugins/plugin.c | |
parent | d5e55f2ad015781bd7bee0e3216e47d6218e0841 (diff) |
Implemented first steps to a Python plugins support.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@146 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/plugins/plugin.c')
-rw-r--r-- | src/plugins/plugin.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index e6e4a1a..ed4c39d 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -1,6 +1,6 @@ /* OpenIDA - Outil d'analyse de fichiers binaires - * plugin.h - interactions avec un greffon donné + * plugin.c - interactions avec un greffon donné * * Copyright (C) 2009 Cyrille Bagard * @@ -29,38 +29,10 @@ #include <stdbool.h> +#include "plugin-int.h" -/* Procède à l'initialisation du greffon */ -typedef bool (* init_plugin_fc) (GObject *); - - - -/* Greffon pour OpenIDA (instance) */ -struct _GPluginModule -{ - GObject parent; /* A laisser en premier */ - - GModule *module; /* Abstration de manipulation */ - - PluginAction action; /* Opération(s) menée(s) */ - - init_plugin_fc init; /* Procédure d'initialisation */ - - execute_action_on_binary_fc exec_on_bin;/* Action sur un binaire */ - -}; - - -/* Greffon pour OpenIDA (classe) */ -struct _GPluginModuleClass -{ - GObjectClass parent; /* A laisser en premier */ - -}; - - /* Initialise la classe des greffons. */ static void g_plugin_module_class_init(GPluginModuleClass *); @@ -135,7 +107,7 @@ GPluginModule *g_plugin_module_new(const gchar *filename, GObject *ref) result->module = g_module_open(filename, G_MODULE_BIND_LAZY); -#if 1 +#if 0 if (!g_module_symbol(result->module, "get_plugin_action", (gpointer *)&__get_action)) { printf("Err plugin get_action sym\n"); @@ -213,6 +185,6 @@ PluginAction g_plugin_module_get_action(const GPluginModule *plugin) bool g_plugin_module_execute_action_on_binary(const GPluginModule *plugin, GOpenidaBinary *binary, PluginAction action) { - return plugin->exec_on_bin(binary, action); + return plugin->exec_on_bin(plugin, binary, action); } |