~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/gearman_udf/gearman_udf.cc

  • Committer: Stewart Smith
  • Date: 2009-10-08 05:39:17 UTC
  • mto: This revision was merged to the branch mainline in revision 1179.
  • Revision ID: stewart@flamingspork.com-20091008053917-b7u3opyo8997438r
remove unused find_string_in_array

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2009 Sun Microsystems, Inc.
 
1
/* Copyright (C) 2009 Sun Microsystems
2
2
 
3
3
   This program is free software; you can redistribute it and/or modify
4
4
   it under the terms of the GNU General Public License as published by
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include "config.h"
 
16
#include "drizzled/server_includes.h"
17
17
#include "drizzled/plugin/function.h"
18
18
 
19
19
#include "gman_servers_set.h"
32
32
plugin::Create_function<Item_func_gman_do_low_background>
33
33
  *gman_do_low_background= NULL;
34
34
 
35
 
static int gearman_udf_plugin_init(drizzled::module::Context &context)
 
35
static int gearman_udf_plugin_init(drizzled::plugin::Registry &registry)
36
36
{
37
37
  gman_servers_set= new plugin::Create_function<Item_func_gman_servers_set>("gman_servers_set");
38
38
  gman_do= new plugin::Create_function<Item_func_gman_do>("gman_do");
41
41
  gman_do_background= new plugin::Create_function<Item_func_gman_do_background>("gman_do_background");
42
42
  gman_do_high_background= new plugin::Create_function<Item_func_gman_do_high_background>("gman_do_high_background");
43
43
  gman_do_low_background= new plugin::Create_function<Item_func_gman_do_low_background>("gman_do_low_background");
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);
51
 
  return 0;
52
 
}
53
 
 
54
 
DRIZZLE_DECLARE_PLUGIN
55
 
{
56
 
  DRIZZLE_VERSION_ID,
 
44
  registry.add(gman_servers_set);
 
45
  registry.add(gman_do);
 
46
  registry.add(gman_do_high);
 
47
  registry.add(gman_do_low);
 
48
  registry.add(gman_do_background);
 
49
  registry.add(gman_do_high_background);
 
50
  registry.add(gman_do_low_background);
 
51
  return 0;
 
52
}
 
53
 
 
54
static int gearman_udf_plugin_deinit(drizzled::plugin::Registry &registry)
 
55
{
 
56
  registry.remove(gman_do_low_background);
 
57
  registry.remove(gman_do_high_background);
 
58
  registry.remove(gman_do_background);
 
59
  registry.remove(gman_do_low);
 
60
  registry.remove(gman_do_high);
 
61
  registry.remove(gman_do);
 
62
  registry.remove(gman_servers_set);
 
63
  delete gman_do_low_background;
 
64
  delete gman_do_high_background;
 
65
  delete gman_do_background;
 
66
  delete gman_do_low;
 
67
  delete gman_do_high;
 
68
  delete gman_do;
 
69
  delete gman_servers_set;
 
70
  return 0;
 
71
}
 
72
 
 
73
drizzle_declare_plugin(gearman_udf)
 
74
{
57
75
  "gearman_udf",
58
76
  "0.1",
59
77
  "Eric Day",
60
78
  "Gearman Client UDFs",
61
79
  PLUGIN_LICENSE_BSD,
62
80
  gearman_udf_plugin_init, /* Plugin Init */
63
 
  NULL,   /* depends */
 
81
  gearman_udf_plugin_deinit, /* Plugin Deinit */
 
82
  NULL,   /* status variables */
 
83
  NULL,   /* system variables */
64
84
  NULL    /* config options */
65
85
}
66
 
DRIZZLE_DECLARE_PLUGIN_END;
 
86
drizzle_declare_plugin_end;