2 CTDB event daemon client
4 Copyright (C) Amitay Isaacs 2018
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_EVENT_H__
21 #define __CTDB_EVENT_H__
23 #include "event/event_protocol.h"
25 struct ctdb_event_context
;
27 int ctdb_event_init(TALLOC_CTX
*mem_ctx
,
28 struct tevent_context
*ev
,
29 struct ctdb_event_context
**result
);
31 struct tevent_req
*ctdb_event_run_send(TALLOC_CTX
*mem_ctx
,
32 struct tevent_context
*ev
,
33 struct ctdb_event_context
*eclient
,
34 struct ctdb_event_request_run
*run
);
35 bool ctdb_event_run_recv(struct tevent_req
*req
, int *perr
, int *result
);
37 struct tevent_req
*ctdb_event_status_send(
39 struct tevent_context
*ev
,
40 struct ctdb_event_context
*eclient
,
41 struct ctdb_event_request_status
*status
);
42 bool ctdb_event_status_recv(struct tevent_req
*req
,
46 struct ctdb_event_reply_status
**status
);
48 struct tevent_req
*ctdb_event_script_send(
50 struct tevent_context
*ev
,
51 struct ctdb_event_context
*eclient
,
52 struct ctdb_event_request_script
*script
);
53 bool ctdb_event_script_recv(struct tevent_req
*req
, int *perr
, int *result
);
55 #endif /* __CTDB_EVENT_H__ */