~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/errmsg_notify/errmsg_notify.cc

Merge Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <drizzled/plugin/error_message.h>
31
31
#include <drizzled/gettext.h>
32
32
#include <drizzled/plugin.h>
33
 
#include <drizzled/plugin/registry.h>
34
33
 
35
34
 
36
35
/* todo, make this dynamic as needed */
95
94
};
96
95
 
97
96
static Error_message_notify *handler= NULL;
98
 
static int plugin_init(plugin::Registry &registry)
 
97
static int plugin_init(plugin::Context &context)
99
98
{
100
99
  Notify::init("Drizzled");
101
100
  handler= new Error_message_notify();
102
 
  registry.add(handler);
103
 
 
104
 
  return 0;
105
 
}
106
 
 
107
 
static int plugin_deinit(plugin::Registry &registry)
108
 
{
109
 
 
110
 
  if (handler)
111
 
  {
112
 
    registry.remove(handler);
113
 
    delete handler;
114
 
  }
115
 
  return 0;
116
 
}
117
 
 
118
 
DRIZZLE_PLUGIN(plugin_init, plugin_deinit, NULL);
 
101
  context.add(handler);
 
102
 
 
103
  return 0;
 
104
}
 
105
 
 
106
DRIZZLE_PLUGIN(plugin_init, NULL);