kmail
KMFolderMaildir Class Reference
Inheritance diagram for KMFolderMaildir:

Detailed Description
Definition at line 24 of file kmfoldermaildir.h.
Public Member Functions | |
KMFolderMaildir (KMFolder *folder, const char *name=0) | |
virtual | ~KMFolderMaildir () |
virtual KMFolderType | folderType () const |
virtual DwString | getDwString (int idx) |
virtual KMMessage * | take (int idx) |
virtual int | addMsg (KMMessage *msg, int *index_return=0) |
virtual void | removeMsg (int i, bool imapQuiet=FALSE) |
virtual void | removeMsg (QPtrList< KMMessage > msgList, bool imapQuiet=FALSE) |
virtual void | msgStatusChanged (const KMMsgStatus oldStatus, const KMMsgStatus newStatus, int idx) |
virtual int | open (const char *owner) |
virtual int | canAccess () |
virtual void | sync () |
virtual void | reallyDoClose (const char *owner) |
virtual int | create () |
int | compact (unsigned int startIndex, int nbMessages, const QStringList &entryList, bool &done) |
virtual int | compact (bool silent) |
virtual bool | isReadOnly () const |
virtual Q_INT64 | doFolderSize () const |
Static Public Member Functions | |
static int | createMaildirFolders (const QString &folderPath) |
static QString | constructValidFileName (const QString &filename=QString(), KMMsgStatus status=KMMsgStatusNew) |
static bool | removeFile (const QString &folderPath, const QString &filename) |
Protected Member Functions | |
virtual FolderJob * | doCreateJob (KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, QString partSpecifier, const AttachmentStrategy *as) const |
virtual FolderJob * | doCreateJob (QPtrList< KMMessage > &msgList, const QString &sets, FolderJob::JobType jt, KMFolder *folder) const |
virtual KMMessage * | readMsg (int idx) |
virtual int | removeContents () |
virtual int | expungeContents () |
virtual int | createIndexFromContents () |
int | addMsgInternal (KMMessage *msg, int *index_return=0, bool stripUid=false) |
Friends | |
class | ::KMail::MaildirJob |
Constructor & Destructor Documentation
|
Usually a parent is given. But in some cases there is no fitting parent object available. Then the name of the folder is used as the absolute path to the folder file. Definition at line 54 of file kmfoldermaildir.cpp. |
Member Function Documentation
|
Add the given message to the folder. Usually the message is added at the end of the folder. Returns zero on success and an errno error code on failure. The index of the new message is stored in index_return if given. Please note that the message is added as is to the folder and the folder takes ownership of the message (deleting it in the destructor). Implements FolderStorage. Reimplemented in KMFolderCachedImap. Definition at line 351 of file kmfoldermaildir.cpp. |
|
Internal helper called by addMsg. If stripUid is true it will remove any uid headers and uid index setting before writing. KMFolderCachedImap needs this but can't do it itself, since the final take() which removes the original mail from the source folder, in moves, needs to happen after the adding, for safety reasons, but needs the uid, in case the source folder was an imap folder, to delete the original. TODO: Avoid this by moving the take() out of the addMsg() methods and moving it into the KMMoveCommand, where it can safely happen at a much higher level. Definition at line 358 of file kmfoldermaildir.cpp. |
|
Check folder for permissions Returns zero if readable and writable.
Implements FolderStorage. Definition at line 69 of file kmfoldermaildir.cpp. |
|
Remove deleted messages from the folder. Returns zero on success and an errno on failure. Implements FolderStorage. Definition at line 322 of file kmfoldermaildir.cpp. |
|
Remove some deleted messages from the folder. Returns zero on success and an errno on failure. This is only for use from MaildirCompactionJob. Definition at line 275 of file kmfoldermaildir.cpp. |
|
Implements FolderStorage. Reimplemented in KMFolderCachedImap. Definition at line 188 of file kmfoldermaildir.cpp. |
|
Create index file from messages file and fill the message-info list mMsgList. Returns 0 on success and an errno value (see fopen) on failure. Implements KMFolderIndex. Reimplemented in KMFolderCachedImap. Definition at line 831 of file kmfoldermaildir.cpp. |
|
Create the necessary folders for a maildir folder. Usually you will want to use create() instead.
Definition at line 155 of file kmfoldermaildir.cpp. |
|
These two methods actually create the jobs. They have to be implemented in all folders.
Implements FolderStorage. Reimplemented in KMFolderCachedImap. |
|
reimp
Reimplemented from FolderStorage. Definition at line 1102 of file kmfoldermaildir.cpp. |
|
Called by KMFolder::expunge() to delete the actual contents. At the time of the call the folder has already been closed, and the various index files deleted. Returns 0 on success. Implements FolderStorage. Definition at line 257 of file kmfoldermaildir.cpp. |
|
Returns the type of this folder.
Reimplemented from FolderStorage. Reimplemented in KMFolderCachedImap. Definition at line 36 of file kmfoldermaildir.h. |
|
Read a message and return it as a string.
Implements FolderStorage. Definition at line 554 of file kmfoldermaildir.cpp. |
|
Is the folder read-only?
Implements FolderStorage. Reimplemented in KMFolderCachedImap. Definition at line 106 of file kmfoldermaildir.h. |
|
Called by KMMsgBase::setStatus when status of a message has changed required to keep the number unread messages variable current.
Reimplemented from FolderStorage. Definition at line 1092 of file kmfoldermaildir.cpp. |
|
Open folder for access. Does nothing if the folder is already opened. To reopen a folder call close() first. Returns zero on success and an error code equal to the c-library fopen call otherwise (errno). Implements FolderStorage. Definition at line 102 of file kmfoldermaildir.cpp. |
|
Load message from file and store it at given index. Returns 0 on failure. Implements FolderStorage. Definition at line 543 of file kmfoldermaildir.cpp. |
|
Close folder. If force is TRUE the files are closed even if others still use it (e.g. other mail reader windows). Implements FolderStorage. Reimplemented in KMFolderCachedImap. Definition at line 225 of file kmfoldermaildir.cpp. |
|
Called by KMFolder::remove() to delete the actual contents. At the time of the call the folder has already been closed, and the various index files deleted. Returns 0 on success. Implements FolderStorage. Definition at line 1006 of file kmfoldermaildir.cpp. |
|
Remove (first occurrence of) given message from the folder.
Reimplemented from FolderStorage. Reimplemented in KMFolderCachedImap. Definition at line 921 of file kmfoldermaildir.cpp. |
|
fsync buffers to disk
Implements FolderStorage. Definition at line 248 of file kmfoldermaildir.cpp. |
|
Detach message from this folder. Usable to call addMsg() afterwards. Loads the message if it is not loaded up to now. Reimplemented from FolderStorage. Reimplemented in KMFolderCachedImap. Definition at line 932 of file kmfoldermaildir.cpp. |
The documentation for this class was generated from the following files: