X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-text-utils.h;h=7cb5ab5c4f3cccace41755f3036ef3ae682e87a4;hp=f2c59c91da8f03029b42055bfde02eae3125899d;hb=23f786131a2e4d78a7a54f52edd53a0c906a9113;hpb=4927d2ba3643bba250d1c0e12a8c732db905fad3 diff --git a/src/modest-text-utils.h b/src/modest-text-utils.h index f2c59c9..7cb5ab5 100644 --- a/src/modest-text-utils.h +++ b/src/modest-text-utils.h @@ -54,6 +54,10 @@ extern const guint ACCOUNT_TITLE_FORBIDDEN_CHARS_LENGTH; extern const guint FOLDER_NAME_FORBIDDEN_CHARS_LENGTH; extern const guint USER_NAME_FORBIDDEN_CHARS_LENGTH; +/* It includes a white space as RFC 3676 Section 4.3 about usenet + message signatures defines */ +#define MODEST_TEXT_UTILS_SIGNATURE_MARKER "-- " + /** * modest_text_utils_derived_subject: * @subject: a string which contains the original subject @@ -500,4 +504,28 @@ gchar *modest_text_utils_escape_mnemonics (const gchar *text); */ gchar *modest_text_utils_simplify_recipients (const gchar *recipient); +/** + * modest_text_utils_remove_duplicate_addresses_list + * @address_list: non-NULL #GSList of email addresses + * + * remove duplicate addresses from a list of email addresses + * + * Returns: a list without the duplicate addresses or NULL in case of + * error or the original @address_list was NULL + */ +GSList *modest_text_utils_remove_duplicate_addresses_list (GSList *address_list); + +/** + * modest_text_utils_get_secure_header: + * @value: the value of a mail header + * @header: the header that we're evaluating + * + * This function returns the secure value for a header. Basically it + * avoids DoS attacks caused by specially malformed headers like for + * example. From:From:From...From: some@mail.com + * + * Returns: returns the secured header + **/ +gchar * modest_text_utils_get_secure_header (const gchar *value, const gchar *header); + #endif /* __MODEST_TEXT_UTILS_H__ */