~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/data_engine/modules.cc

Update for test split.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
using namespace std;
27
27
using namespace drizzled;
28
28
 
 
29
static const string GPL("GPL");
 
30
static const string LGPL("LGPL");
 
31
static const string BSD("BSD");
 
32
static const string PROPRIETARY("PROPRIETARY");
 
33
 
29
34
ModulesTool::ModulesTool() :
30
35
  plugin::TableFunction("DATA_DICTIONARY", "MODULES")
31
36
{
55
60
    plugin::Module *module= *it;
56
61
    const plugin::Manifest &manifest= module->getManifest();
57
62
 
 
63
    /* MODULE_NAME */
58
64
    push(module->getName());
59
65
 
 
66
    /* MODULE_VERSION */
60
67
    push(manifest.version ? manifest.version : 0);
61
68
 
62
 
    push(manifest.author ? manifest.author : "<unknown>");
 
69
    /* MODULE_AUTHOR */
 
70
    manifest.author ? push(manifest.author) : push();
63
71
 
 
72
    /* IS_BUILTIN */
64
73
    push((module->plugin_dl == NULL));
65
74
 
66
 
    push ((module->plugin_dl == NULL) ? "builtin" : module->plugin_dl->getName());
67
 
 
68
 
    push(manifest.descr ? manifest.descr : "none");
69
 
 
 
75
    /* MODULE_LIBRARY */
 
76
    push((module->plugin_dl == NULL) ? "builtin" : module->plugin_dl->getName());
 
77
 
 
78
    /* MODULE_DESCRIPTION */
 
79
    manifest.descr ? push(manifest.descr) : push();
 
80
 
 
81
    /* MODULE_LICENSE */
70
82
    switch (manifest.license) {
71
83
    case PLUGIN_LICENSE_GPL:
72
 
      push("GPL");
 
84
      push(GPL);
73
85
      break;
74
86
    case PLUGIN_LICENSE_BSD:
75
 
      push("BSD");
 
87
      push(BSD);
76
88
      break;
77
89
    case PLUGIN_LICENSE_LGPL:
78
 
      push("LGPL");
 
90
      push(LGPL);
79
91
      break;
80
92
    default:
81
 
      push("PROPRIETARY");
 
93
      push(PROPRIETARY);
82
94
      break;
83
95
    }
84
96
  }