~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/md5/md5.cc

Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   along with this program; if not, write to the Free Software
15
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
16
16
 
17
 
#include <drizzled/server_includes.h>
18
 
#include <drizzled/slot/function.h>
19
 
#include <drizzled/item/func.h>
20
 
#include <drizzled/function/str/strfunc.h>
 
17
#include "config.h"
 
18
 
 
19
/* Include these before the openssl headers, because they are BROKEN AS CRAP */
 
20
#include <cstdio>
 
21
#include <cstddef>
21
22
 
22
23
#if defined(HAVE_LIBGNUTLS_OPENSSL)
23
24
# include <gnutls/openssl.h>
25
26
# include <openssl/md5.h>
26
27
#endif /* HAVE_GNUTLS_OPENSSL */
27
28
 
28
 
#include <stdio.h>
 
29
#include <drizzled/plugin/function.h>
 
30
#include <drizzled/item/func.h>
 
31
#include "drizzled/charset.h"
 
32
#include <drizzled/function/str/strfunc.h>
29
33
 
30
34
using namespace std;
31
35
using namespace drizzled;
93
97
static int initialize(plugin::Registry &registry)
94
98
{
95
99
  md5udf= new plugin::Create_function<Md5Function>("md5");
96
 
  registry.function.add(md5udf);
 
100
  registry.add(md5udf);
97
101
  return 0;
98
102
}
99
103
 
100
104
static int finalize(plugin::Registry &registry)
101
105
{
102
 
  registry.function.remove(md5udf);
 
106
  registry.remove(md5udf);
103
107
  delete md5udf;
104
108
  return 0;
105
109
}
106
110
 
107
 
drizzle_declare_plugin(md5)
 
111
DRIZZLE_DECLARE_PLUGIN
108
112
{
 
113
  DRIZZLE_VERSION_ID,
109
114
  "md5",
110
115
  "1.0",
111
116
  "Stewart Smith",
113
118
  PLUGIN_LICENSE_GPL,
114
119
  initialize, /* Plugin Init */
115
120
  finalize,   /* Plugin Deinit */
116
 
  NULL,   /* status variables */
117
121
  NULL,   /* system variables */
118
122
  NULL    /* config options */
119
123
}
120
 
drizzle_declare_plugin_end;
 
124
DRIZZLE_DECLARE_PLUGIN_END;