~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/manifest.h

  • Committer: Brian Aker
  • Date: 2009-01-17 02:46:52 UTC
  • Revision ID: brian@gir-3.local-20090117024652-4ducefje08ajbs1q
Refactor append_identifier and remove dead OPTION_QUOTE_SHOW_CREATE option
(we always quote).

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
23
 
/**
24
 
 * @file Defines a Plugin Manifest
25
 
 *
26
 
 * A plugin::Manifest is the struct contained in every Plugin Library.
27
 
 */
28
 
 
29
 
#include "drizzled/plugin/context.h"
30
 
 
31
 
namespace drizzled
32
 
{
33
 
 
34
 
struct drizzle_show_var;
35
 
struct drizzle_sys_var;
36
 
 
37
 
/* We use the following strings to define licenses for plugins */
38
 
enum plugin_license_type {
39
 
  PLUGIN_LICENSE_GPL,
40
 
  PLUGIN_LICENSE_BSD,
41
 
  PLUGIN_LICENSE_LGPL,
42
 
  PLUGIN_LICENSE_PROPRIETARY,
43
 
  PLUGIN_LICENSE_MAX=PLUGIN_LICENSE_LGPL
44
 
};
45
 
 
46
 
 
47
 
namespace plugin
48
 
{
49
 
 
50
 
typedef int (*initialize_func_t)(Context &);
51
 
 
52
 
/**
53
 
 * Plugin Manfiest
54
 
 *
55
 
 * One Manifest is required per plugin library which is to be dlopened
56
 
 *
57
 
 * This is a struct and not a class because it is staticly defined in the
58
 
 * plugin objects and needs to be a POD as it can, or else it won't compile.
59
 
 */
60
 
struct Manifest
61
 
{
62
 
  uint64_t drizzle_version;  /* Drizzle version the plugin was compiled for  */
63
 
  const char *name;          /* plugin name (for SHOW PLUGINS)               */
64
 
  const char *version;       /* plugin version (for SHOW PLUGINS)            */
65
 
  const char *author;        /* plugin author (for SHOW PLUGINS)             */
66
 
  const char *descr;         /* general descriptive text (for SHOW PLUGINS ) */
67
 
  plugin_license_type license; /* plugin license (PLUGIN_LICENSE_XXX)          */
68
 
  initialize_func_t init;     /* function to invoke when plugin is loaded     */
69
 
  drizzle_sys_var **system_vars;
70
 
  void *reserved1;           /* reserved for dependency checking             */
71
 
};
72
 
 
73
 
} /* namespace plugin */
74
 
} /* namespace drizzled */
75
 
 
76
 
#endif /* DRIZZLED_PLUGIN_MANIFEST_H */