VMime
|
Public Types | |
enum | Modes { MODE_READ_ONLY, MODE_READ_WRITE } |
typedef vmime::utility::path | path |
Public Member Functions | |
virtual | ~folder () |
int | getType () |
int | getFlags () |
virtual const folderAttributes | getAttributes ()=0 |
virtual int | getMode () const =0 |
virtual const folder::path::component | getName () const =0 |
virtual const folder::path | getFullPath () const =0 |
virtual void | open (const int mode, bool failIfModeIsNotAvailable=false)=0 |
virtual void | close (const bool expunge)=0 |
virtual void | create (const folderAttributes &attribs)=0 |
virtual bool | exists ()=0 |
virtual void | destroy ()=0 |
virtual bool | isOpen () const =0 |
virtual shared_ptr< message > | getMessage (const int num)=0 |
virtual std::vector < shared_ptr< message > > | getMessages (const messageSet &msgs)=0 |
virtual int | getMessageCount ()=0 |
virtual shared_ptr< folder > | getFolder (const folder::path::component &name)=0 |
virtual std::vector < shared_ptr< folder > > | getFolders (const bool recursive=false)=0 |
virtual void | rename (const folder::path &newPath)=0 |
virtual void | deleteMessages (const messageSet &msgs)=0 |
virtual void | setMessageFlags (const messageSet &msgs, const int flags, const int mode=message::FLAG_MODE_SET)=0 |
virtual messageSet | addMessage (shared_ptr< vmime::message > msg, const int flags=-1, vmime::datetime *date=NULL, utility::progressListener *progress=NULL)=0 |
virtual messageSet | addMessage (utility::inputStream &is, const size_t size, const int flags=-1, vmime::datetime *date=NULL, utility::progressListener *progress=NULL)=0 |
virtual messageSet | copyMessages (const folder::path &dest, const messageSet &msgs)=0 |
virtual void | status (int &count, int &unseen)=0 |
virtual shared_ptr< folderStatus > | getStatus ()=0 |
virtual void | expunge ()=0 |
virtual shared_ptr< folder > | getParent ()=0 |
virtual shared_ptr< const store > | getStore () const =0 |
virtual shared_ptr< store > | getStore ()=0 |
virtual void | fetchMessages (std::vector< shared_ptr< message > > &msg, const fetchAttributes &attribs, utility::progressListener *progress=NULL)=0 |
virtual void | fetchMessage (shared_ptr< message > msg, const fetchAttributes &attribs)=0 |
virtual std::vector < shared_ptr< message > > | getAndFetchMessages (const messageSet &msgs, const fetchAttributes &attribs)=0 |
virtual int | getFetchCapabilities () const =0 |
virtual std::vector< int > | getMessageNumbersStartingOnUID (const message::uid &uid)=0 |
void | addMessageChangedListener (events::messageChangedListener *l) |
void | removeMessageChangedListener (events::messageChangedListener *l) |
void | addMessageCountListener (events::messageCountListener *l) |
void | removeMessageCountListener (events::messageCountListener *l) |
void | addFolderListener (events::folderListener *l) |
void | removeFolderListener (events::folderListener *l) |
Protected Types | |
enum | PrivateConstants { TYPE_UNDEFINED = 9999, FLAG_UNDEFINED = 9999 } |
Protected Member Functions | |
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 () |
Abstract representation of a folder in a message store.
typedef vmime::utility::path path |
Type used for fully qualified path name of a folder.
enum Modes |
|
protected |
|
protected |
|
virtual |
void addFolderListener | ( | events::folderListener * | l | ) |
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
void addMessageChangedListener | ( | events::messageChangedListener * | l | ) |
void addMessageCountListener | ( | events::messageCountListener * | l | ) |
|
pure virtual |
Close this folder.
expunge | if set to true, deleted messages are expunged |
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Create this folder.
attribs | attributes of the new folder |
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Remove one or more messages from this folder.
msgs | index set of messages to delete |
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Delete this folder.
The folder should be closed before attempting to delete it.
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Test whether this folder exists.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Expunge deleted messages.
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Fetch objects for the specified message.
msg | the message |
attribs | set of attributes to fetch |
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return the attributes of the folder.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
Referenced by folder::getFlags(), and folder::getType().
|
pure virtual |
Return the list of fetchable objects supported by the underlying protocol (see folder::fetchAttributes).
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
int getFlags | ( | ) |
Return the flags of this folder.
References folder::getAttributes(), and folderAttributes::getFlags().
|
pure virtual |
Get a new reference to a sub-folder in this folder.
name | sub-folder name |
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return the fully qualified path name of this folder.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Get a new reference to a message in this folder, given its number.
num | message sequence number |
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return the number of messages in this folder.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure 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 |
Implemented in maildirFolder, POP3Folder, and IMAPFolder.
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return the mode in which the folder has been open.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return the name of this folder.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return a new folder object referencing the parent folder of this folder.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Request folder status without opening it.
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return a reference to the store to which this folder belongs.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
Return a reference to the store to which this folder belongs.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
int getType | ( | ) |
Return the type of this folder.
References folder::getAttributes(), and folderAttributes::getType().
|
pure virtual |
Test whether this folder is open.
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
protected |
|
protected |
|
protected |
Referenced by POP3Folder::deleteMessages(), and folder::notifyEvent().
|
protected |
Referenced by maildirFolder::expunge(), POP3Folder::getStatus(), maildirFolder::getStatus(), and folder::notifyEvent().
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
void removeFolderListener | ( | events::folderListener * | l | ) |
void removeMessageChangedListener | ( | events::messageChangedListener * | l | ) |
void removeMessageCountListener | ( | events::messageCountListener * | l | ) |
|
pure virtual |
Rename (move) this folder to another location.
newPath | new path of the folder |
exceptions::net_exception | if an error occurs |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure 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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.
|
pure virtual |
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 |
Implemented in IMAPFolder, maildirFolder, and POP3Folder.