~drizzle-trunk/drizzle/development

908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2008 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
971.1.45 by Monty Taylor
Collapsed plugin_registry. _impl class not needed.
20
#ifndef DRIZZLED_PLUGIN_REGISTRY_H
21
#define DRIZZLED_PLUGIN_REGISTRY_H
22
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
23
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
24
#include <string>
25
#include <vector>
26
#include <map>
27
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
28
class StorageEngine;
1063.4.6 by Padraig O'Sullivan
Added a new header file which contains the InfoSchemaTable class and the
29
class InfoSchemaTable;
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
30
class Function_builder;
31
class Logging_handler;
32
class Error_message_handler;
33
class Authentication;
34
class QueryCache;
35
class SchedulerFactory;
971.3.48 by Eric Day
New Listen interface about done, not quite compiling yet, but need a backup.
36
class Listen;
1039.5.37 by Jay Pipes
Merge trunk
37
971.1.49 by Monty Taylor
Hooked transaction_services into Plugin_registry.
38
namespace drizzled
39
{
40
namespace plugin
41
{
42
class Replicator;
1039.5.1 by Jay Pipes
* New serial event log plugin
43
class Applier;
1093.3.1 by Monty Taylor
Rename of plugin classes.
44
class Handle;
971.1.49 by Monty Taylor
Hooked transaction_services into Plugin_registry.
45
}
46
}
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
47
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
48
class PluginRegistry
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
49
{
50
private:
1093.3.1 by Monty Taylor
Rename of plugin classes.
51
  std::map<std::string, drizzled::plugin::Handle *>
971.1.54 by Monty Taylor
Trimmed out some plugin type stuff.
52
    plugin_map;
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
53
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
54
  PluginRegistry(const PluginRegistry&);
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
55
public:
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
56
  PluginRegistry() {}
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
57
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
58
1093.3.1 by Monty Taylor
Rename of plugin classes.
59
  drizzled::plugin::Handle *find(const LEX_STRING *name);
60
61
  void add(drizzled::plugin::Handle *plugin);
62
63
  std::vector<drizzled::plugin::Handle *> get_list(bool active);
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
64
  static PluginRegistry& getPluginRegistry();
65
66
  void add(StorageEngine *engine);
971.1.68 by Monty Taylor
Renamed ST_SCHEMA_TABLE to InfoSchemaTable. One step down towards making the darned thing a class. (/me shudders)
67
  void add(InfoSchemaTable *schema_table);
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
68
  void add(Function_builder *udf);
69
  void add(Logging_handler *handler);
70
  void add(Error_message_handler *handler);
71
  void add(Authentication *auth);
72
  void add(QueryCache *qcache);
73
  void add(SchedulerFactory *scheduler);
1039.5.1 by Jay Pipes
* New serial event log plugin
74
  void add(drizzled::plugin::Replicator *replicator);
75
  void add(drizzled::plugin::Applier *applier);
971.3.51 by Eric Day
Finished up new Listen plugin interface.
76
  void add(const Listen &listen_obj);
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
77
78
  void remove(StorageEngine *engine);
971.1.68 by Monty Taylor
Renamed ST_SCHEMA_TABLE to InfoSchemaTable. One step down towards making the darned thing a class. (/me shudders)
79
  void remove(InfoSchemaTable *schema_table);
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
80
  void remove(Function_builder *udf);
81
  void remove(Logging_handler *handler);
82
  void remove(Error_message_handler *handler);
83
  void remove(Authentication *auth);
84
  void remove(QueryCache *qcache);
85
  void remove(SchedulerFactory *scheduler);
1039.5.1 by Jay Pipes
* New serial event log plugin
86
  void remove(drizzled::plugin::Replicator *replicator);
87
  void remove(drizzled::plugin::Applier *applier);
971.3.51 by Eric Day
Finished up new Listen plugin interface.
88
  void remove(const Listen &listen_obj);
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
89
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
90
};
971.1.45 by Monty Taylor
Collapsed plugin_registry. _impl class not needed.
91
92
#endif /* DRIZZLED_PLUGIN_REGISTRY_H */