4 Copyright (C) Ronnie sahlberg 2010
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; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>.
23 /* all functions except libctdb_connect() and libctdb_service()
27 struct ctdb_context *libctdb_connect(const char *addr);
29 int libctdb_get_fd(struct ctdb_context *ctdb);
31 int libctdb_which_events(struct ctdb_context *ctdb);
33 int libctdb_service(struct ctdb_context *ctdb);
37 typedef void libctdb_handle;
40 typedef void (*get_recmaster_cb)(int32_t status, int32_t recmaster, void *private_data);
45 libctdb_getrecmaster_send(struct ctdb_context *ctdb,
47 get_recmaster_cb callback,
49 int libctdb_getrecmaster_recv(struct ctdb_context *ctdb,
50 libctdb_handle *handle,
52 int libctdb_getrecmaster(struct ctdb_context *ctdb,
57 int libctdb_cancel(libctdb_handle *);