~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/manifest.h

  • Committer: Brian Aker
  • Date: 2009-11-24 02:06:37 UTC
  • mfrom: (1223.1.7 push)
  • Revision ID: brian@gaz-20091124020637-9gb65vj98x1arydm
Merge for staging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_MODULE_MANIFEST_H
21
 
#define DRIZZLED_MODULE_MANIFEST_H
22
 
 
23
 
/**
24
 
 * @file Defines a Plugin Manifest
25
 
 *
26
 
 * A module::Manifest is the struct contained in every Plugin Library.
27
 
 */
28
 
 
29
 
#include "drizzled/module/context.h"
30
 
#include "drizzled/module/option_context.h"
31
 
 
32
 
namespace drizzled
33
 
{
34
 
 
35
 
struct drizzle_show_var;
36
 
struct drizzle_sys_var;
 
20
#ifndef DRIZZLED_PLUGIN_MANIFEST_H
 
21
#define DRIZZLED_PLUGIN_MANIFEST_H
 
22
 
 
23
#include <drizzled/plugin/registry.h>
 
24
 
 
25
struct st_mysql_show_var;
 
26
struct st_mysql_sys_var;
37
27
 
38
28
/* We use the following strings to define licenses for plugins */
39
29
enum plugin_license_type {
45
35
};
46
36
 
47
37
 
48
 
namespace module
49
 
{
50
 
 
51
 
typedef int (*initialize_func_t)(::drizzled::module::Context &);
52
 
typedef void (*options_func_t)(::drizzled::module::option_context &);
 
38
namespace drizzled
 
39
{
 
40
namespace plugin
 
41
{
 
42
 
 
43
static const std::string LICENSE_GPL_STRING("GPL");
 
44
static const std::string LICENSE_BSD_STRING("BSD");
 
45
static const std::string LICENSE_LGPL_STRING("LGPL");
 
46
static const std::string LICENSE_PROPRIETARY_STRING("PROPRIETARY");
 
47
 
 
48
typedef int (*initialize_func_t)(Registry &);
53
49
 
54
50
/**
55
51
 * Plugin Manfiest
61
57
 */
62
58
struct Manifest
63
59
{
64
 
  uint64_t drizzle_version;  /* Drizzle version the plugin was compiled for  */
65
60
  const char *name;          /* plugin name (for SHOW PLUGINS)               */
66
61
  const char *version;       /* plugin version (for SHOW PLUGINS)            */
67
62
  const char *author;        /* plugin author (for SHOW PLUGINS)             */
68
63
  const char *descr;         /* general descriptive text (for SHOW PLUGINS ) */
69
64
  plugin_license_type license; /* plugin license (PLUGIN_LICENSE_XXX)          */
70
65
  initialize_func_t init;     /* function to invoke when plugin is loaded     */
71
 
  const char *depends;
72
 
  options_func_t init_options; /* register command line options              */
 
66
  initialize_func_t deinit;   /* function to invoke when plugin is unloaded   */
 
67
  st_mysql_show_var *status_vars;
 
68
  st_mysql_sys_var **system_vars;
 
69
  void *reserved1;           /* reserved for dependency checking             */
73
70
};
74
71
 
75
 
} /* namespace module */
 
72
} /* namespace plugin */
76
73
} /* namespace drizzled */
77
74
 
78
 
#endif /* DRIZZLED_MODULE_MANIFEST_H */
 
75
#endif /* DRIZZLED_PLUGIN_MANIFEST_H */