mail::ACCOUNT::getParentFolder.3x - Man Page

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).

Return Codes and Callbacks

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.

See Also

mail::ACCOUNT::getSubFolders(3x), mail::ACCOUNT::getTopLevelFolders(3x).


Sam Varshavchik


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