~drizzle-trunk/drizzle/development

971.3.37 by Eric Day
Fixed copyright on gearman_udf plugin, was on Sun time. :)
1
/* Copyright (C) 2009 Sun Microsystems
971.3.32 by Eric Day
More Gearman UDF work.
2
3
   This program is free software; you can redistribute it and/or modify
4
   it under the terms of the GNU General Public License as published by
5
   the Free Software Foundation; version 2 of the License.
6
7
   This program is distributed in the hope that it will be useful,
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
   GNU General Public License for more details.
11
12
   You should have received a copy of the GNU General Public License
13
   along with this program; if not, write to the Free Software
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
1241.9.36 by Monty Taylor
ZOMG. I deleted drizzled/server_includes.h.
16
#include "config.h"
1130.1.9 by Monty Taylor
Changed some plugins from including slots to include plugins. Oops.
17
#include "drizzled/plugin/function.h"
971.3.33 by Eric Day
Gearman UDFs complete.
18
19
#include "gman_servers_set.h"
20
#include "gman_do.h"
971.3.32 by Eric Day
More Gearman UDF work.
21
22
using namespace std;
1093.1.62 by Monty Taylor
Moved UDFs to slot organization.
23
using namespace drizzled;
971.3.32 by Eric Day
More Gearman UDF work.
24
1093.1.62 by Monty Taylor
Moved UDFs to slot organization.
25
plugin::Create_function<Item_func_gman_servers_set> *gman_servers_set= NULL;
26
plugin::Create_function<Item_func_gman_do> *gman_do= NULL;
27
plugin::Create_function<Item_func_gman_do_high> *gman_do_high= NULL;
28
plugin::Create_function<Item_func_gman_do_low> *gman_do_low= NULL;
29
plugin::Create_function<Item_func_gman_do_background> *gman_do_background= NULL;
30
plugin::Create_function<Item_func_gman_do_high_background>
31
  *gman_do_high_background= NULL;
32
plugin::Create_function<Item_func_gman_do_low_background>
33
  *gman_do_low_background= NULL;
971.3.32 by Eric Day
More Gearman UDF work.
34
1530.2.6 by Monty Taylor
Moved plugin::Context to module::Context.
35
static int gearman_udf_plugin_init(drizzled::module::Context &context)
971.3.32 by Eric Day
More Gearman UDF work.
36
{
1093.1.62 by Monty Taylor
Moved UDFs to slot organization.
37
  gman_servers_set= new plugin::Create_function<Item_func_gman_servers_set>("gman_servers_set");
38
  gman_do= new plugin::Create_function<Item_func_gman_do>("gman_do");
39
  gman_do_high= new plugin::Create_function<Item_func_gman_do_high>("gman_do_high");
40
  gman_do_low= new plugin::Create_function<Item_func_gman_do_low>("gman_do_low");
41
  gman_do_background= new plugin::Create_function<Item_func_gman_do_background>("gman_do_background");
42
  gman_do_high_background= new plugin::Create_function<Item_func_gman_do_high_background>("gman_do_high_background");
43
  gman_do_low_background= new plugin::Create_function<Item_func_gman_do_low_background>("gman_do_low_background");
1324.2.2 by Monty Taylor
Use the plugin::Context everywhere.
44
  context.add(gman_servers_set);
45
  context.add(gman_do);
46
  context.add(gman_do_high);
47
  context.add(gman_do_low);
48
  context.add(gman_do_background);
49
  context.add(gman_do_high_background);
50
  context.add(gman_do_low_background);
971.3.32 by Eric Day
More Gearman UDF work.
51
  return 0;
52
}
53
1228.1.5 by Monty Taylor
Merged in some naming things.
54
DRIZZLE_DECLARE_PLUGIN
971.3.32 by Eric Day
More Gearman UDF work.
55
{
1241.10.2 by Monty Taylor
Added support for embedding the drizzle version number in the plugin file.
56
  DRIZZLE_VERSION_ID,
971.3.34 by Eric Day
Merged trunk, fixed gearman_udf plugin to use new plugin system.
57
  "gearman_udf",
971.3.32 by Eric Day
More Gearman UDF work.
58
  "0.1",
59
  "Eric Day",
971.3.34 by Eric Day
Merged trunk, fixed gearman_udf plugin to use new plugin system.
60
  "Gearman Client UDFs",
971.3.32 by Eric Day
More Gearman UDF work.
61
  PLUGIN_LICENSE_BSD,
62
  gearman_udf_plugin_init, /* Plugin Init */
63
  NULL,   /* system variables */
64
  NULL    /* config options */
65
}
1228.1.5 by Monty Taylor
Merged in some naming things.
66
DRIZZLE_DECLARE_PLUGIN_END;