[dovecot-cvs] dovecot/src/lib-storage mail-storage.h,1.19,1.20
cras at procontrol.fi
cras at procontrol.fi
Mon Nov 25 21:02:52 EET 2002
Update of /home/cvs/dovecot/src/lib-storage
In directory danu:/tmp/cvs-serv2991/src/lib-storage
Modified Files:
mail-storage.h
Log Message:
Locking changes triggered a bit larger cleanup :) If we have to wait for a
lock longer, the client is now notified about it every 30 seconds. Also if
mailbox opening fails because of lock timeout, we won't overwrite the index
anymore. Finally user gets a clear error message about lock timeout instead
of "internal error".
Index: mail-storage.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/mail-storage.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- mail-storage.h 3 Nov 2002 08:39:43 -0000 1.19
+++ mail-storage.h 25 Nov 2002 19:02:50 -0000 1.20
@@ -40,7 +40,7 @@
typedef struct _MailStorage MailStorage;
typedef struct _Mailbox Mailbox;
typedef struct _MailboxStatus MailboxStatus;
-typedef struct _MailboxSyncCallbacks MailboxSyncCallbacks;
+typedef struct _MailStorageCallbacks MailStorageCallbacks;
typedef struct _MailFetchData MailFetchData;
typedef struct _MailFetchBodyData MailFetchBodyData;
typedef struct _MailSearchArg MailSearchArg;
@@ -64,6 +64,10 @@
as a valid parameter to create(). */
int (*autodetect)(const char *data);
+ /* Set storage callback functions to use. */
+ void (*set_callbacks)(MailStorage *storage,
+ MailStorageCallbacks *callbacks, void *context);
+
/* Open a mailbox. If readonly is TRUE, mailbox must not be
modified in any way even when it's asked. If fast is TRUE,
any extra time consuming operations shouldn't be performed
@@ -112,6 +116,9 @@
char *dir; /* root directory */
char *user; /* name of user accessing the storage */
char *error;
+
+ MailStorageCallbacks *callbacks;
+ void *callback_context;
};
struct _Mailbox {
@@ -123,11 +130,6 @@
the mailbox was closed anyway. */
int (*close)(Mailbox *box);
- /* Set synchronization callback functions to use. */
- void (*set_sync_callbacks)(Mailbox *box,
- MailboxSyncCallbacks *callbacks,
- void *context);
-
/* Gets the mailbox status information. */
int (*get_status)(Mailbox *box, MailboxStatusItems items,
MailboxStatus *status);
@@ -199,9 +201,13 @@
const char **custom_flags;
};
-struct _MailboxSyncCallbacks {
+struct _MailStorageCallbacks {
/* Alert: Not enough disk space */
void (*alert_no_diskspace)(Mailbox *mailbox, void *context);
+ /* "* OK <text>" */
+ void (*notify_ok)(Mailbox *mailbox, const char *text, void *context);
+ /* "* NO <text>" */
+ void (*notify_no)(Mailbox *mailbox, const char *text, void *context);
/* EXPUNGE */
void (*expunge)(Mailbox *mailbox, unsigned int seq, void *context);
More information about the dovecot-cvs
mailing list