#include <libmail/sync.H>
mail::ACCOUNT *mail;
mail::ACCOUNT::FolderList folderList;
std::string errmsg=mail->getErrmsg();
size_t nFolders=folderList::size();
const mail::folder *folder=folderList[n];
A mail account contains a collection of folders, arranged in a top-to-bottom hierarchy. This function returns the list of the folders at the top-level of the folder hierarchy.
mail::ACCOUNT::getTopLevelFolders, if succesful, initializes a list of mail::folder objects, which are maintained by the mail::ACCOUNT::FolderList class. Each mail::folder object represents a mail account's folder. The number of folders, and a pointer to each folder object, is obtained according to the example above.
NOTE: | Pointers to mail::folder objects are no longer valid after the mail::ACCOUNT::FolderList object is destroyed. The application should use mail::folder::clone(3x) to create a duplicate copy of the mail::folder object (which the application is now responsible for destroying). |
This method returns true if it succeeds, or fail if it fails. If the method fails, use mail::ACCOUNT::getErrmsg() to read a brief description of the error.
<<< Previous | Home | Next >>> |
mail::ACCOUNT::getSubFolders | Up | mail::ACCOUNT::login |