]> git.notmuchmail.org Git - notmuch/commit
Introduce a generic tree-like abstraction for MIME traversal.
authorAustin Clements <amdragon@MIT.EDU>
Sat, 24 Dec 2011 18:52:44 +0000 (13:52 -0500)
committerDavid Bremner <bremner@debian.org>
Mon, 26 Dec 2011 02:19:12 +0000 (22:19 -0400)
commitbb189220a323e3140198161234ed54bf98175469
tree5639019e0d3a2feeb576e0afa9267090116a7e35
parent36f7fe5a1c83f3f0dd8fc883db558ab058b974f3
Introduce a generic tree-like abstraction for MIME traversal.

This wraps all of the complex MIME part handling in a single, simple
function that gets part N from *any* MIME object, so traversing a MIME
part tree becomes a two-line for loop.  Furthermore, the MIME node
structure provides easy access to envelopes for message parts as well
as cryptographic information.

This code is directly derived from the current show_message_body code
(much of it is identical), but the control relation is inverted:
instead of show_message_body controlling the traversal of the MIME
structure and invoking callbacks, the caller controls the traversal of
the MIME structure.
Makefile.local
mime-node.c [new file with mode: 0644]
notmuch-client.h