1286.1.4
by Brian Aker
Style change in Archive. Split a few files out. |
1 |
/* Copyright (C) 2010 Brian Aker
|
2 |
||
3 |
This program is free software; you can redistribute it and/or modify
|
|
4 |
it under the terms of the GNU General Public License as published by
|
|
5 |
the Free Software Foundation; version 2 of the License.
|
|
6 |
||
7 |
This program is distributed in the hope that it will be useful,
|
|
8 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
9 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
10 |
GNU General Public License for more details.
|
|
11 |
||
12 |
You should have received a copy of the GNU General Public License
|
|
13 |
along with this program; if not, write to the Free Software
|
|
1802.10.2
by Monty Taylor
Update all of the copyright headers to include the correct address. |
14 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
1286.1.4
by Brian Aker
Style change in Archive. Split a few files out. |
15 |
|
16 |
||
17 |
#include "config.h" |
|
18 |
||
19 |
#include "plugin/archive/archive_engine.h" |
|
20 |
||
21 |
using namespace std; |
|
22 |
using namespace drizzled; |
|
23 |
||
24 |
static ArchiveEngine *archive_engine= NULL; |
|
25 |
||
26 |
static bool archive_use_aio= false; |
|
27 |
||
28 |
/* Used by the engie to determine the state of the archive AIO state */
|
|
29 |
bool archive_aio_state(void); |
|
30 |
||
31 |
bool archive_aio_state(void) |
|
32 |
{
|
|
33 |
return archive_use_aio; |
|
34 |
}
|
|
35 |
||
1530.2.6
by Monty Taylor
Moved plugin::Context to module::Context. |
36 |
static int init(drizzled::module::Context &context) |
1286.1.4
by Brian Aker
Style change in Archive. Split a few files out. |
37 |
{
|
38 |
||
39 |
archive_engine= new ArchiveEngine(); |
|
1863.1.2
by Monty Taylor
auth_file |
40 |
context.registerVariable(new sys_var_bool_ptr("aio", &archive_use_aio)); |
1324.2.2
by Monty Taylor
Use the plugin::Context everywhere. |
41 |
context.add(archive_engine); |
1286.1.4
by Brian Aker
Style change in Archive. Split a few files out. |
42 |
|
43 |
return false; |
|
44 |
}
|
|
45 |
||
46 |
||
47 |
DRIZZLE_DECLARE_PLUGIN
|
|
48 |
{
|
|
49 |
DRIZZLE_VERSION_ID, |
|
50 |
"ARCHIVE", |
|
51 |
"3.5", |
|
52 |
"Brian Aker, MySQL AB", |
|
53 |
"Archive storage engine", |
|
54 |
PLUGIN_LICENSE_GPL, |
|
55 |
init, /* Plugin Init */ |
|
2095.3.1
by Monty Taylor
Re-purpose the old plugin sysvar slot in the struct to be a depends list. |
56 |
NULL, /* depends */ |
1286.1.4
by Brian Aker
Style change in Archive. Split a few files out. |
57 |
NULL /* config options */ |
58 |
}
|
|
59 |
DRIZZLE_DECLARE_PLUGIN_END; |