~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/plugin.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
namespace drizzled {
37
37
 
38
 
class Session;
39
 
class Item;
40
 
struct charset_info_st;
41
 
 
42
38
/*************************************************************************
43
39
  Plugin API. Common for all plugin types.
44
40
*/
45
41
 
46
 
 
47
 
class sys_var;
48
 
struct option;
49
 
 
50
42
extern boost::filesystem::path plugin_dir;
51
43
 
52
 
namespace plugin { class StorageEngine; }
53
 
 
54
44
/*
55
45
  Macros for beginning and ending plugin declarations. Between
56
46
  DRIZZLE_DECLARE_PLUGIN and DRIZZLE_DECLARE_PLUGIN_END there should
85
75
*/
86
76
 
87
77
 
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 */
102
81
 
122
101
  automatically at the end of the statement.
123
102
*/
124
103
 
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*);
128
105
 
129
106
/*
130
107
  SYNOPSIS
140
117
   and persist it in the provided pointer to the dynamic variable.
141
118
   For example, strings may require memory to be allocated.
142
119
*/
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);
146
121
 
147
122
 
148
123
 
168
143
  Miscellaneous functions for plugin implementors
169
144
*/
170
145
 
171
 
extern bool plugin_init(module::Registry &registry,
172
 
                        boost::program_options::options_description &long_options);
173
 
extern bool plugin_finalize(module::Registry &registry);
174
 
extern void plugin_startup_window(module::Registry &registry, 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*);
179
152
 
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);
185
157
 
186
158
 
187
159
/**
199
171
DRIZZLED_API int tmpfile(const char *prefix);
200
172
 
201
173
} /* namespace drizzled */
202
 
 
203