dovecot-2.0: lib-storage: mail_user.get_temp_prefix() method added.

dovecot at dovecot.org dovecot at dovecot.org
Tue May 25 22:03:43 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/e63dd7e7ea6e
changeset: 11371:e63dd7e7ea6e
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 25 20:02:51 2010 +0100
description:
lib-storage: mail_user.get_temp_prefix() method added.

diffstat:

 src/lib-storage/mail-user.c |  10 +++++++++-
 src/lib-storage/mail-user.h |   1 +
 2 files changed, 10 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r f0141862bdca -r e63dd7e7ea6e src/lib-storage/mail-user.c
--- a/src/lib-storage/mail-user.c	Tue May 25 19:52:07 2010 +0100
+++ b/src/lib-storage/mail-user.c	Tue May 25 20:02:51 2010 +0100
@@ -23,6 +23,8 @@
 struct mail_user_module_register mail_user_module_register = { 0 };
 struct auth_master_connection *mail_user_auth_master_conn;
 
+static const char *mail_user_get_temp_prefix_base(struct mail_user *user);
+
 static void mail_user_deinit_base(struct mail_user *user)
 {
 	mail_namespaces_deinit(&user->namespaces);
@@ -48,6 +50,7 @@
 	user->unexpanded_set = settings_dup(set_info, set, pool);
 	user->set = settings_dup(set_info, set, pool);
 	user->v.deinit = mail_user_deinit_base;
+	user->v.get_temp_prefix = mail_user_get_temp_prefix_base;
 	p_array_init(&user->module_contexts, user->pool, 5);
 	return user;
 }
@@ -329,7 +332,7 @@
 	return 0;
 }
 
-const char *mail_user_get_temp_prefix(struct mail_user *user)
+static const char *mail_user_get_temp_prefix_base(struct mail_user *user)
 {
 	struct mail_namespace *ns;
 	const char *dir;
@@ -352,6 +355,11 @@
 			   mailbox_list_get_temp_prefix(ns->list), NULL);
 }
 
+const char *mail_user_get_temp_prefix(struct mail_user *user)
+{
+	return user->v.get_temp_prefix(user);
+}
+
 const char *mail_user_get_anvil_userip_ident(struct mail_user *user)
 {
 	if (user->remote_ip == NULL)
diff -r f0141862bdca -r e63dd7e7ea6e src/lib-storage/mail-user.h
--- a/src/lib-storage/mail-user.h	Tue May 25 19:52:07 2010 +0100
+++ b/src/lib-storage/mail-user.h	Tue May 25 20:02:51 2010 +0100
@@ -8,6 +8,7 @@
 
 struct mail_user_vfuncs {
 	void (*deinit)(struct mail_user *user);
+	const char *(*get_temp_prefix)(struct mail_user *user);
 };
 
 struct mail_user {


More information about the dovecot-cvs mailing list