X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-text-utils.h;h=05a4b9b8ebb7d7cf7d2c23444bb30829b080b45a;hp=f7da47134e4263ad4e78d249fdf823564593d763;hb=a795acd4f457861256a915b16995fdf937027ec8;hpb=b28cabc5878650bce571a5d548b4224878c151c7 diff --git a/src/modest-text-utils.h b/src/modest-text-utils.h index f7da471..05a4b9b 100644 --- a/src/modest-text-utils.h +++ b/src/modest-text-utils.h @@ -36,6 +36,19 @@ #include /** + * modest_text_utils_derived_subject: + * @subject: a string which contains the original subject + * @prefix: the prefix for the new subject (such as 'Re:' or 'Fwd:') + * + * create a 'derived' subject line for eg. replies and forwards + * + * Returns: a newly allocated string containing the resulting subject + */ +gchar* modest_text_utils_derived_subject (const gchar *subject, + const gchar* prefix); + + +/** * modest_text_utils_quote: * @buf: a string which contains the message to quote * @from: the sender of the original message @@ -46,20 +59,11 @@ * * Returns: a newly allocated string containing the quoted message */ -gchar* modest_text_utils_quote(const gchar *buf, const gchar *from, - const time_t sent_date, const int limit); - - -/** - * modest_text_utils_derived_subject: - * @subject: a string which contains the original subject - * @prefix: the prefix for the new subject (such as 'Re:' or 'Fwd:') - * - * create a 'derived' subject line for eg. replies and forwards - * - * Returns: a newly allocated string containing the resulting subject - */ -gchar* modest_text_utils_derived_subject (const gchar *subject, const gchar* prefix); +gchar* modest_text_utils_quote (const gchar *text, + const gchar *content_type, + const gchar *from, + const time_t sent_date, + int limit); /** @@ -72,9 +76,10 @@ gchar* modest_text_utils_derived_subject (const gchar *subject, const gchar* pre * * Returns: a newly allocated string containing the cited text */ -gchar* modest_text_utils_cited_text (const gchar *from, - time_t sent_date, - const gchar *text); +gchar* modest_text_utils_cite (const gchar *text, + const gchar *content_type, + const gchar *from, + time_t sent_date); /** * modest_text_utils_inlined_text @@ -89,11 +94,12 @@ gchar* modest_text_utils_cited_text (const gchar *from, * * Returns: a newly allocated string containing the quoted message */ -gchar* modest_text_utils_inlined_text (const gchar *from, - time_t sent_date, - const gchar *to, - const gchar *subject, - const gchar *text); +gchar* modest_text_utils_inline (const gchar *text, + const gchar *content_type, + const gchar *from, + time_t sent_date, + const gchar *to, + const gchar *subject); /** * modest_text_utils_remove_address @@ -133,4 +139,19 @@ gchar* modest_text_utils_convert_to_html (const gchar *data); size_t modest_text_utils_strftime(char *s, size_t max, const char *fmt, const struct tm *tm); + +/** + * modest_text_utils_display_addres: + * @address: original address (UTF8 string) + * + * make a 'display address' from an address: + * "Foo Bar (Bla)" --> "Foo Bar" + * the change is in-place + * + * Returns: the new address. The string is *not* newly allocated. + * NULL in case of error + */ +gchar* modest_text_utils_display_address (gchar *address); + + #endif /* __MODEST_TEXT_UTILS_H__ */