~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_plugin.h

  • Committer: Monty Taylor
  • Date: 2009-04-10 21:13:45 UTC
  • mto: (992.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: mordred@inaugust.com-20090410211345-8ti3nt2i2otjrjly
New-style plugin registration now works.
New-style plugin re-registration on the way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
#define DRIZZLE_ANY_PLUGIN         -1
68
68
 
69
69
/* A handle for the dynamic library containing a plugin or plugins. */
 
70
struct st_mysql_plugin;
70
71
 
71
72
struct st_plugin_dl
72
73
{
95
96
#define plugin_name(pi) (&((pi)->name))
96
97
#define plugin_equals(p1,p2) ((p1) && (p2) && (p1) == (p2))
97
98
 
98
 
typedef int (*plugin_type_init)(struct st_plugin_int *);
 
99
#include <drizzled/plugin_registry.h>
 
100
 
 
101
typedef int (*plugin_type_init)(Plugin_registry &);
 
102
typedef int (*plugin_type_deinit)(st_plugin_int *);
 
103
 
 
104
/*
 
105
  Plugin description structure.
 
106
*/
 
107
 
 
108
struct st_mysql_plugin
 
109
{
 
110
  uint32_t type;             /* plugin type (a DRIZZLE_XXX_PLUGIN value)   */
 
111
  const char *name;          /* plugin name (for SHOW PLUGINS)               */
 
112
  const char *version;       /* plugin version (for SHOW PLUGINS)            */
 
113
  const char *author;        /* plugin author (for SHOW PLUGINS)             */
 
114
  const char *descr;         /* general descriptive text (for SHOW PLUGINS ) */
 
115
  int license;               /* plugin license (PLUGIN_LICENSE_XXX)      */
 
116
  plugin_type_init init;     /* function to invoke when plugin is loaded */
 
117
  int (*deinit)(void *); /* function to invoke when plugin is unloaded */
 
118
  struct st_mysql_show_var *status_vars;
 
119
  struct st_mysql_sys_var **system_vars;
 
120
  void *reserved1;   /* reserved for dependency checking             */
 
121
};
99
122
 
100
123
extern char *opt_plugin_load;
101
124
extern char *opt_plugin_dir_ptr;