aboutsummaryrefslogtreecommitdiffhomepage
path: root/mime-node.c
Commit message (Collapse)AuthorAge
* Utility function to seek in MIME trees in depth-first order.Gravatar Austin Clements2011-12-25
| | | | | | | This function matches how we number parts for the --part argument to show. It will allow us to jump directly to the desired part, rather than traversing the entire tree and carefully tracking whether or not we're "in the zone".
* Introduce a generic tree-like abstraction for MIME traversal.Gravatar Austin Clements2011-12-25
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.