From f7548d6d28c313cf80e6f3ef89aed16a19815df1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:51:24 +0200 Subject: Adding upstream version 1:2.3.19.1+dfsg1. Signed-off-by: Daniel Baumann --- src/imap-hibernate/imap-client.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/imap-hibernate/imap-client.h (limited to 'src/imap-hibernate/imap-client.h') diff --git a/src/imap-hibernate/imap-client.h b/src/imap-hibernate/imap-client.h new file mode 100644 index 0000000..b6bb0e6 --- /dev/null +++ b/src/imap-hibernate/imap-client.h @@ -0,0 +1,40 @@ +#ifndef IMAP_CLIENT_H +#define IMAP_CLIENT_H + +#include "net.h" + +struct imap_client_state { + /* required: */ + const char *username, *mail_log_prefix; + /* optional: */ + const char *session_id, *mailbox_vname, *userdb_fields, *stats; + struct ip_addr local_ip, remote_ip; + in_port_t local_port, remote_port; + time_t session_created; + + uid_t uid; + gid_t gid; + + dev_t peer_dev; + ino_t peer_ino; + + char *tag; + const unsigned char *state; + size_t state_size; + + unsigned int imap_idle_notify_interval; + bool idle_cmd; + bool have_notify_fd; + bool anvil_sent; +}; + +struct imap_client * +imap_client_create(int fd, const struct imap_client_state *state); +void imap_client_add_notify_fd(struct imap_client *client, int fd); +void imap_client_create_finish(struct imap_client *client); +void imap_client_destroy(struct imap_client **_client, const char *reason); + +void imap_clients_init(void); +void imap_clients_deinit(void); + +#endif -- cgit v1.2.3