~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin.h

  • Committer: Monty Taylor
  • Date: 2010-12-26 01:32:11 UTC
  • mto: This revision was merged to the branch mainline in revision 2038.
  • Revision ID: mordred@inaugust.com-20101226013211-c1tx52h7evovmijg
fixed dict and eval.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "drizzled/sys_var.h"
34
34
#include "drizzled/xid.h"
35
35
 
36
 
#include "drizzled/visibility.h"
37
 
 
38
36
namespace drizzled
39
37
{
40
38
 
48
46
 
49
47
 
50
48
class sys_var;
 
49
typedef drizzle_lex_string LEX_STRING;
51
50
struct option;
52
51
 
53
52
extern boost::filesystem::path plugin_dir;
64
63
#define PANDORA_CPP_NAME(x) _drizzled_ ## x ## _plugin_
65
64
#define PANDORA_PLUGIN_NAME(x) PANDORA_CPP_NAME(x)
66
65
#define DRIZZLE_DECLARE_PLUGIN \
67
 
  DRIZZLED_API ::drizzled::module::Manifest PANDORA_PLUGIN_NAME(PANDORA_MODULE_NAME)= 
 
66
  ::drizzled::module::Manifest PANDORA_PLUGIN_NAME(PANDORA_MODULE_NAME)= 
68
67
 
69
68
 
70
69
#define DRIZZLE_DECLARE_PLUGIN_END
77
76
    STRINGIFY_ARG(PANDORA_MODULE_AUTHOR), \
78
77
    STRINGIFY_ARG(PANDORA_MODULE_TITLE), \
79
78
    PANDORA_MODULE_LICENSE, \
80
 
    init, \
81
 
    STRINGIFY_ARG(PANDORA_MODULE_DEPENDENCIES), \
82
 
    options \
 
79
    init, system, options \
83
80
  } 
84
81
 
85
82
 
108
105
 
109
106
/*
110
107
  SYNOPSIS
111
 
    (*var_check_func)()
 
108
    (*mysql_var_check_func)()
112
109
      session               thread handle
113
110
      var               dynamic variable being altered
114
111
      save              pointer to temporary storage
125
122
  automatically at the end of the statement.
126
123
*/
127
124
 
128
 
typedef int (*var_check_func)(Session *session,
 
125
typedef int (*mysql_var_check_func)(Session *session,
129
126
                                    drizzle_sys_var *var,
130
127
                                    void *save, drizzle_value *value);
131
128
 
132
129
/*
133
130
  SYNOPSIS
134
 
    (*var_update_func)()
 
131
    (*mysql_var_update_func)()
135
132
      session               thread handle
136
133
      var               dynamic variable being altered
137
134
      var_ptr           pointer to dynamic variable
143
140
   and persist it in the provided pointer to the dynamic variable.
144
141
   For example, strings may require memory to be allocated.
145
142
*/
146
 
typedef void (*var_update_func)(Session *session,
 
143
typedef void (*mysql_var_update_func)(Session *session,
147
144
                                      drizzle_sys_var *var,
148
145
                                      void *var_ptr, const void *save);
149
146
 
174
171
extern bool plugin_init(module::Registry &registry,
175
172
                        boost::program_options::options_description &long_options);
176
173
extern bool plugin_finalize(module::Registry &registry);
177
 
extern void plugin_startup_window(module::Registry &registry, drizzled::Session &session);
178
174
extern void my_print_help_inc_plugins(option *options);
179
175
extern bool plugin_is_ready(const LEX_STRING *name, int type);
180
176
extern void plugin_sessionvar_init(Session *session);
181
177
extern void plugin_sessionvar_cleanup(Session *session);
 
178
extern sys_var *intern_find_sys_var(const char *str, uint32_t, bool no_error);
182
179
 
183
180
int session_in_lock_tables(const Session *session);
184
 
DRIZZLED_API int64_t session_test_options(const Session *session, int64_t test_options);
 
181
int session_tablespace_op(const Session *session);
 
182
void set_session_proc_info(Session *session, const char *info);
 
183
const char *get_session_proc_info(Session *session);
 
184
int64_t session_test_options(const Session *session, int64_t test_options);
 
185
int session_sql_command(const Session *session);
 
186
enum_tx_isolation session_tx_isolation(const Session *session);
 
187
 
185
188
void compose_plugin_add(std::vector<std::string> options);
186
189
void compose_plugin_remove(std::vector<std::string> options);
187
190
void notify_plugin_load(std::string in_plugin_load);
199
202
  @retval -1    error
200
203
  @retval >= 0  a file handle that can be passed to dup or internal::my_close
201
204
*/
202
 
DRIZZLED_API int tmpfile(const char *prefix);
 
205
int mysql_tmpfile(const char *prefix);
203
206
 
204
207
} /* namespace drizzled */
205
208