Drizzled Public API Documentation

gearman_udf.cc

00001 /* Copyright (C) 2009 Sun Microsystems, Inc.
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00015 
00016 #include <config.h>
00017 #include <drizzled/plugin/function.h>
00018 
00019 #include "gman_servers_set.h"
00020 #include "gman_do.h"
00021 
00022 using namespace std;
00023 using namespace drizzled;
00024 
00025 plugin::Create_function<Item_func_gman_servers_set> *gman_servers_set= NULL;
00026 plugin::Create_function<Item_func_gman_do> *gman_do= NULL;
00027 plugin::Create_function<Item_func_gman_do_high> *gman_do_high= NULL;
00028 plugin::Create_function<Item_func_gman_do_low> *gman_do_low= NULL;
00029 plugin::Create_function<Item_func_gman_do_background> *gman_do_background= NULL;
00030 plugin::Create_function<Item_func_gman_do_high_background>
00031   *gman_do_high_background= NULL;
00032 plugin::Create_function<Item_func_gman_do_low_background>
00033   *gman_do_low_background= NULL;
00034 
00035 static int gearman_udf_plugin_init(drizzled::module::Context &context)
00036 {
00037   gman_servers_set= new plugin::Create_function<Item_func_gman_servers_set>("gman_servers_set");
00038   gman_do= new plugin::Create_function<Item_func_gman_do>("gman_do");
00039   gman_do_high= new plugin::Create_function<Item_func_gman_do_high>("gman_do_high");
00040   gman_do_low= new plugin::Create_function<Item_func_gman_do_low>("gman_do_low");
00041   gman_do_background= new plugin::Create_function<Item_func_gman_do_background>("gman_do_background");
00042   gman_do_high_background= new plugin::Create_function<Item_func_gman_do_high_background>("gman_do_high_background");
00043   gman_do_low_background= new plugin::Create_function<Item_func_gman_do_low_background>("gman_do_low_background");
00044   context.add(gman_servers_set);
00045   context.add(gman_do);
00046   context.add(gman_do_high);
00047   context.add(gman_do_low);
00048   context.add(gman_do_background);
00049   context.add(gman_do_high_background);
00050   context.add(gman_do_low_background);
00051   return 0;
00052 }
00053 
00054 DRIZZLE_DECLARE_PLUGIN
00055 {
00056   DRIZZLE_VERSION_ID,
00057   "gearman_udf",
00058   "0.1",
00059   "Eric Day",
00060   "Gearman Client UDFs",
00061   PLUGIN_LICENSE_BSD,
00062   gearman_udf_plugin_init, /* Plugin Init */
00063   NULL,   /* depends */
00064   NULL    /* config options */
00065 }
00066 DRIZZLE_DECLARE_PLUGIN_END;