r3 - 07 Sep 2006 - 16:27:31 - TravisVachonYou are here: OSAF >  Journal Web  >  ContributorNotes > TravisVachonNotes > IMAPServerPluginOpenIssues

MIME handling architecture issue

ChandlerTwistedMIMEStructures.png

In other words:

  • In Twisted, MessageInterface extends MessagePartInterface, and MessagePartInterface contains 0 or more other MessagePartInterface instances.
  • In Chandler, MIMEContainer extends MIMEBase and contains 0 or more MIMEBase instances, and MailStamp extends MIMEContainer.

The IMAPServer parcel needs to provide implementations of MessageInterface and MessagePartInterface, and thus should be able to get meaningful headers from any object implementing MessagePartInterface.

Options

  • Ideally, the getHeaders method would be on MIMEContainer or lower (it actually makes sense to put it on MIMEBase since MIME formatted text includes headers), so that MessagePartInterface would map to MIMEContainer and MessagePart would map to MailStamp.

  • The current solution is to use osaf.mail.message.kindToMessageObject to create an email.message.Message object which is used as a backend to operations required by MessagePartInterace. This isn't really the most performant way of doing things, but is actually ok.

-- TravisVachon - 07 Sep 2006

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.