[RFC] : coherent message add/delete notification
- From: Emmanuel <e allaud wanadoo fr>
- To: ML de Balsa <balsa-list gnome org>
- Subject: [RFC] : coherent message add/delete notification
- Date: Fri, 31 May 2002 18:52:37 +0200
Hi all,
Tim and I was discussing about filters being run upon reception that will
let deleted messages even if you had checked "hide deleted" or "delete
irremediably...".
Finally I think this is an issue rooted deeper than filters. For me it is
the add/delete messages scheme that lacks a coherent notification. We
should emit the mailbox notification messages (either "MESSAGE[S]_DELETE"
for deletion or "MESSAGES_NEW" for adding) within the functions that are
used to add/delete messages (libbalsa_message[s]_delete/copy, this is
sufficient because libbalsa_message[s]_move rely on
libbalsa_message[s]_delete). That is the backend should send notification
of what it is doing to let the frontend refresh or take actions depending
of user pref (esp. the index displaying the mailbox will use this
notification to know if it removes the messages being deleted depending on
"hide deleted" pref and friends).
The way I would do it :
* all backend messages moving/copying messages and involving a
mailbox should send the notification themselves : in fact there is now
only libbalsa_message[s]_copy(dest_mailbox,messages) in that case, and it
should tell the dest_mailbox that it has new messages (sending it the
"MESSAGES_NEW" message).
* all backend messages moving/copying messages not involving a
mailbox should not notify themselves; indeed for example think of
libbalsa_messages_delete(messages), their is no garantee that the list of
messages to delete all come from the same mailbox, so there, this should
be the responsability of the caller (which knows about the mailbox[es]
being altered) to send the notification (ie send "MESSAGES_DELETE" to the
mailbox[es]).
Is this OK for everyone, comments?
Anyway if you propose something else we should really clean this issue to
have a coherent messaging scheme to be more efficient that now (there is a
lot of wasted time to sync things in the balsa index code because of lack
of reliable notfication).
Bye
Manu
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]