ctdbd_conn: move CTDB_CONTROL_ENABLE_SEQNUM control to db_open_ctdb
[vlendec/samba-autobuild/.git] / source3 / lib / messages_dgm.h
index be4b1e5eec0b889624907407a8c9a2c00a76e532..ca11db1dacf1a516e06a3190e5f82c6d404687e5 100644 (file)
 #ifndef _MESSAGES_DGM_H_
 #define _MESSAGES_DGM_H_
 
+#include "replace.h"
+#include "system/filesys.h"
+#include <tevent.h>
+
 int messaging_dgm_init(struct tevent_context *ev,
-                      struct server_id pid,
-                      const char *cache_dir,
-                      uid_t dir_owner,
-                      void (*recv_cb)(const uint8_t *msg,
+                      uint64_t *unique,
+                      const char *socket_dir,
+                      const char *lockfile_dir,
+                      void (*recv_cb)(struct tevent_context *ev,
+                                      const uint8_t *msg,
                                       size_t msg_len,
-                                      const int *fds,
+                                      int *fds,
                                       size_t num_fds,
                                       void *private_data),
                       void *recv_cb_private_data);
 void messaging_dgm_destroy(void);
+int messaging_dgm_get_unique(pid_t pid, uint64_t *unique);
 int messaging_dgm_send(pid_t pid,
                       const struct iovec *iov, int iovlen,
                       const int *fds, size_t num_fds);
 int messaging_dgm_cleanup(pid_t pid);
 int messaging_dgm_wipe(void);
-void *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx,
-                                           struct tevent_context *ev);
+
+struct messaging_dgm_fde;
+struct messaging_dgm_fde *messaging_dgm_register_tevent_context(
+       TALLOC_CTX *mem_ctx, struct tevent_context *ev);
+bool messaging_dgm_fde_active(struct messaging_dgm_fde *fde);
 
 #endif