1 /* Copyright 2013 Codership Oy <http://www.codership.com>
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
14    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
15 
16 #ifndef WSREP_APPLIER_H
17 #define WSREP_APPLIER_H
18 
19 #include <my_config.h>
20 #include "../wsrep/wsrep_api.h"
21 
22 void wsrep_set_apply_format(THD* thd, Format_description_log_event* ev);
23 Format_description_log_event* wsrep_get_apply_format(THD* thd);
24 
25 /* wsrep callback prototypes */
26 extern "C" {
27 
28 wsrep_cb_status_t wsrep_apply_cb(void *ctx,
29                                  const void* buf, size_t buf_len,
30                                  uint32_t flags,
31                                  const wsrep_trx_meta_t* meta);
32 
33 wsrep_cb_status_t wsrep_commit_cb(void *ctx,
34                                   uint32_t flags,
35                                   const wsrep_trx_meta_t* meta,
36                                   wsrep_bool_t* exit,
37                                   bool commit);
38 
39 wsrep_cb_status_t wsrep_unordered_cb(void*       ctx,
40                                      const void* data,
41                                      size_t      size);
42 
43 } /* extern "C" */
44 #endif /* WSREP_APPLIER_H */
45