Name

mail::ACCOUNT::readFolderInfo — Get folder status

Synopsis




#include <libmail/sync.H>

mail::ACCOUNT *mail;

bool ok=mail->openFolder( const mail::folder *folder,
  mail::ACCOUNT::FolderInfo &info);
 


std::string errmsg=mail->getErrmsg();

USAGE

This function reads the current status of folder, which may refer to any folder in the mail account (not necessarily the currently open folder).

The following fields in info will be initialized by this function:

messageCount

Total number of messages in the folder.

unreadCount

Total number of unread messages in the folder.

fastInfo

This field should be initialized before calling this function. If set to true the message counts are returned only if they can be computed quickly. Otherwise folderInfoCallback's success method will not be invoked at all, but callback's success method will still be invoked.

If this field is set to false (the default), the message counts are returned in all cases.

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.