diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/imap-hibernate/imap-client.h | |
parent | Initial commit. (diff) | |
download | dovecot-upstream.tar.xz dovecot-upstream.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/imap-hibernate/imap-client.h | 40 |
1 files changed, 40 insertions, 0 deletions
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 |