X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-formatter.h;h=73fa4f798114f9a14aad0643fc322ef43e48c364;hb=873bcb131187d4d459a438b8a37a206acf24d4e8;hp=cf5c040bd59e4b985cc8d367e251c1a3ecce91fc;hpb=82e0101e9955cfeea5c7434a2f5bab244f955025;p=modest diff --git a/src/modest-formatter.h b/src/modest-formatter.h index cf5c040..73fa4f7 100644 --- a/src/modest-formatter.h +++ b/src/modest-formatter.h @@ -58,7 +58,7 @@ 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: @@ -152,7 +152,7 @@ TnyMsg * modest_formatter_quote (ModestFormatter *self, TnyMimePart *part, TnyH * * Returns: a newly formatted #TnyMsg or NULL in case of error **/ -TnyMsg * modest_formatter_inline (ModestFormatter *self, TnyMimePart *part, TnyHeader *header); +TnyMsg * modest_formatter_inline (ModestFormatter *self, TnyMimePart *part, TnyHeader *header, gboolean has_attachments); /** * modest_formatter_attach: @@ -166,6 +166,35 @@ TnyMsg * modest_formatter_inline (ModestFormatter *self, TnyMimePart *part, TnyH **/ TnyMsg * modest_formatter_attach (ModestFormatter *self, TnyMimePart *part, TnyHeader *header); +/** + * modest_formatter_create_message: + * @self: a #ModestFormatter + * @single_body: a #gboolean + * @has_attachments: a #gboolean + * + * Creates an empty #TnyMsg with the expected parts for Modest + * formatters and body embedders. + * + * If @has_attachments is %TRUE, the mail will be formatted as + * "multipart/mixed", and attachments will be stored as parts + * of it. The body will be just another multipart. If %FALSE, + * the bodies will be stored directly as the message. + * + * If @single_body is %TRUE, the body will be stored as a + * "multipart/alternative", and the parts will be the different + * alternatives. If %FALSE, this body will be stored directly. + */ +TnyMsg * modest_formatter_create_message (ModestFormatter *self, gboolean single_body, gboolean has_attachments); + +/** + * modest_formatter_create_body_part: + * @self: a #ModestFormatter + * + * Obtains a new formatted body part for @msg, or + * @msg itself if the body is intended to be stored directly + * in it. + */ +TnyMimePart * modest_formatter_create_body_part (ModestFormatter *self, TnyMsg *msg); G_END_DECLS