~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.61 by Monty Taylor
Moved a few things around in headers.
28
struct st_plugin_int;
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
29
class StorageEngine;
971.1.68 by Monty Taylor
Renamed ST_SCHEMA_TABLE to InfoSchemaTable. One step down towards making the darned thing a class. (/me shudders)
30
struct InfoSchemaTable;
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
31
class Function_builder;
32
class Logging_handler;
33
class Error_message_handler;
34
class Authentication;
35
class QueryCache;
36
class SchedulerFactory;
37
class ProtocolFactory;
971.1.49 by Monty Taylor
Hooked transaction_services into Plugin_registry.
38
namespace drizzled
39
{
40
namespace plugin
41
{
42
class Replicator;
43
}
44
}
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
45
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
46
class PluginRegistry
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
47
{
48
private:
49
  std::map<std::string, st_plugin_int *>
971.1.54 by Monty Taylor
Trimmed out some plugin type stuff.
50
    plugin_map;
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
51
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
52
  PluginRegistry(const PluginRegistry&);
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
53
public:
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
54
  PluginRegistry() {}
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
55
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
56
971.1.54 by Monty Taylor
Trimmed out some plugin type stuff.
57
  st_plugin_int *find(const LEX_STRING *name);
58
59
  void add(st_plugin_int *plugin);
60
61
  std::vector<st_plugin_int *> get_list(bool active);
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
62
  static PluginRegistry& getPluginRegistry();
63
64
  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)
65
  void add(InfoSchemaTable *schema_table);
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
66
  void add(Function_builder *udf);
67
  void add(Logging_handler *handler);
68
  void add(Error_message_handler *handler);
69
  void add(Authentication *auth);
70
  void add(QueryCache *qcache);
71
  void add(SchedulerFactory *scheduler);
72
  void add(ProtocolFactory *protocol);
73
  void add(drizzled::plugin::Replicator *repl);
74
75
  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)
76
  void remove(InfoSchemaTable *schema_table);
971.1.52 by Monty Taylor
Did the finalizers. Renamed plugin_registry.
77
  void remove(Function_builder *udf);
78
  void remove(Logging_handler *handler);
79
  void remove(Error_message_handler *handler);
80
  void remove(Authentication *auth);
81
  void remove(QueryCache *qcache);
82
  void remove(SchedulerFactory *scheduler);
83
  void remove(ProtocolFactory *protocol);
84
  void remove(drizzled::plugin::Replicator *repl);
971.1.46 by Monty Taylor
Made plugin registration go through Plugin_registry.
85
908.2.1 by Monty Taylor
First pass at refactoring plugins - factored out sql_map.
86
};
971.1.45 by Monty Taylor
Collapsed plugin_registry. _impl class not needed.
87
88
#endif /* DRIZZLED_PLUGIN_REGISTRY_H */