|
VMime
|
#include <POP3Folder.hpp>


Additional Inherited Members | |
| Public Types inherited from folder | |
| enum | Modes { MODE_READ_ONLY , MODE_READ_WRITE } |
| typedef vmime::utility::path | path |
| Protected Types inherited from folder | |
| enum | PrivateConstants { TYPE_UNDEFINED = 9999 , FLAG_UNDEFINED = 9999 } |
| Protected Member Functions inherited from folder | |
| folder (const folder &) | |
| folder () | |
| void | notifyMessageChanged (shared_ptr< events::messageChangedEvent > event) |
| void | notifyMessageCount (shared_ptr< events::messageCountEvent > event) |
| void | notifyFolder (shared_ptr< events::folderEvent > event) |
| void | notifyEvent (shared_ptr< events::event > event) |
| Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
POP3 folder implementation.
| ~POP3Folder | ( | ) |
References close(), and ~POP3Folder().
Referenced by ~POP3Folder().
|
virtual |
Add a message to this folder.
| msg | message to add (data: header + body) |
| flags | flags for the new message (if -1, default flags are used) |
| date | date/time for the new message (if NULL, the current time is used) |
| progress | progress listener, or NULL if not used |
| exceptions::net_exception | if an error occurs |
Implements folder.
References addMessage().
Referenced by addMessage(), addMessage(), and POP3Message.
|
virtual |
Add a message to this folder.
| is | message to add (data: header + body) |
| size | size of the message to add (in bytes) |
| flags | flags for the new message (if -1, default flags are used) |
| date | date/time for the new message (if NULL, the current time is used) |
| progress | progress listener, or NULL if not used |
| exceptions::net_exception | if an error occurs |
Implements folder.
References addMessage().
|
virtual |
Close this folder.
| expunge | if set to true, deleted messages are expunged |
| exceptions::net_exception | if an error occurs |
Implements folder.
References close(), expunge(), isOpen(), POP3Response::readResponse(), and POP3Command::RSET().
Referenced by close(), POP3Message, and ~POP3Folder().
|
virtual |
Copy messages from this folder to another folder.
| dest | destination folder path |
| msgs | index set of messages to copy |
| exceptions::net_exception | if an error occurs |
Implements folder.
References copyMessages().
Referenced by copyMessages(), and POP3Message.
|
virtual |
Create this folder.
| attribs | attributes of the new folder |
| exceptions::net_exception | if an error occurs |
Implements folder.
References create().
Referenced by create(), and POP3Message.
|
virtual |
Remove one or more messages from this folder.
| msgs | index set of messages to delete |
| exceptions::net_exception | if an error occurs |
Implements folder.
References POP3Command::DELE(), deleteMessages(), POP3Message::getNumber(), isOpen(), POP3Utils::messageSetToNumberList(), folder::notifyMessageChanged(), POP3Message, POP3Response::readResponse(), and messageChangedEvent::TYPE_FLAGS.
Referenced by deleteMessages(), and POP3Message.
|
virtual |
Delete this folder.
The folder should be closed before attempting to delete it.
| exceptions::net_exception | if an error occurs |
Implements folder.
References destroy().
Referenced by destroy(), and POP3Message.
|
virtual |
Test whether this folder exists.
Implements folder.
References exists().
Referenced by exists(), and POP3Message.
|
virtual |
Expunge deleted messages.
| exceptions::net_exception | if an error occurs |
Implements folder.
References expunge().
Referenced by close(), expunge(), and POP3Message.
|
virtual |
Fetch objects for the specified message.
| msg | the message |
| attribs | set of attributes to fetch |
| exceptions::net_exception | if an error occurs |
Implements folder.
References fetchMessage(), fetchAttributes::has(), isOpen(), POP3Command::LIST(), POP3Response::readResponse(), fetchAttributes::SIZE, fetchAttributes::UID, and POP3Command::UIDL().
Referenced by fetchMessage(), and POP3Message.
|
virtual |
Fetch objects for the specified messages.
| msg | list of message sequence numbers |
| attribs | set of attributes to fetch |
| progress | progress listener, or NULL if not used |
| exceptions::net_exception | if an error occurs |
Implements folder.
References fetchMessages(), fetchAttributes::has(), isOpen(), POP3Command::LIST(), POP3Utils::parseMultiListOrUidlResponse(), progressListener::progress(), POP3Response::readMultilineResponse(), fetchAttributes::SIZE, progressListener::start(), progressListener::stop(), fetchAttributes::UID, and POP3Command::UIDL().
Referenced by fetchMessages(), getAndFetchMessages(), and POP3Message.
|
virtual |
Get new references to messages in this folder, given either their sequence numbers or UIDs, and fetch objects for them at the same time.
| msgs | index set of messages to retrieve |
| attribs | set of attributes to fetch |
| exceptions::net_exception | if an error occurs |
Implements folder.
References fetchMessages(), getAndFetchMessages(), getMessages(), and messageSet::isEmpty().
Referenced by getAndFetchMessages(), and POP3Message.
|
virtual |
Return the attributes of the folder.
Implements folder.
References getAttributes(), folderAttributes::setFlags(), folderAttributes::setType(), folderAttributes::TYPE_CONTAINS_FOLDERS, and folderAttributes::TYPE_CONTAINS_MESSAGES.
Referenced by getAttributes(), and POP3Message.
|
virtual |
Return the list of fetchable objects supported by the underlying protocol (see folder::fetchAttributes).
Implements folder.
References fetchAttributes::CONTENT_INFO, fetchAttributes::ENVELOPE, fetchAttributes::FULL_HEADER, getFetchCapabilities(), fetchAttributes::IMPORTANCE, fetchAttributes::SIZE, and fetchAttributes::UID.
Referenced by getFetchCapabilities(), and POP3Message.
|
virtual |
Get a new reference to a sub-folder in this folder.
| name | sub-folder name |
| exceptions::net_exception | if an error occurs |
Implements folder.
References getFolder().
Referenced by getFolder(), and POP3Message.
|
virtual |
Get the list of all sub-folders in this folder.
| recursive | if set to true, all the descendant are returned. If set to false, only the direct children are returned. |
| exceptions::net_exception | if an error occurs |
Implements folder.
References getFolders().
Referenced by getFolders(), and POP3Message.
|
virtual |
Return the fully qualified path name of this folder.
Implements folder.
References getFullPath().
Referenced by getFullPath(), and POP3Message.
Get a new reference to a message in this folder, given its number.
| num | message sequence number |
| exceptions::net_exception | if an error occurs |
Implements folder.
References getMessage(), and isOpen().
Referenced by getMessage(), and POP3Message.
|
virtual |
Return the number of messages in this folder.
Implements folder.
References getMessageCount(), and isOpen().
Referenced by getMessageCount(), and POP3Message.
|
virtual |
Return the sequence numbers of messages whose UID equal or greater than the specified UID.
| uid | the uid of the first message |
| exceptions::net_exception | if an error occurs |
Implements folder.
References getMessageNumbersStartingOnUID().
Referenced by getMessageNumbersStartingOnUID(), and POP3Message.
|
virtual |
Get new references to messages in this folder, given either their sequence numbers or UIDs.
To retrieve messages by their number, use:
Or, to retrieve messages by their UID, use:
| msgs | index set of messages to retrieve |
| exceptions::net_exception | if an error occurs |
Implements folder.
References getMessages(), messageSet::isNumberSet(), isOpen(), and POP3Utils::messageSetToNumberList().
Referenced by getAndFetchMessages(), getMessages(), and POP3Message.
|
virtual |
Return the mode in which the folder has been open.
Implements folder.
References getMode(), and isOpen().
Referenced by getMode(), and POP3Message.
|
virtual |
Return the name of this folder.
Implements folder.
References getName().
Referenced by getName(), and POP3Message.
|
virtual |
Return a new folder object referencing the parent folder of this folder.
Implements folder.
References getParent().
Referenced by getParent(), and POP3Message.
|
virtual |
Request folder status without opening it.
| exceptions::net_exception | if an error occurs |
Implements folder.
References vmime::count(), getStatus(), folder::notifyMessageCount(), POP3Response::readResponse(), POP3Command::STAT(), status(), and messageCountEvent::TYPE_ADDED.
Referenced by getStatus(), POP3Message, and status().
|
virtual |
Return a reference to the store to which this folder belongs.
Implements folder.
References getStore().
|
virtual |
Return a reference to the store to which this folder belongs.
Implements folder.
References getStore().
Referenced by getStore(), getStore(), and POP3Message.
|
virtual |
Test whether this folder is open.
Implements folder.
References isOpen().
Referenced by close(), deleteMessages(), fetchMessage(), fetchMessages(), getMessage(), getMessageCount(), getMessages(), getMode(), isOpen(), and POP3Message.
|
virtual |
Open this folder.
| mode | open mode (see folder::Modes) |
| failIfModeIsNotAvailable | if set to false and if the requested mode is not available, a more restricted mode will be selected automatically. If set to true and if the requested mode is not available, the opening will fail. |
| exceptions::net_exception | if an error occurs |
| exceptions::folder_already_open | if the folder is already open in the same session |
Implements folder.
References folder::MODE_READ_ONLY, open(), POP3Response::readResponse(), and POP3Command::STAT().
Referenced by open(), and POP3Message.
|
virtual |
Rename (move) this folder to another location.
| newPath | new path of the folder |
| exceptions::net_exception | if an error occurs |
Implements folder.
References rename().
Referenced by POP3Message, and rename().
|
virtual |
Change the flags for one or more messages in this folder.
| msgs | index set of messages on which to set the flags |
| flags | set of flags (see message::Flags) |
| mode | indicate how to treat old and new flags (see message::FlagsModes) |
| exceptions::net_exception | if an error occurs |
Implements folder.
References setMessageFlags().
Referenced by POP3Message, and setMessageFlags().
Request folder status without opening it.
| count | will receive the number of messages in the folder |
| unseen | will receive the number of unseen messages in the folder |
| exceptions::net_exception | if an error occurs |
Implements folder.
References vmime::count(), getStatus(), and status().
Referenced by getStatus(), POP3Message, and status().