4 Copyright (C) Amitay Isaacs 2015
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/>.
20 #ifndef __CTDB_CLIENT_PRIVATE_H__
21 #define __CTDB_CLIENT_PRIVATE_H__
23 #include "protocol/protocol.h"
25 struct ctdb_db_context {
26 struct ctdb_db_context *prev, *next;
30 struct tdb_wrap *ltdb;
34 struct ctdb_client_context {
35 struct reqid_context *idr;
36 struct srvid_context *srv;
37 struct comm_context *comm;
40 struct ctdb_db_context *db;
43 struct ctdb_record_handle {
44 struct tevent_context *ev;
45 struct ctdb_client_context *client;
46 struct ctdb_db_context *db;
47 struct ctdb_ltdb_header header;
49 TDB_DATA data; /* This is returned from tdb_fetch() */
53 struct ctdb_transaction_handle {
54 struct tevent_context *ev;
55 struct ctdb_client_context *client;
56 struct ctdb_db_context *db, *db_g_lock;
57 struct ctdb_rec_buffer *recbuf;
58 struct ctdb_server_id sid;
59 const char *lock_name;
64 /* From client_call.c */
66 void ctdb_client_reply_call(struct ctdb_client_context *client,
67 uint8_t *buf, size_t buflen, uint32_t reqid);
69 /* From client_message.c */
71 void ctdb_client_req_message(struct ctdb_client_context *client,
72 uint8_t *buf, size_t buflen, uint32_t reqid);
74 /* From client_control.c */
76 void ctdb_client_reply_control(struct ctdb_client_context *client,
77 uint8_t *buf, size_t buflen, uint32_t reqid);
79 #endif /* __CTDB_CLIENT_PRIVATE_H__ */