return -1;
mail_namespaces_set_storage_callbacks(client->user->namespaces,
&mail_storage_callbacks, client);
+
+ client->v.init(client);
return 0;
}
+static void client_default_init(struct client *client ATTR_UNUSED)
+{
+ /* nothing */
+}
+
void client_command_cancel(struct client_command_context **_cmd)
{
struct client_command_context *cmd = *_cmd;
}
struct imap_client_vfuncs imap_client_vfuncs = {
+ .init = client_default_init,
.destroy = client_default_destroy,
.send_tagline = client_default_send_tagline,
};
struct imap_client_vfuncs {
+ /* Perform client initialization. This is called when client creation is
+ finished completely. Particulary, at this point the namespaces are
+ fully initialized, which is not the case for the client create hook.
+ */
+ void (*init)(struct client *client);
/* Destroy the client.*/
void (*destroy)(struct client *client, const char *reason);