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"
24 #include "client/client.h"
26 struct ctdb_db_context
{
27 struct ctdb_db_context
*prev
, *next
;
31 struct tdb_wrap
*ltdb
;
35 struct ctdb_client_context
{
36 struct reqid_context
*idr
;
37 struct srvid_context
*srv
;
38 struct comm_context
*comm
;
39 ctdb_client_callback_func_t callback
;
43 struct ctdb_db_context
*db
;
46 struct ctdb_record_handle
{
47 struct tevent_context
*ev
;
48 struct ctdb_client_context
*client
;
49 struct ctdb_db_context
*db
;
50 struct ctdb_ltdb_header header
;
52 TDB_DATA data
; /* This is returned from tdb_fetch() */
56 struct ctdb_transaction_handle
{
57 struct tevent_context
*ev
;
58 struct ctdb_client_context
*client
;
59 struct ctdb_db_context
*db
, *db_g_lock
;
60 struct ctdb_rec_buffer
*recbuf
;
61 struct ctdb_server_id sid
;
62 const char *lock_name
;
67 /* From client_call.c */
69 void ctdb_client_reply_call(struct ctdb_client_context
*client
,
70 uint8_t *buf
, size_t buflen
, uint32_t reqid
);
72 /* From client_message.c */
74 void ctdb_client_req_message(struct ctdb_client_context
*client
,
75 uint8_t *buf
, size_t buflen
, uint32_t reqid
);
77 /* From client_control.c */
79 void ctdb_client_reply_control(struct ctdb_client_context
*client
,
80 uint8_t *buf
, size_t buflen
, uint32_t reqid
);
82 #endif /* __CTDB_CLIENT_PRIVATE_H__ */