Added database and fetcher plugin features

This commit is contained in:
Martin Willi
2011-10-14 10:05:45 +02:00
parent 48b7234f58
commit f85a4310cb
3 changed files with 37 additions and 10 deletions
@@ -307,6 +307,8 @@ static bool load_feature(private_plugin_loader_t *this, plugin_entry_t *entry,
case FEATURE_PUBKEY:
case FEATURE_CERT_DECODE:
case FEATURE_CERT_ENCODE:
case FEATURE_DATABASE:
case FEATURE_FETCHER:
/* require a registration function */
if (!reg ||
(reg->kind == FEATURE_REGISTER && reg->type != feature->type))
@@ -372,6 +374,13 @@ static bool load_feature(private_plugin_loader_t *this, plugin_entry_t *entry,
lib->creds->add_builder(lib->creds, CRED_CERTIFICATE,
feature->cert, reg->reg.final, reg->reg.f);
break;
case FEATURE_DATABASE:
lib->db->add_database(lib->db, reg->reg.f);
break;
case FEATURE_FETCHER:
lib->fetcher->add_fetcher(lib->fetcher, reg->reg.f,
feature->fetcher);
break;
default:
break;
}