Partial message retrieval
This has been implemented (like described on this page)
About
Partial message retrieval means retrieving messages (tny_folder_get_msg) without attachments. Once retrieved a message is usually cached. Because the attachments are not retrieved will this cache consume less disk space. On some devices this might therefore be an important feature (not all devices have gigabytes of storage).
Next to the storage problem it can also greatly reduce bandwidth consumption. GPRS users pay per megabyte downloaded on most networks. Retrieving a large E-mail because of the attachments in it, is often not really a good idea. Yet retrieving just the body and allowing the user to, at a later time, retrieve the attachment of the E-mail is something the E-mail framework could and probably should support.
Design
The current design idea is to add a TnyMsgReceiveStrategy interface to the TnyFolder interface and implementations (TnyCamelFolder and kids) that will have a default TnyCamelFullMsgReceiveStrategy and that can be replaced with a TnyCamelPartialMsgReceiveStrategy.
Extra & to know about this diagram
- Please use ArgoUML and the original .zargo file when modifying the UML class diagram (see below)
- This UML class diagram is not the final design. While coding things might change, of course. Use it as a way of communicating idea and concepts. (if you dislike UML, make sure you do an extremely good job of explaining your ideas in extremely high detail)
- ArgoUML doesn't make it possible to have aggregation between interfaces (nor does it make it possible to have properties on interfaces). Hence why TnyFolder and TnyMsg are marked as abstract classes
Camel-lite changes
All these have been implemented
- Change the camel_folder_get_message API to have an extra boolean parameter "full"
- Implement partial message retrieval in IMAP (not very difficult, as IMAP knows about MIME parts and BODY.SEEK)
- Implement partial message retrieval in POP (difficult)
- Check whether the CamelImapMessageCache can correctly cope with this
- Add flags so that the internals of camel-lite can know whether a cached message is partially or fully cached
IMAP partial message retrieval technique
The IMAP technique is to only get the parts 1 and HEADER. In case the original was a multipart, the boundary around part 1 is restored and the message is reconstructed as a valid multipart message.
POP partial message retrieval technique
The POP technique is to simply cut the connection with the POP service once the second boundary was received in case there was a boundary in the headers (in case the Content-Type of the message was a multipart with a boundary parameter)
Attachments
- partial.zargo (8.7 kB) -
I am not a bot
, added by anonymous on 01/03/07 18:18:12. - partial_01.png (14.9 kB) -
I am not a bot
, added by anonymous on 01/03/07 18:18:52.

