~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-28 14:32:36 UTC
  • mto: (2257.1.1 build) (2276.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: olafvdspek@gmail.com-20110328143236-4ge1d793iqaktfq0
Common fwd

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