[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] KMail dimap cache migration
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2010-05-19 11:14:17
Message-ID: 201005191314.22404.kevin.krammer () gmx ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi all,

during last week I have been working on an Akonadi resource for KMail's main 
local mail directory.
This is basically a maildir tree with binary index files (though here can be 
MBox files in it as well).

Now, the dimap cache is almost identical, it is also a top level directory 
with nested maildir trees, each maildir directory having an index file.

Part of these index files are the IMAP UIDs of the messages.

I've experiemented a bit and I think I can import the dimap cache on 
migration.

There are two approaches that I think would work:

1) let the IMAP resource sync the collection tree and then, for each 
collection, look up the cache collection. Load the cache collection's items 
and set the remoteId to the UID from the index file.
Use ItemCreateJob with a session object that uses the resource's identifier, 
thus making the adding "invisible" to the resource (it is using the same 
session identifier, its monitor filters on that).

2) let the IMAP resource sync the collection tree but also all items, header-
only.
Let the migrator react to each "itemAdded" with a lookup based on UID and do 
an ItemModifyJob with the FullPayload, again using the "hidden session" trick.

I have basic testing for the first approach. For the second I am not sure how 
Akonadi will treat the full payload if the cache policy is only specifying 
headers.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic