mail::ACCOUNT::getSubFolders.3x - Man Page
Enumerate subfolders
Synopsis
#include <libmail/sync.H> mail::ACCOUNT *mail; const mail::folder *folder; mail::ACCOUNT::FolderList folderList;
bool ok=mail->getSubFolders(folder, folderList);
std::string errmsg=mail->getErrmsg();
size_t nFolders=folderList::size(); const mail::folder *folder=folderList[n];
Usage
A mail account contains folders that are arranged in a tree-like hierarchy. mail::ACCOUNT::getSubFolders enumerates folder's subfolders (folder is obtained from a previous mail::ACCOUNT::getSubFolders or a mail::ACCOUNT::getTopLevelFolders(3x) call).
Note
Use mail::folder::hasSubFolders(3x) to check if folder contains subfolders, and invoke mail::ACCOUNT::getSubFolders only if mail::folder::hasSubFolders returns true.
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.
See mail::ACCOUNT::getTopLevelFolders(3x) for additional notes and instructions on handling folder lists.
See Also
mail::ACCOUNT::getParentFolder(3x), mail::ACCOUNT::getTopLevelFolders(3x).
Author
Sam Varshavchik