~drizzle-trunk/drizzle/development

636.1.1 by Mark Atwood
add replicator plugin type
1
/*
2
  -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
3
  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
660.1.3 by Eric Herman
removed trailing whitespace with simple script:
5
  *  Definitions required for Configuration Variables plugin
636.1.1 by Mark Atwood
add replicator plugin type
6
7
  *  Copyright (C) 2008 Mark Atwood
8
  *
9
  *  This program is free software; you can redistribute it and/or modify
10
  *  it under the terms of the GNU General Public License as published by
11
  *  the Free Software Foundation; version 2 of the License.
12
  *
13
  *  This program is distributed in the hope that it will be useful,
14
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
  *  GNU General Public License for more details.
17
  *
18
  *  You should have received a copy of the GNU General Public License
19
  *  along with this program; if not, write to the Free Software
20
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21
  */
22
23
#ifndef DRIZZLED_PLUGIN_REPLICATOR_H
24
#define DRIZZLED_PLUGIN_REPLICATOR_H
25
26
typedef struct replicator_st
27
{
661 by Brian Aker
First major pass through new replication.
28
  bool enabled;
636.1.1 by Mark Atwood
add replicator plugin type
29
  /* todo, define this api */
30
  /* this is the API that a replicator plugin must implement.
31
     it should implement each of these function pointers.
32
     if a function returns bool true, that means it failed.
33
     if a function pointer is NULL, that's ok.
34
  */
35
667 by Brian Aker
Partial fix (more of replication flushed out)
36
  bool (*session_init)(Session *session);
661 by Brian Aker
First major pass through new replication.
37
  bool (*row_insert)(Session *session, Table *table);
665.1.1 by Eric Herman
more EOL whitespace fixups
38
  bool (*row_update)(Session *session, Table *table,
39
                     const unsigned char *before,
661 by Brian Aker
First major pass through new replication.
40
                     const unsigned char *after);
41
  bool (*row_delete)(Session *session, Table *table);
663 by Brian Aker
End points on new replication (aka end transaction)
42
  bool (*end_transaction)(Session *session, bool autocommit, bool commit);
667 by Brian Aker
Partial fix (more of replication flushed out)
43
  bool (*statement)(Session *session, const char *query, size_t query_length);
636.1.1 by Mark Atwood
add replicator plugin type
44
} replicator_t;
45
46
#endif /* DRIZZLED_PLUGIN_REPLICATOR_H */