From 7956bafbe85c19fa76dcb549526e2035925a8a6f Mon Sep 17 00:00:00 2001 From: djcb Date: Thu, 24 Nov 2011 00:13:17 +0200 Subject: [PATCH] * mu-msg-priv.h: export some function dealing with mime parts --- src/mu-msg-priv.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/mu-msg-priv.h b/src/mu-msg-priv.h index 862b497e..f589eaa0 100644 --- a/src/mu-msg-priv.h +++ b/src/mu-msg-priv.h @@ -51,10 +51,33 @@ struct _MuMsg { /* our two backend */ MuMsgFile *_file; /* based on GMime, ie. a file on disc */ MuMsgDoc *_doc; /* based on Xapian::Document */ - + MuMsgCache *_cache; }; + +/** + * convert a GMimePart to a string + * + * @param part a GMimePart + * @param err will receive TRUE if there was an error, FALSE otherwise + * + * @return utf8 string for this MIME part, to be freed by caller + */ +gchar* mu_msg_mime_part_to_string (GMimePart *part, gboolean *err); + + +/** + * get the MIME part that's probably the body of the message (heuristic) + * + * @param self a MuMsg + * @param want_html whether it should be a html type of body + * + * @return the MIME part, or NULL in case of error. + */ +GMimePart* mu_msg_mime_get_body_part (GMimeMessage *msg, gboolean want_html); + + G_END_DECLS #endif /*__MU_MSG_PRIV_H__*/