diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-01-26 21:37:49 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-01-26 21:37:49 (GMT) |
commit | 262c95e0b088a56e9fd919edc57ad19f85e2e40e (patch) | |
tree | 8510a15924423abb3208610f724d911f2f79b9a6 /src/plugins/pglist.h | |
parent | 0993276d6450919c6d178182c5fd26497b62d5fc (diff) |
Begun to rewrite the whole plugins system.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@461 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/plugins/pglist.h')
-rw-r--r-- | src/plugins/pglist.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/plugins/pglist.h b/src/plugins/pglist.h index 4964d1d..fec31c2 100644 --- a/src/plugins/pglist.h +++ b/src/plugins/pglist.h @@ -41,14 +41,30 @@ bool init_all_plugins(GObject *); /* Procède au déchargement des différents greffons présents. */ void exit_all_plugins(void); -/* Founit un greffon offrant le service demandé. */ -GPluginModule *get_one_plugin_for_action(PluginAction); - /* Founit less greffons offrant le service demandé. */ -GPluginModule **get_all_plugins_for_action(PluginAction, size_t *) __attribute__ ((deprecated)); +const GPluginModule **get_all_plugins_for_action(PluginAction, size_t *); + + +/** + * Définitions des opérations appliquables à une catégories de greffons. + */ -/*Opère une action donnée sur un binaire défini. */ -void run_plugins_on_binary(GLoadedBinary *, PluginAction, bool); +#define process_all__plugins_for(a, f, ...) \ + do \ + { \ + size_t __count; \ + const GPluginModule **__list; \ + size_t __i; \ + __list = get_all_plugins_for_action(a, &__count); \ + for (__i = 0; __i < __count; __i++) \ + f(__list[__i], a, __VA_ARGS__); \ + } \ + while (0) + +/* DPS_DISASSEMBLY */ + +#define process_disassembly_event(a, b) \ + process_all__plugins_for(a, g_plugin_module_process_disassembly_event, b) |