~drizzle-trunk/drizzle/development

971.1.66 by Monty Taylor
Added missing file.
1
/* Copyright (C) 2006 MySQL AB
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"
1093.1.62 by Monty Taylor
Moved UDFs to slot organization.
17
#include "drizzled/plugin/function.h"
971.1.66 by Monty Taylor
Added missing file.
18
19
#include "plugin/compression/compress.h"
20
#include "plugin/compression/uncompress.h"
21
#include "plugin/compression/uncompressed_length.h"
1093.1.62 by Monty Taylor
Moved UDFs to slot organization.
22
23
using namespace std;
24
using namespace drizzled;
25
26
plugin::Create_function<Item_func_compress> *compressudf= NULL;
27
plugin::Create_function<Item_func_uncompress> *uncompressudf= NULL;
28
plugin::Create_function<Item_func_uncompressed_length>
29
  *uncompressed_lengthudf= NULL;
30
1530.2.6 by Monty Taylor
Moved plugin::Context to module::Context.
31
static int compressionudf_plugin_init(module::Context &context)
971.1.66 by Monty Taylor
Added missing file.
32
{
1093.1.62 by Monty Taylor
Moved UDFs to slot organization.
33
  compressudf= new plugin::Create_function<Item_func_compress>("compress");
34
  uncompressudf=
35
    new plugin::Create_function<Item_func_uncompress>("uncompress");
36
  uncompressed_lengthudf=
37
    new plugin::Create_function<Item_func_uncompressed_length>("uncompressed_length");
1324.2.2 by Monty Taylor
Use the plugin::Context everywhere.
38
  context.add(compressudf);
39
  context.add(uncompressudf);
40
  context.add(uncompressed_lengthudf);
971.1.66 by Monty Taylor
Added missing file.
41
  return 0;
42
}
43
1228.1.5 by Monty Taylor
Merged in some naming things.
44
DRIZZLE_DECLARE_PLUGIN
971.1.66 by Monty Taylor
Added missing file.
45
{
1241.10.2 by Monty Taylor
Added support for embedding the drizzle version number in the plugin file.
46
  DRIZZLE_VERSION_ID,
971.1.66 by Monty Taylor
Added missing file.
47
  "compression",
48
  "1.1",
49
  "Stewart Smith",
50
  "UDFs for compression functions",
51
  PLUGIN_LICENSE_GPL,
52
  compressionudf_plugin_init, /* Plugin Init */
53
  NULL,   /* system variables */
54
  NULL    /* config options */
55
}
1228.1.5 by Monty Taylor
Merged in some naming things.
56
DRIZZLE_DECLARE_PLUGIN_END;