message: implement rfc2047-encoding addresses

For address names with commas, quotes etc.
This commit is contained in:
Dirk-Jan C. Binnema
2022-05-06 22:09:50 +03:00
parent da8489d0f6
commit 4fc05261ce
3 changed files with 34 additions and 3 deletions

View File

@ -45,6 +45,16 @@ using MimeFormatOptions = deletable_unique_ptr<GMimeFormatOptions, g_mime_format
*/
void init_gmime(void);
/**
* Get a RFC2047-compatible address for the given contact
*
* @param contact a contact
*
* @return an address string
*/
std::string address_rfc2047(const Contact& contact);
class Object {
public:
/**
@ -160,6 +170,10 @@ private:
mutable GObject *self_{};
};
/**
* Thin wrapper around a GMimeContentType