]> 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)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 17 Jan 2019 11:03:29 +0000 (11:03 +0000)
src/imap/imap-client.c
src/imap/imap-client.h

index f200f7e4b3322eb2a27f242dbcdea6c4f444950f..0cb9cb28d2aa1598961217045d1d27b9c7b075d9 100644 (file)
@@ -1594,9 +1594,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 11e541730cef8092d7c5ee5df3f0c761c480ad5b..22933e35a4318edeaa22bf49880916631e215ac2 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 {