341
341
result_type operator() (argument_type plugin)
343
struct drizzled_plugin_manifest *plug= plugin_decl(plugin);
343
const drizzled::plugin::Manifest &manifest= plugin->getManifest();
344
344
const CHARSET_INFO * const cs= system_charset_info;
346
346
table->restoreRecordAsDefault();
348
table->field[0]->store(plugin_name(plugin)->str,
349
plugin_name(plugin)->length, cs);
348
table->field[0]->store(plugin->getName().c_str(),
349
plugin->getName().size(), cs);
351
if (manifest.version)
353
table->field[1]->store(plug->version, strlen(plug->version), cs);
353
table->field[1]->store(manifest.version, strlen(manifest.version), cs);
354
354
table->field[1]->set_notnull();
365
365
table->field[2]->store(STRING_WITH_LEN("INACTIVE"), cs);
370
table->field[3]->store(plug->author, strlen(plug->author), cs);
370
table->field[3]->store(manifest.author, strlen(manifest.author), cs);
371
371
table->field[3]->set_notnull();
375
375
table->field[3]->set_null();
380
table->field[4]->store(plug->descr, strlen(plug->descr), cs);
380
table->field[4]->store(manifest.descr, strlen(manifest.descr), cs);
381
381
table->field[4]->set_notnull();
385
385
table->field[4]->set_null();
388
switch (plug->license) {
388
switch (manifest.license) {
389
389
case PLUGIN_LICENSE_GPL:
390
table->field[5]->store(PLUGIN_LICENSE_GPL_STRING,
391
strlen(PLUGIN_LICENSE_GPL_STRING), cs);
390
table->field[5]->store(drizzled::plugin::LICENSE_GPL_STRING.c_str(),
391
drizzled::plugin::LICENSE_GPL_STRING.size(), cs);
393
393
case PLUGIN_LICENSE_BSD:
394
table->field[5]->store(PLUGIN_LICENSE_BSD_STRING,
395
strlen(PLUGIN_LICENSE_BSD_STRING), cs);
394
table->field[5]->store(drizzled::plugin::LICENSE_BSD_STRING.c_str(),
395
drizzled::plugin::LICENSE_BSD_STRING.size(), cs);
397
397
case PLUGIN_LICENSE_LGPL:
398
table->field[5]->store(PLUGIN_LICENSE_LGPL_STRING,
399
strlen(PLUGIN_LICENSE_LGPL_STRING), cs);
398
table->field[5]->store(drizzled::plugin::LICENSE_LGPL_STRING.c_str(),
399
drizzled::plugin::LICENSE_LGPL_STRING.size(), cs);
402
table->field[5]->store(PLUGIN_LICENSE_PROPRIETARY_STRING,
403
strlen(PLUGIN_LICENSE_PROPRIETARY_STRING), cs);
402
table->field[5]->store(drizzled::plugin::LICENSE_PROPRIETARY_STRING.c_str(),
403
drizzled::plugin::LICENSE_PROPRIETARY_STRING.size(),
406
407
table->field[5]->set_notnull();
414
415
Table *table= tables->table;
416
417
PluginRegistry ®istry= PluginRegistry::getPluginRegistry();
417
vector<st_plugin_int *> plugins= registry.get_list(true);
418
vector<st_plugin_int *>::iterator iter=
418
vector<drizzled::plugin::Handle *> plugins= registry.get_list(true);
419
vector<drizzled::plugin::Handle *>::iterator iter=
419
420
find_if(plugins.begin(), plugins.end(), ShowPlugins(session, table));
420
421
if (iter != plugins.end())