mail::ACCOUNT::translatePath.3x man page

Cone©

mail::ACCOUNT::translatePath — Convert readable folder path to internal folder path

Synopsis

#include <libmail/sync.H>

mail::ACCOUNT *mail;

std::string path=mail->translatePath(std::string folderPath);

Usage

This function converts a human-readable representation of a folder's path to the internal folder path in the mail account. For example, IMAP server mailboxes use names encoded in a modified version of the UTF-7 character set, and this method converts a folder path from the application's character set to the modified UTF-7 character set. Specifically:

IMAP[1]

folderPath is converted from application's character set to the modified UTF-7 character set.

SMAP

folderPath is converted from application's character set to UTF-8. The forward slash character, “/” separates names of individual folders in the SMAP hierarchy. Unicode/ISO-10646 characters that cannot be represented in the application's character set may be specified as “%n;”, where n is a decimal Unicode value. Use “\/” to specify a forward slash character in the folder name, “\\” to specify a backslash character, and “\%” to specify the “%” character.

mbox mail folders, and maildirs

folderPath is converted from application's character set to modified UTF-7 encoding. The forward slash character, “/” separates names of individual folders in the local mail folder hierarchy. Unicode/ISO-10646 characters that cannot be represented in the application's character set may be specified as “%n;”, where n is a decimal Unicode value. Use “\\” to specify a backslash character, and “\%” to specify the “%” character.

Return Codes and Callbacks

This function returns the converted path string. An empty string is returned if folderPath is not a valid folder path.

See Also

mail::ACCOUNT::getFolderFromPath(3x), mail::ACCOUNT::getFolderFromString(3x), mail::setAppCharset(3x).

Author

Sam Varshavchik

Notes

1.

IMAP

Info

08/25/2013 Cone© Cone: COnsole Newsreader And E