#include <libmail/sync.H> mail::ACCOUNT *mail;
mail::messageInfo msgInfo=mail->getFolderIndexSize(size_t messageNum);
mail::ACCOUNT::getFolderIndexInfo returns a structure that contains a message's unique identifier, and the message's current status flags. messageNum must be between zero and one less than the return code from mail::ACCOUNT::getFolderIndexSize(3x).
Return Codes and Callbacks
This function returns an object with the following fields:
- std::string uid
A unique ID that's assigned to each message in a folder. Applications should consider this unique ID as a completely opaque string, with no particular interpretation. The only assumption that applications may make is that no two messages will ever have the same uid in the same folder. A message copied to another folder will receive a different unique ID in the destination folder (the copy in the original folder is not affected).
- bool draft
This is a draft message.
- bool replied
A reply was previously sent to this message.
- bool marked
This message is marked for further processing.
- bool deleted
This message is marked for deletion.
- bool unread
The contents of this message have not been read.
- bool recent
This is the first time the folder was opened with this message in the folder.
This message flag is considered obsolete, and should only be used by IMAP-based clients that absolutely need this flag. Applications that absolutely require this flag should be evaluated for correctness, since the IMAP specification indicates that this flag's setting is not defined in situations where the same mail folder is opened by multiple applications at the same time. Since this is nearly always the case, it seems that this flag's usability is rather limited. For this reason, the recent flag was not reimplemented in SMAP, and will not be set for accounts that are accessed via SMAP.
Not all types of mail accounts support every message status flag. Unsupported message status flags will be automatically emulated, where possible. Specifically, POP3 mail accounts do not have a concept of message status flags at all. Each time a POP3 mail account is opened, the status of all messages in the POP3 account will be reset to the default status (unread message, no other flags set).
mail::ACCOUNT::getFolderIndexSize(3x), mail::ACCOUNT::getFolderKeywordInfo(3x), mail::ACCOUNT::getMessageEnvelope(3x), mail::ACCOUNT::getMessageStructure(3x), mail::ACCOUNT::getMyRights(3x).