36
36
namespace drizzled {
40
struct charset_info_st;
42
38
/*************************************************************************
43
39
Plugin API. Common for all plugin types.
50
42
extern boost::filesystem::path plugin_dir;
52
namespace plugin { class StorageEngine; }
55
45
Macros for beginning and ending plugin declarations. Between
56
46
DRIZZLE_DECLARE_PLUGIN and DRIZZLE_DECLARE_PLUGIN_END there should
88
#define PLUGIN_VAR_BOOL 0x0001
89
#define PLUGIN_VAR_INT 0x0002
90
#define PLUGIN_VAR_LONG 0x0003
91
#define PLUGIN_VAR_LONGLONG 0x0004
92
#define PLUGIN_VAR_STR 0x0005
93
#define PLUGIN_VAR_UNSIGNED 0x0080
94
#define PLUGIN_VAR_SessionLOCAL 0x0100 /* Variable is per-connection */
95
78
#define PLUGIN_VAR_READONLY 0x0200 /* Server variable is read only */
96
#define PLUGIN_VAR_NOSYSVAR 0x0400 /* Not a server variable */
97
#define PLUGIN_VAR_NOCMDOPT 0x0800 /* Not a command line option */
98
#define PLUGIN_VAR_NOCMDARG 0x1000 /* No argument for cmd line */
99
#define PLUGIN_VAR_RQCMDARG 0x0000 /* Argument required for cmd line */
100
79
#define PLUGIN_VAR_OPCMDARG 0x2000 /* Argument optional for cmd line */
101
80
#define PLUGIN_VAR_MEMALLOC 0x8000 /* String needs memory allocated */
122
101
automatically at the end of the statement.
125
typedef int (*var_check_func)(Session *session,
126
drizzle_sys_var *var,
127
void *save, drizzle_value *value);
104
typedef int (*var_check_func)(Session*, drizzle_sys_var*, void* save, drizzle_value*);
140
117
and persist it in the provided pointer to the dynamic variable.
141
118
For example, strings may require memory to be allocated.
143
typedef void (*var_update_func)(Session *session,
144
drizzle_sys_var *var,
145
void *var_ptr, const void *save);
120
typedef void (*var_update_func)(Session*, drizzle_sys_var*, void*, const void* save);
168
143
Miscellaneous functions for plugin implementors
171
extern bool plugin_init(module::Registry ®istry,
172
boost::program_options::options_description &long_options);
173
extern bool plugin_finalize(module::Registry ®istry);
174
extern void plugin_startup_window(module::Registry ®istry, drizzled::Session &session);
175
extern void my_print_help_inc_plugins(option *options);
176
extern bool plugin_is_ready(const LEX_STRING *name, int type);
177
extern void plugin_sessionvar_init(Session *session);
178
extern void plugin_sessionvar_cleanup(Session *session);
146
extern bool plugin_init(module::Registry&, boost::program_options::options_description &long_options);
147
extern bool plugin_finalize(module::Registry&);
148
extern void plugin_startup_window(module::Registry&, drizzled::Session&);
149
extern void my_print_help_inc_plugins(option* options);
150
extern void plugin_sessionvar_init(Session*);
151
extern void plugin_sessionvar_cleanup(Session*);
180
int session_in_lock_tables(const Session *session);
181
DRIZZLED_API int64_t session_test_options(const Session *session, int64_t test_options);
182
void compose_plugin_add(std::vector<std::string> options);
183
void compose_plugin_remove(std::vector<std::string> options);
184
void notify_plugin_load(std::string in_plugin_load);
153
DRIZZLED_API int64_t session_test_options(const Session*, int64_t test_options);
154
void compose_plugin_add(const std::vector<std::string>& options);
155
void compose_plugin_remove(const std::vector<std::string>& options);
156
void notify_plugin_load(const std::string& in_plugin_load);