51
typedef int (*plugin_type_init)(PluginRegistry &);
54
Plugin description structure.
59
/* Hide these - we will not use them */
60
/* Manifest(const Manifest&);
61
Manifest operator=(const Manifest&);
63
const char *name; /* plugin name (for SHOW PLUGINS) */
64
const char *version; /* plugin version (for SHOW PLUGINS) */
65
const char *author; /* plugin author (for SHOW PLUGINS) */
66
const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
67
plugin_license_type license; /* plugin license (PLUGIN_LICENSE_XXX) */
68
plugin_type_init init; /* function to invoke when plugin is loaded */
69
plugin_type_init deinit; /* function to invoke when plugin is unloaded */
70
st_mysql_show_var *status_vars;
71
st_mysql_sys_var **system_vars;
74
: name(NULL), version(NULL), author(NULL), descr(NULL),
75
license(PLUGIN_LICENSE_GPL), init(NULL), deinit(NULL),
76
status_vars(NULL), system_vars(NULL) {} */
48
79
/* A handle for the dynamic library containing a plugin or plugins. */
49
struct drizzled_plugin_manifest;
55
struct drizzled_plugin_manifest *plugins;
86
Library() : dl(), handle(NULL), plugins(NULL) {}
58
89
/* A handle of a plugin */
63
struct drizzled_plugin_manifest *plugin;
64
struct st_plugin_dl *plugin_dl;
66
97
MEM_ROOT mem_root; /* memory for dynamic plugin structures */
67
98
sys_var *system_vars; /* server variables for this plugin */
100
: name(), plugin(NULL), plugin_dl(NULL), isInited(false),
101
mem_root(), system_vars(NULL) {}
104
} /* namespace plugin */
105
} /* namespace drizzled */
71
107
#define plugin_decl(pi) ((pi)->plugin)
72
108
#define plugin_data(pi,cast) (static_cast<cast>((pi)->data))
74
110
#define plugin_equals(p1,p2) ((p1) && (p2) && (p1) == (p2))
77
typedef int (*plugin_type_init)(PluginRegistry &);
80
Plugin description structure.
83
struct drizzled_plugin_manifest
85
const char *name; /* plugin name (for SHOW PLUGINS) */
86
const char *version; /* plugin version (for SHOW PLUGINS) */
87
const char *author; /* plugin author (for SHOW PLUGINS) */
88
const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
89
int license; /* plugin license (PLUGIN_LICENSE_XXX) */
90
plugin_type_init init; /* function to invoke when plugin is loaded */
91
plugin_type_init deinit; /* function to invoke when plugin is unloaded */
92
struct st_mysql_show_var *status_vars;
93
struct st_mysql_sys_var **system_vars;
94
void *reserved1; /* reserved for dependency checking */
97
113
extern char *opt_plugin_load;
98
114
extern char *opt_plugin_dir_ptr;
99
115
extern char opt_plugin_dir[FN_REFLEN];
105
121
extern bool mysql_install_plugin(Session *session, const LEX_STRING *name,
106
122
const LEX_STRING *dl);
107
123
extern bool mysql_uninstall_plugin(Session *session, const LEX_STRING *name);
108
extern bool plugin_register_builtin(struct drizzled_plugin_manifest *plugin);
124
extern bool plugin_register_builtin(drizzled::plugin::Manifest *plugin);
109
125
extern void plugin_sessionvar_init(Session *session);
110
126
extern void plugin_sessionvar_cleanup(Session *session);
111
127
extern sys_var *intern_find_sys_var(const char *str, uint32_t, bool no_error);