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/libhydra/plugins/attr_sql/attr_sql_plugin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/libhydra/plugins/attr_sql/attr_sql_plugin.c') diff --git a/src/libhydra/plugins/attr_sql/attr_sql_plugin.c b/src/libhydra/plugins/attr_sql/attr_sql_plugin.c index ca9de023e..f9be3d245 100644 --- a/src/libhydra/plugins/attr_sql/attr_sql_plugin.c +++ b/src/libhydra/plugins/attr_sql/attr_sql_plugin.c @@ -40,9 +40,14 @@ struct private_attr_sql_plugin_t { * configuration attributes */ sql_attribute_t *attribute; - }; +METHOD(plugin_t, get_name, char*, + private_attr_sql_plugin_t *this) +{ + return "attr-sql"; +} + METHOD(plugin_t, destroy, void, private_attr_sql_plugin_t *this) { @@ -71,6 +76,7 @@ plugin_t *attr_sql_plugin_create() INIT(this, .public = { .plugin = { + .get_name = _get_name, .destroy = _destroy, }, }, -- cgit v1.2.3