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 struct ctdb_context *ctdb_connect(const char *addr);
25 int ctdb_get_fd(struct ctdb_context *ctdb);
27 int ctdb_which_events(struct ctdb_context *ctdb);
29 int ctdb_service(struct ctdb_context *ctdb);
33 typedef void ctdb_handle;
37 * function to cancel a request/call
39 int ctdb_cancel(ctdb_handle *);
46 typedef void (*ctdb_message_fn_t)(struct ctdb_context *, uint64_t srvid, TDB_DATA data, void *);
48 typedef void (*ctdb_set_message_handler_cb)(int32_t status, void *private_data);
51 ctdb_set_message_handler_send(struct ctdb_context *ctdb, uint64_t srvid,
52 ctdb_set_message_handler_cb callback,
53 ctdb_message_fn_t handler, void *private_data);
55 int ctdb_set_message_handler_recv(struct ctdb_context *ctdb,
58 int ctdb_set_message_handler(struct ctdb_context *ctdb, uint64_t srvid,
59 ctdb_message_fn_t handler, void *private_data);
62 typedef void (*ctdb_remove_message_handler_cb)(int32_t status, void *private_data);
65 ctdb_remove_message_handler_send(struct ctdb_context *ctdb, uint64_t srvid,
66 ctdb_remove_message_handler_cb callback,
69 int ctdb_remove_message_handler_recv(struct ctdb_context *ctdb,
72 int ctdb_remove_message_handler(struct ctdb_context *ctdb, uint64_t srvid,
75 int ctdb_send_message(struct ctdb_context *ctdb, uint32_t pnn, uint64_t srvid, TDB_DATA data);
81 * functions to read the recovery master of a node
83 typedef void (*ctdb_get_recmaster_cb)(int32_t status, int32_t recmaster, void *private_data);
86 ctdb_getrecmaster_send(struct ctdb_context *ctdb,
88 ctdb_get_recmaster_cb callback,
90 int ctdb_getrecmaster_recv(struct ctdb_context *ctdb,
93 int ctdb_getrecmaster(struct ctdb_context *ctdb,