~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin.h

  • Committer: Mark Atwood
  • Date: 2011-08-11 03:05:03 UTC
  • mfrom: (2385.1.12 refactor4)
  • Revision ID: me@mark.atwood.name-20110811030503-rp9xjihc5x3y0x4q
mergeĀ lp:~olafvdspek/drizzle/refactor4

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_H
21
 
#define DRIZZLED_PLUGIN_H
 
20
#pragma once
22
21
 
23
22
#include <boost/program_options.hpp>
24
23
#include <boost/filesystem.hpp>
25
24
 
26
 
#include "drizzled/module/manifest.h"
27
 
#include "drizzled/module/module.h"
28
 
#include "drizzled/plugin/version.h"
29
 
#include "drizzled/module/context.h"
30
 
#include "drizzled/definitions.h"
31
 
 
32
 
#include "drizzled/lex_string.h"
33
 
#include "drizzled/sys_var.h"
34
 
#include "drizzled/xid.h"
35
 
 
36
 
#include "drizzled/visibility.h"
37
 
 
38
 
namespace drizzled
39
 
{
40
 
 
41
 
class Session;
42
 
class Item;
43
 
struct charset_info_st;
 
25
#include <drizzled/module/manifest.h>
 
26
#include <drizzled/module/module.h>
 
27
#include <drizzled/plugin/version.h>
 
28
#include <drizzled/module/context.h>
 
29
#include <drizzled/definitions.h>
 
30
 
 
31
#include <drizzled/lex_string.h>
 
32
#include <drizzled/sys_var.h>
 
33
 
 
34
#include <drizzled/visibility.h>
 
35
 
 
36
namespace drizzled {
44
37
 
45
38
/*************************************************************************
46
39
  Plugin API. Common for all plugin types.
47
40
*/
48
41
 
49
 
 
50
 
class sys_var;
51
 
struct option;
52
 
 
53
42
extern boost::filesystem::path plugin_dir;
54
43
 
55
 
namespace plugin { class StorageEngine; }
56
 
 
57
44
/*
58
45
  Macros for beginning and ending plugin declarations. Between
59
46
  DRIZZLE_DECLARE_PLUGIN and DRIZZLE_DECLARE_PLUGIN_END there should
88
75
*/
89
76
 
90
77
 
91
 
#define PLUGIN_VAR_BOOL         0x0001
92
 
#define PLUGIN_VAR_INT          0x0002
93
 
#define PLUGIN_VAR_LONG         0x0003
94
 
#define PLUGIN_VAR_LONGLONG     0x0004
95
 
#define PLUGIN_VAR_STR          0x0005
96
 
#define PLUGIN_VAR_UNSIGNED     0x0080
97
 
#define PLUGIN_VAR_SessionLOCAL     0x0100 /* Variable is per-connection */
98
78
#define PLUGIN_VAR_READONLY     0x0200 /* Server variable is read only */
99
 
#define PLUGIN_VAR_NOSYSVAR     0x0400 /* Not a server variable */
100
 
#define PLUGIN_VAR_NOCMDOPT     0x0800 /* Not a command line option */
101
 
#define PLUGIN_VAR_NOCMDARG     0x1000 /* No argument for cmd line */
102
 
#define PLUGIN_VAR_RQCMDARG     0x0000 /* Argument required for cmd line */
103
79
#define PLUGIN_VAR_OPCMDARG     0x2000 /* Argument optional for cmd line */
104
80
#define PLUGIN_VAR_MEMALLOC     0x8000 /* String needs memory allocated */
105
81
 
176
152
extern bool plugin_finalize(module::Registry &registry);
177
153
extern void plugin_startup_window(module::Registry &registry, drizzled::Session &session);
178
154
extern void my_print_help_inc_plugins(option *options);
179
 
extern bool plugin_is_ready(const LEX_STRING *name, int type);
 
155
extern bool plugin_is_ready(const lex_string_t *name, int type);
180
156
extern void plugin_sessionvar_init(Session *session);
181
157
extern void plugin_sessionvar_cleanup(Session *session);
182
158
 
203
179
 
204
180
} /* namespace drizzled */
205
181
 
206
 
#endif /* DRIZZLED_PLUGIN_H */
207
182