]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: client: Rearrange and document the client vfuncs.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sat, 5 Jan 2019 18:43:49 +0000 (19:43 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 25 Jun 2019 13:13:00 +0000 (16:13 +0300)
src/imap/imap-client.c
src/imap/imap-client.h

index 478a7b6b9127296205957604c62ffcffc657dc48..e6a4ca3439ebe4f8882d7b4ac615db35be0c52c4 100644 (file)
@@ -1595,9 +1595,11 @@ void clients_destroy_all(void)
 }
 
 struct imap_client_vfuncs imap_client_vfuncs = {
-       imap_state_export_base,
-       imap_state_import_base,
-       client_default_destroy,
-       client_default_send_tagline,
-       client_default_sync_notify_more,
+       .destroy = client_default_destroy,
+
+       .send_tagline = client_default_send_tagline,
+       .sync_notify_more = client_default_sync_notify_more,
+
+       .state_export = imap_state_export_base,
+       .state_import = imap_state_import_base,
 };
index 42d987eb143246d7e9f271f9908b7838cab0916c..1f234f994399532fb9ca17892d09df0e125049aa 100644 (file)
@@ -119,6 +119,17 @@ struct client_command_context {
 };
 
 struct imap_client_vfuncs {
+       /* Destroy the client.*/
+       void (*destroy)(struct client *client, const char *reason);
+
+       /* Send a tagged response line. */
+       void (*send_tagline)(struct client_command_context *cmd,
+                            const char *data);
+       /* Run "mailbox syncing". This can send any unsolicited untagged
+          replies. Returns 1 = done, 0 = wait for more space in output buffer,
+          -1 = failed. */
+       int (*sync_notify_more)(struct imap_sync_context *ctx);
+
        /* Export client state into buffer. Returns 1 if ok, 0 if some state
           couldn't be preserved, -1 if temporary internal error occurred. */
        int (*state_export)(struct client *client, bool internal,
@@ -130,14 +141,6 @@ struct imap_client_vfuncs {
        ssize_t (*state_import)(struct client *client, bool internal,
                                const unsigned char *data, size_t size,
                                const char **error_r);
-       void (*destroy)(struct client *client, const char *reason);
-
-       void (*send_tagline)(struct client_command_context *cmd,
-                            const char *data);
-       /* Run "mailbox syncing". This can send any unsolicited untagged
-          replies. Returns 1 = done, 0 = wait for more space in output buffer,
-          -1 = failed. */
-       int (*sync_notify_more)(struct imap_sync_context *ctx);
 };
 
 struct client {