mail::ACCOUNT::getParentFolder — Find parent folder
#include <libmail/sync.H>
mail::ACCOUNT *mail;
const mail::folder *folder;
mail::ACCOUNT::FolderList folderList;
bool
ok=mail->getParentFolder( |
folder, |
folderList) ; |
std::string errmsg=mail->getErrmsg();
size_t nFolders=folderList::size();
const mail::folder *folder=folderList[n];
A mail account contains folders that are arranged in a
tree-like hierarchy. mail::ACCOUNT::getParentFolder
finds a
folder
's parent
folder (folder
is
obtained from a previous mail::ACCOUNT::getSubFolders
or a mail::ACCOUNT::getTopLevelFolders(3x)
call).
This method returns true
if
it succeeds, or false
if it
fails. If the method fails, use mail::ACCOUNT::getErrmsg()
to
read a brief description of the error.
If successful, folderList
will contain a
single pointer to a mail::folder object that will refer to
folder
's parent
folder.
See mail::ACCOUNT::getTopLevelFolders(3x) for additional notes and instructions on handling folder lists.