~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/gearman_udf/gearman_udf.cc

  • Committer: Nathan Williams
  • Date: 2009-06-25 00:01:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1082.
  • Revision ID: nathanlws@gmail.com-20090625000126-fv99nqpec4edrchc
Converted last usage of cmin to std::min.

Removed cmin and cmax defines from global.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2009 Sun Microsystems
 
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
 
 
16
#include <drizzled/server_includes.h>
 
17
#include <drizzled/sql_udf.h>
 
18
 
 
19
#include "gman_servers_set.h"
 
20
#include "gman_do.h"
 
21
 
 
22
using namespace std;
 
23
 
 
24
Create_function<Item_func_gman_servers_set>
 
25
  gman_servers_set(string("gman_servers_set"));
 
26
Create_function<Item_func_gman_do> gman_do(string("gman_do"));
 
27
Create_function<Item_func_gman_do_high> gman_do_high(string("gman_do_high"));
 
28
Create_function<Item_func_gman_do_low> gman_do_low(string("gman_do_low"));
 
29
Create_function<Item_func_gman_do_background>
 
30
  gman_do_background(string("gman_do_background"));
 
31
Create_function<Item_func_gman_do_high_background>
 
32
  gman_do_high_background(string("gman_do_high_background"));
 
33
Create_function<Item_func_gman_do_low_background>
 
34
  gman_do_low_background(string("gman_do_low_background"));
 
35
 
 
36
static int gearman_udf_plugin_init(PluginRegistry &registry)
 
37
{
 
38
  registry.add(&gman_servers_set);
 
39
  registry.add(&gman_do);
 
40
  registry.add(&gman_do_high);
 
41
  registry.add(&gman_do_low);
 
42
  registry.add(&gman_do_background);
 
43
  registry.add(&gman_do_high_background);
 
44
  registry.add(&gman_do_low_background);
 
45
  return 0;
 
46
}
 
47
 
 
48
static int gearman_udf_plugin_deinit(PluginRegistry &registry)
 
49
{
 
50
  registry.remove(&gman_do_low_background);
 
51
  registry.remove(&gman_do_high_background);
 
52
  registry.remove(&gman_do_background);
 
53
  registry.remove(&gman_do_low);
 
54
  registry.remove(&gman_do_high);
 
55
  registry.remove(&gman_do);
 
56
  registry.remove(&gman_servers_set);
 
57
  return 0;
 
58
}
 
59
 
 
60
drizzle_declare_plugin(gearman_udf)
 
61
{
 
62
  "gearman_udf",
 
63
  "0.1",
 
64
  "Eric Day",
 
65
  "Gearman Client UDFs",
 
66
  PLUGIN_LICENSE_BSD,
 
67
  gearman_udf_plugin_init, /* Plugin Init */
 
68
  gearman_udf_plugin_deinit, /* Plugin Deinit */
 
69
  NULL,   /* status variables */
 
70
  NULL,   /* system variables */
 
71
  NULL    /* config options */
 
72
}
 
73
drizzle_declare_plugin_end;