[Kroupware] Fwd: [Bug 57826] New: All folders are deleted on
IMAP server
Zack Rusin
zack at kde.org
Mon May 5 15:45:40 CEST 2003
On Sunday 04 May 2003 13:27, Ingo Klöcker wrote:
> One possible solution would be that KMail logs every action which is
> done locally to disc. imap folders. Only actions which are in the log
> should be performed on the server during synchronization. If the
> disc. imap folders are deleted locally by KMail 1.5 this deletion is
> not mentioned in the logs and therefore KMail/Kroupware wouldn't
> delete anything from the server.
That was also one of the reasons why I wrote the jobs interface in
folders. Logging would involve some addition to CachedImapJobs. But
what we could do is simply hold a QPtrQueue<CachedImapJob> in the
KMFolderCachedImap, we could insert every CachedImapJob in the queue
without calling start() on it. Meaning it would simply be cached there.
Now during the synchronization we do :
while( !mCachedJobs.isEmpty() )
mCachedJobs.dequeue()->start();
And we'd execute all jobs which have been explicitely specified by the
user. This way we could also have a task viewer which could be showing
what jobs are pending. Furthermore if we'd like to keep the jobs
between the sessions, I could add a QDataStream serialization to
FolderJob's.
I don't think this would have a significant impact on performance if at
all so that's probably the way to go.
What would have to be changed in CachedImapJobs is that the execution of
them would be a two step process.
1) On creation they would perform the local action (e.g. delete the
message)
2) On calling start() it would perform the action on the server.
So the synchronization would start by executing all cached jobs and then
a list to check whether folder hierarchies are the same (locally and on
the server) and if they're not then the local folders are updated to
match the structure on the server (never the other way round).
Zack
--
Logic: The art of being wrong with confidence...
More information about the Kroupware
mailing list