~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin.h

  • Committer: Vijay Samuel
  • Date: 2010-09-10 21:03:37 UTC
  • mto: (1757.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1758.
  • Revision ID: vijay@vijay-20100910210337-rf7c2ymawtqj6tkv
Merge added utf 8 tamil test case suite and test case for creating a database in tamil.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "drizzled/lex_string.h"
30
30
#include "drizzled/xid.h"
31
31
#include <boost/program_options.hpp>
32
 
#include <boost/filesystem.hpp>
33
32
 
34
33
namespace drizzled
35
34
{
47
46
typedef drizzle_lex_string LEX_STRING;
48
47
struct option;
49
48
 
50
 
extern boost::filesystem::path plugin_dir;
 
49
extern char *opt_plugin_add;
 
50
extern char *opt_plugin_remove;
 
51
extern char *opt_plugin_load;
 
52
extern char *opt_plugin_dir_ptr;
 
53
extern char opt_plugin_dir[FN_REFLEN];
51
54
 
52
55
namespace plugin { class StorageEngine; }
53
56
 
198
201
*/
199
202
 
200
203
 
201
 
#define DECLARE_DRIZZLE_SYSVAR_BOOL(name) struct { \
202
 
  DRIZZLE_PLUGIN_VAR_HEADER;      \
203
 
  bool *value;                  \
204
 
  bool def_val;           \
205
 
} DRIZZLE_SYSVAR_NAME(name)
206
 
 
207
204
#define DECLARE_DRIZZLE_SYSVAR_BASIC(name, type) struct { \
208
205
  DRIZZLE_PLUGIN_VAR_HEADER;      \
209
206
  type *value;                  \
227
224
  DECLARE_SessionVAR_FUNC(type);    \
228
225
} DRIZZLE_SYSVAR_NAME(name)
229
226
 
230
 
#define DECLARE_DRIZZLE_SessionVAR_BOOL(name) struct { \
231
 
  DRIZZLE_PLUGIN_VAR_HEADER;      \
232
 
  int offset;                   \
233
 
  bool def_val;           \
234
 
  DECLARE_SessionVAR_FUNC(bool);    \
235
 
} DRIZZLE_SYSVAR_NAME(name)
236
 
 
237
227
#define DECLARE_DRIZZLE_SessionVAR_SIMPLE(name, type) struct { \
238
228
  DRIZZLE_PLUGIN_VAR_HEADER;      \
239
229
  int offset;                   \
255
245
  the following declarations are for use by plugin implementors
256
246
*/
257
247
 
258
 
#define DECLARE_DRIZZLE_SYSVAR_BOOL(name) struct { \
259
 
  DRIZZLE_PLUGIN_VAR_HEADER;      \
260
 
  bool *value;                  \
261
 
  bool def_val;           \
262
 
} DRIZZLE_SYSVAR_NAME(name)
263
 
 
264
 
 
265
248
#define DRIZZLE_SYSVAR_BOOL(name, varname, opt, comment, check, update, def) \
266
 
  DECLARE_DRIZZLE_SYSVAR_BOOL(name) = { \
 
249
DECLARE_DRIZZLE_SYSVAR_BASIC(name, bool) = { \
267
250
  PLUGIN_VAR_BOOL | ((opt) & PLUGIN_VAR_MASK), \
268
251
  #name, comment, check, update, &varname, def}
269
252
 
270
 
#define DECLARE_DRIZZLE_SYSVAR_BASIC(name, type) struct { \
271
 
  DRIZZLE_PLUGIN_VAR_HEADER;      \
272
 
  type *value;                  \
273
 
  const type def_val;           \
274
 
} DRIZZLE_SYSVAR_NAME(name)
275
 
 
276
253
#define DRIZZLE_SYSVAR_STR(name, varname, opt, comment, check, update, def) \
277
254
DECLARE_DRIZZLE_SYSVAR_BASIC(name, char *) = { \
278
255
  PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \
309
286
  #name, comment, check, update, &varname, def, min, max, blk }
310
287
 
311
288
#define DRIZZLE_SessionVAR_BOOL(name, opt, comment, check, update, def) \
312
 
DECLARE_DRIZZLE_SessionVAR_BOOL(name) = { \
 
289
DECLARE_DRIZZLE_SessionVAR_BASIC(name, char) = { \
313
290
  PLUGIN_VAR_BOOL | PLUGIN_VAR_SessionLOCAL | ((opt) & PLUGIN_VAR_MASK), \
314
291
  #name, comment, check, update, -1, def, NULL}
315
292
 
396
373
*/
397
374
 
398
375
extern bool plugin_init(module::Registry &registry,
 
376
                        int *argc, char **argv,
399
377
                        boost::program_options::options_description &long_options);
400
 
extern bool plugin_finalize(module::Registry &registry);
401
 
extern void my_print_help_inc_plugins(option *options);
 
378
extern void plugin_finalize(module::Registry &registry);
 
379
extern void my_print_help_inc_plugins(option *options,
 
380
                                      boost::program_options::options_description &long_options);
402
381
extern bool plugin_is_ready(const LEX_STRING *name, int type);
403
382
extern void plugin_sessionvar_init(Session *session);
404
383
extern void plugin_sessionvar_cleanup(Session *session);
412
391
int session_sql_command(const Session *session);
413
392
enum_tx_isolation session_tx_isolation(const Session *session);
414
393
 
415
 
void compose_plugin_add(std::vector<std::string> options);
416
 
void compose_plugin_remove(std::vector<std::string> options);
417
 
void notify_plugin_load(std::string in_plugin_load);
418
394
 
419
395
 
420
396
/**