1093.3.2
by Monty Taylor
Split drizzle::plugin::Manifest into its own file. |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
4 |
* Copyright (C) 2009 Sun Microsystems
|
|
5 |
*
|
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; version 2 of the License.
|
|
9 |
*
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18 |
*/
|
|
19 |
||
20 |
#ifndef DRIZZLED_PLUGIN_MANIFEST_H
|
|
21 |
#define DRIZZLED_PLUGIN_MANIFEST_H
|
|
22 |
||
1110.1.5
by Monty Taylor
Renamed PluginRegistry to plugin::Registry. |
23 |
#include <drizzled/plugin/registry.h> |
1093.3.3
by Monty Taylor
Split out handle and library. |
24 |
|
25 |
struct st_mysql_show_var; |
|
26 |
struct st_mysql_sys_var; |
|
1093.3.2
by Monty Taylor
Split drizzle::plugin::Manifest into its own file. |
27 |
|
28 |
/* We use the following strings to define licenses for plugins */
|
|
29 |
enum plugin_license_type { |
|
30 |
PLUGIN_LICENSE_GPL, |
|
31 |
PLUGIN_LICENSE_BSD, |
|
32 |
PLUGIN_LICENSE_LGPL, |
|
33 |
PLUGIN_LICENSE_PROPRIETARY, |
|
34 |
PLUGIN_LICENSE_MAX=PLUGIN_LICENSE_LGPL |
|
35 |
};
|
|
36 |
||
37 |
||
38 |
namespace drizzled |
|
39 |
{
|
|
40 |
namespace plugin |
|
41 |
{
|
|
42 |
||
1093.3.4
by Monty Taylor
Naming cleanups. |
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 |
||
1110.1.5
by Monty Taylor
Renamed PluginRegistry to plugin::Registry. |
48 |
typedef int (*initialize_func_t)(Registry &); |
1093.3.2
by Monty Taylor
Split drizzle::plugin::Manifest into its own file. |
49 |
|
50 |
/**
|
|
51 |
* Plugin Manfiest
|
|
52 |
*
|
|
53 |
* One Manifest is required per plugin library which is to be dlopened
|
|
54 |
*
|
|
55 |
* This is a struct and not a class because it is staticly defined in the
|
|
56 |
* plugin objects and needs to be a POD as it can, or else it won't compile.
|
|
57 |
*/
|
|
58 |
struct Manifest |
|
59 |
{
|
|
60 |
const char *name; /* plugin name (for SHOW PLUGINS) */ |
|
61 |
const char *version; /* plugin version (for SHOW PLUGINS) */ |
|
62 |
const char *author; /* plugin author (for SHOW PLUGINS) */ |
|
63 |
const char *descr; /* general descriptive text (for SHOW PLUGINS ) */ |
|
64 |
plugin_license_type license; /* plugin license (PLUGIN_LICENSE_XXX) */ |
|
65 |
initialize_func_t init; /* function to invoke when plugin is loaded */ |
|
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 */ |
|
70 |
};
|
|
71 |
||
72 |
} /* namespace plugin */ |
|
73 |
} /* namespace drizzled */ |
|
74 |
||
75 |
#endif /* DRIZZLED_PLUGIN_MANIFEST_H */ |