1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems, Inc.
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.
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.
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
20
#ifndef DRIZZLED_MODULE_MANIFEST_H
21
#define DRIZZLED_MODULE_MANIFEST_H
24
* @file Defines a Plugin Manifest
26
* A module::Manifest is the struct contained in every Plugin Library.
29
#include "drizzled/module/context.h"
30
#include "drizzled/module/option_context.h"
35
struct drizzle_show_var;
36
struct drizzle_sys_var;
38
/* We use the following strings to define licenses for plugins */
39
enum plugin_license_type {
43
PLUGIN_LICENSE_PROPRIETARY,
44
PLUGIN_LICENSE_MAX=PLUGIN_LICENSE_LGPL
51
typedef int (*initialize_func_t)(::drizzled::module::Context &);
52
typedef void (*options_func_t)(::drizzled::module::option_context &);
57
* One Manifest is required per plugin library which is to be dlopened
59
* This is a struct and not a class because it is staticly defined in the
60
* plugin objects and needs to be a POD as it can, or else it won't compile.
64
uint64_t drizzle_version; /* Drizzle version the plugin was compiled for */
65
const char *name; /* plugin name (for SHOW PLUGINS) */
66
const char *version; /* plugin version (for SHOW PLUGINS) */
67
const char *author; /* plugin author (for SHOW PLUGINS) */
68
const char *descr; /* general descriptive text (for SHOW PLUGINS ) */
69
plugin_license_type license; /* plugin license (PLUGIN_LICENSE_XXX) */
70
initialize_func_t init; /* function to invoke when plugin is loaded */
72
options_func_t init_options; /* register command line options */
75
} /* namespace module */
76
} /* namespace drizzled */
78
#endif /* DRIZZLED_MODULE_MANIFEST_H */