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/lib-imap-client/imapc-client-private.h | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.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 'src/lib-imap-client/imapc-client-private.h')
-rw-r--r-- | src/lib-imap-client/imapc-client-private.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/lib-imap-client/imapc-client-private.h b/src/lib-imap-client/imapc-client-private.h new file mode 100644 index 0000000..98c4e8e --- /dev/null +++ b/src/lib-imap-client/imapc-client-private.h @@ -0,0 +1,63 @@ +#ifndef IMAPC_CLIENT_PRIVATE_H +#define IMAPC_CLIENT_PRIVATE_H + +#include "imapc-client.h" + +#define IMAPC_CLIENT_IDLE_SEND_DELAY_MSECS 100 + +struct imapc_client_connection { + struct imapc_connection *conn; + struct imapc_client *client; + struct imapc_client_mailbox *box; +}; + +struct imapc_client { + pool_t pool; + int refcount; + + struct event *event; + struct imapc_client_settings set; + struct ssl_iostream_context *ssl_ctx; + + imapc_untagged_callback_t *untagged_callback; + void *untagged_context; + + imapc_state_change_callback_t *state_change_callback; + void *state_change_context; + + imapc_command_callback_t *login_callback; + void *login_context; + + ARRAY(struct imapc_client_connection *) conns; + bool logging_out; + + struct ioloop *ioloop; + bool stop_on_state_finish; +}; + +struct imapc_client_mailbox { + struct imapc_client *client; + struct imapc_connection *conn; + struct imapc_msgmap *msgmap; + struct timeout *to_send_idle; + + void (*reopen_callback)(void *context); + void *reopen_context; + + void *untagged_box_context; + + bool reconnect_ok; + bool reconnecting; + bool closing; +}; + +extern unsigned int imapc_client_cmd_tag_counter; + +void imapc_client_ref(struct imapc_client *client); +void imapc_client_unref(struct imapc_client **client); + +void imapc_command_set_mailbox(struct imapc_command *cmd, + struct imapc_client_mailbox *box); +void imapc_client_try_stop(struct imapc_client *client); + +#endif |