From 787b5884aaf873fb9fda2b0d8b7c3d54e38ae7a5 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 11 Apr 2011 18:54:18 +0200 Subject: Added a get_name() function to plugin_t, create_plugin_enumerator enumerates over plugin_t --- src/libcharon/plugins/duplicheck/duplicheck_plugin.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libcharon/plugins/duplicheck/duplicheck_plugin.c') diff --git a/src/libcharon/plugins/duplicheck/duplicheck_plugin.c b/src/libcharon/plugins/duplicheck/duplicheck_plugin.c index 69a8dbf45..f8868e4b0 100644 --- a/src/libcharon/plugins/duplicheck/duplicheck_plugin.c +++ b/src/libcharon/plugins/duplicheck/duplicheck_plugin.c @@ -43,6 +43,12 @@ struct private_duplicheck_plugin_t { duplicheck_notify_t *notify; }; +METHOD(plugin_t, get_name, char*, + private_duplicheck_plugin_t *this) +{ + return "duplicheck"; +} + METHOD(plugin_t, destroy, void, private_duplicheck_plugin_t *this) { @@ -68,6 +74,7 @@ plugin_t *duplicheck_plugin_create() INIT(this, .public = { .plugin = { + .get_name = _get_name, .destroy = _destroy, }, }, -- cgit v1.2.3