~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/module.h

Added code necessary for building plugins dynamically.
Merged in changes from lifeless to allow autoreconf to work.
Touching plugin.ini files now triggers a rebuid - so config/autorun.sh is no
longer required to be run after touching those.
Removed the duplicate plugin names - also removed the issue that getting them
different would silently fail weirdly later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_PLUGIN_HANDLE_H
21
 
#define DRIZZLED_PLUGIN_HANDLE_H
 
20
#ifndef DRIZZLED_PLUGIN_MODULE_H
 
21
#define DRIZZLED_PLUGIN_MODULE_H
22
22
 
23
23
#include <drizzled/lex_string.h>
24
24
#include <mysys/my_alloc.h>
 
25
#include "drizzled/plugin/manifest.h"
25
26
 
26
27
class sys_var;
27
28
 
30
31
namespace plugin
31
32
{
32
33
 
33
 
class Manifest;
34
34
class Library;
35
35
 
36
 
/* A handle of a plugin */
37
 
class Handle
 
36
/* A plugin module */
 
37
class Module
38
38
{
39
39
  const std::string name;
40
40
  Manifest *manifest;
43
43
  bool isInited;
44
44
  MEM_ROOT mem_root;            /* memory for dynamic plugin structures */
45
45
  sys_var *system_vars;         /* server variables for this plugin */
46
 
  Handle(Manifest *manifest_arg, Library *library_arg)
 
46
  Module(Manifest *manifest_arg, Library *library_arg)
47
47
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(library_arg),
 
48
      isInited(false),
48
49
      mem_root(), system_vars(NULL) {}
49
50
      
50
 
  Handle(Manifest *manifest_arg)
 
51
  Module(Manifest *manifest_arg)
51
52
    : name(manifest_arg->name), manifest(manifest_arg), plugin_dl(NULL),
 
53
      isInited(false),
52
54
      mem_root(), system_vars(NULL) {}
53
55
      
54
56
  const std::string& getName() const
65
67
} /* namespace plugin */
66
68
} /* namespace drizzled */
67
69
 
68
 
#endif /* DRIZZLED_PLUGIN_HANDLE_H */
 
70
#endif /* DRIZZLED_PLUGIN_MODULE_H */