X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-formatter.h;h=b8c5a923371353d032a453fe057d496649030d0a;hb=c62e34be3e5b43d9cf0213222653c8ca5da82d93;hp=92bb9258a18d066bfb2b733b7493cf8cb25fc890;hpb=3084439a659fa9aec750337f94cad4bca0c92898;p=modest diff --git a/src/modest-formatter.h b/src/modest-formatter.h index 92bb925..b8c5a92 100644 --- a/src/modest-formatter.h +++ b/src/modest-formatter.h @@ -58,11 +58,112 @@ struct _ModestFormatterClass GType modest_formatter_get_type (void); -ModestFormatter* modest_formatter_new (const gchar *content_type); +ModestFormatter* modest_formatter_new (const gchar *content_type, const gchar *signature); +/** + * modest_formatter_cite: + * @self: a #ModestFormatter + * @part: a non-NULL #TnyMimePart with the body of the original message + * @header: a non-NULL #TnyHeader of the original message + * + * Creates a new message with a text body made from the body of the + * original message cited. This function is locale-sensitive. + * + * Example of cited message: + * + * Original message + * ---------------- + * Date: 1970/01/01 + * From: somemailATmodest.org + * Body: "This is the body of the text" + * + * Cited message + * ------------- + * Body: + * On 1970/01/01 somemailATmodest.org wrote: + * This is the body of the text + * + * + * Returns: a newly formatted #TnyMsg or NULL in case of error + **/ TnyMsg * modest_formatter_cite (ModestFormatter *self, TnyMimePart *part, TnyHeader *header); + + +/** + * modest_formatter_quote: + * @self: a #ModestFormatter + * @part: a non-NULL #TnyMimePart with the body of the original message + * @header: a non-NULL #TnyHeader of the original message + * + * Creates a new message with a text body made from the body of the + * original message quoted. This function is locale-sensitive. + * + * Example of cited message: + * + * Original message + * ---------------- + * Date: 1970/01/01 + * From: somemailATmodest.org + * Body: "This is the body of the text" + * + * Quoted message + * ------------- + * Body: + * On 1970/01/01 somemailATmodest.org wrote: + * > This is the body of the text + * + * + * Returns: a newly formatted #TnyMsg or NULL in case of error + **/ TnyMsg * modest_formatter_quote (ModestFormatter *self, TnyMimePart *part, TnyHeader *header); + + +/** + * modest_formatter_inline: + * @self: a #ModestFormatter + * @part: a non-NULL #TnyMimePart with the body of the original message + * @header: a non-NULL #TnyHeader of the original message + * + * Creates a new message with a text body made from the body of the + * original message inlined ready to be forwarded. This function is + * locale-sensitive. + * + * Example of cited message: + * + * Original message + * ---------------- + * Date: 1970/01/01 + * From: somemailATmodest.org + * To: mymailATmodest.org + * Subject: Mail subject + * Body: "This is the body of the text" + * + * Inlined message + * ------------- + * Body: + * -----Forwarded Message----- + * From: somemailATmodest.org + * Sent: 1970/01/01 + * To: mymailATmodest.org + * Subject: Fw: Mail subject + * On 1970/01/01 somemailATmodest.org wrote: + * This is the body of the text + * + * + * Returns: a newly formatted #TnyMsg or NULL in case of error + **/ TnyMsg * modest_formatter_inline (ModestFormatter *self, TnyMimePart *part, TnyHeader *header); + +/** + * modest_formatter_attach: + * @self: a #ModestFormatter + * @part: a non-NULL #TnyMimePart with the body of the original message + * @header: a non-NULL #TnyHeader of the original message + * + * Creates a new message with the original message as attachment + * + * Returns: a newly formatted #TnyMsg or NULL in case of error + **/ TnyMsg * modest_formatter_attach (ModestFormatter *self, TnyMimePart *part, TnyHeader *header);