folderstorage.h
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a ...
Definition folderstorage.h:80
virtual bool isMessage(int idx)
Checks if the message is already "gotten" with getMsg.
Definition folderstorage.cpp:591
virtual int countUnread()
Number of new or unread messages in this folder.
Definition folderstorage.cpp:829
virtual int create()=0
Create a new folder with the name of this object and open it.
virtual void ignoreJobsForMessage(KMMessage *)
Removes and deletes all jobs associated with the particular message.
Definition folderstorage.cpp:1064
virtual DwString getDwString(int idx)=0
Read a message and returns a DwString.
int writeFolderIdsFile() const
Writes the message serial number file.
Definition folderstorage.cpp:999
virtual TQString indexLocation() const =0
Returns full path to index file.
virtual int count(bool cache=false) const
Number of messages in this folder.
Definition folderstorage.cpp:820
void invalidated(KMFolder *)
Emitted when the serial numbers of this folder were invalidated.
virtual bool noChildren() const
Returns, if the folder can't have children.
Definition folderstorage.h:113
void cleared()
Emitted when the contents of a folder have been cleared (new search in a search folder,...
void emitMsgAddedSignals(int idx)
Called by derived classes implementation of addMsg.
Definition folderstorage.cpp:284
void msgHeaderChanged(KMFolder *, int)
Emitted when a field of the header of a specific message changed.
virtual bool isMoveable() const
Returns true if this folder can be moved.
Definition folderstorage.cpp:1177
virtual int updateIndex()=0
Incrementally update the index if possible else call writeIndex.
virtual int expungeOldMsg(int days)
Delete messages in the folder that are older than days.
Definition folderstorage.cpp:254
virtual KMMessage * readTemporaryMsg(int idx)
Load message from file and do NOT store it, only return it.
Definition folderstorage.cpp:527
virtual int rename(const TQString &newName, KMFolderDir *aParent=0)
Physically rename the folder.
Definition folderstorage.cpp:665
virtual KMFolder * trashFolder() const
If this folder has a special trash folder set, return it.
Definition folderstorage.h:387
virtual bool readIndex()=0
Read index file and fill the message-info list mMsgList.
virtual void setContentsType(KMail::FolderContentsType type, bool quiet=false)
Set the type of contents held in this folder (mail, calendar, etc.)
Definition folderstorage.cpp:1116
virtual void msgStatusChanged(const KMMsgStatus oldStatus, const KMMsgStatus newStatus, int idx)
Called by KMMsgBase::setStatus when status of a message has changed required to keep the number unrea...
Definition folderstorage.cpp:864
int appendToFolderIdsFile(int idx=-1)
Append message to end of message serial number file.
Definition folderstorage.cpp:1013
void registerWithMessageDict()
Triggers registration with the message dict, which will cause the dict to ask the FolderStorage to fi...
Definition folderstorage.cpp:964
virtual TQString fileName() const
Returns the filename of the folder (reimplemented in KMFolderImap)
Definition folderstorage.cpp:143
void msgRemoved(KMFolder *, TQ_UINT32 sernum)
Emitted before a message is removed from the folder.
virtual int find(const KMMsgBase *msg) const =0
Returns the index of the given message or -1 if not found.
void msgRemoved(int idx, TQString msgIdMD5)
Emitted after a message is removed from the folder.
virtual void reallyAddMsg(KMMessage *aMsg)
Add the message to the folder after it has been retrieved from an IMAP server.
Definition folderstorage.cpp:323
bool needsCompact
sven: true if on destruct folder needs to be compacted.
Definition folderstorage.h:630
bool needsCompacting() const
Returns TRUE if the folder contains deleted messages.
Definition folderstorage.h:329
virtual KMMessage * readMsg(int idx)=0
Load message from file and store it at given index.
void msgChanged(KMFolder *, TQ_UINT32 sernum, int delta)
Emitted, when the status of a message is changed.
virtual FolderJob * createJob(KMMessage *msg, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0, TQString partSpecifier=TQString(), const AttachmentStrategy *as=0) const
These methods create respective FolderJob (You should derive FolderJob for each derived KMFolder).
Definition folderstorage.cpp:600
virtual void setHasChildren(ChildrenState state)
Specify if the folder has children.
Definition folderstorage.h:128
KMMsgDictREntry * rDict() const
Returns the reverse-dictionary for this folder.
Definition folderstorage.h:580
bool autoCreateIndex() const
Returns TRUE if a table of contents file is automatically created.
Definition folderstorage.h:314
void statusMsg(const TQString &)
Emmited to display a message somewhere in a status line.
virtual const KMMsgBase * getMsgBase(int idx) const =0
Provides access to the basic message fields that are also stored in the index.
virtual int addMsgKeepUID(KMMessage *msg, int *index_return=0)
(Note(bo): This needs to be fixed better at a later point.) This is overridden by dIMAP because addMs...
Definition folderstorage.h:197
bool mFilesLocked
TRUE if the files of the folder are locked (writable)
Definition folderstorage.h:622
virtual void markUnreadAsRead()
Mark all new and unread messages as read.
Definition folderstorage.cpp:183
void numUnreadMsgsChanged(KMFolder *)
Emitted when number of unread messages has changed.
void replaceMsgSerNum(unsigned long sernum, KMMsgBase *msg, int idx)
Replaces the serial number for the message msg at index idx with sernum.
Definition folderstorage.cpp:1025
void changed()
Emitted when the status, name, or associated accounts of this folder changed.
virtual void setStatus(int idx, KMMsgStatus status, bool toggle=false)
Set the status of the message at index idx to status.
Definition folderstorage.cpp:1043
void invalidateFolder()
Called when serial numbers for a folder are invalidated, invalidates/recreates data structures depend...
Definition folderstorage.cpp:987
bool compactable() const
false if index file is out of sync with mbox file
Definition folderstorage.h:396
virtual FolderJob * doCreateJob(KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as) const =0
These two methods actually create the jobs.
bool mExportsSernums
Has this storage exported its serial numbers to the global message dict for lookup?
Definition folderstorage.h:618
virtual void correctUnreadMsgsCount()
A cludge to help make sure the count of unread messges is kept in sync.
Definition folderstorage.cpp:957
virtual void reallyAddCopyOfMsg(KMMessage *aMsg)
Add a copy of the message to the folder after it has been retrieved from an IMAP server.
Definition folderstorage.cpp:344
virtual KMFolderType folderType() const
Returns the type of this folder.
Definition folderstorage.h:96
virtual int expungeContents()=0
Called by KMFolder::expunge() to delete the actual contents.
void searchDone(KMFolder *, TQ_UINT32, const KMSearchPattern *, bool)
Emitted when a search for a single message is completed The serial number and a bool matching yes/no ...
virtual void removeMsg(int i, bool imapQuiet=false)
Remove (first occurrence of) given message from the folder.
Definition folderstorage.cpp:380
void readFolderIdsFile()
Read the on-disk cache of serial numbers of messages in this store and fill those into the global mes...
Definition folderstorage.cpp:976
virtual void tryReleasingFolder(KMFolder *)
Try releasing folder if possible, something is attempting an exclusive access to it.
Definition folderstorage.h:273
virtual bool canAddMsgNow(KMMessage *aMsg, int *aIndex_ret)
Returns FALSE, if the message has to be retrieved from an IMAP account first.
Definition folderstorage.cpp:301
void headerOfMsgChanged(const KMMsgBase *, int idx)
Tell the folder that a header field that is usually used for the index (subject, from,...
Definition folderstorage.cpp:898
KMail::FolderContentsType mContentsType
Type of contents in this folder.
Definition folderstorage.h:648
virtual void search(const KMSearchPattern *)
Search for messages The end is signaled with searchDone()
Definition folderstorage.cpp:1126
virtual void remove()
Removes the folder physically from disk and empties the contents of the folder in memory.
Definition folderstorage.cpp:755
virtual bool canDeleteMessages() const
Can messages in this folder be deleted?
Definition folderstorage.cpp:1194
KMail::FolderContentsType contentsType() const
Definition folderstorage.h:404
virtual KMMsgInfo * unGetMsg(int idx)
Replace KMMessage with KMMsgInfo and delete KMMessage
Definition folderstorage.cpp:566
virtual int removeContents()=0
Called by KMFolder::remove() to delete the actual contents.
void noContentChanged()
Emitted when the no content state of the folder changes.
void locationChanged(const TQString &, const TQString &)
Emitted when the location on disk of the folder changes.
virtual int moveMsg(KMMessage *msg, int *index_return=0)
Detaches the given message from it's current folder and adds it to this folder.
Definition folderstorage.cpp:621
virtual int addMsg(KMMessage *msg, int *index_return=0)=0
Add the given message to the folder.
virtual int canAccess()=0
Check folder for permissions Returns zero if readable and writable.
virtual void setAutoCreateIndex(bool)
Allow/disallow automatic creation of a table of contents file.
Definition folderstorage.cpp:151
void searchResult(KMFolder *, TQValueList< TQ_UINT32 >, const KMSearchPattern *, bool complete)
Emitted when a search delivers results The matching serial numbers are included If complete is true t...
virtual bool noContent() const
Returns, if the folder can't contain mails, but only subfolder.
Definition folderstorage.h:107
virtual const KMMsgBase * operator[](int idx) const
Same as getMsgBase(int).
Definition folderstorage.h:176
TQString label() const
Returns the label of the folder for visualization.
Definition folderstorage.cpp:815
virtual void setNoChildren(bool aNoChildren)
Specify, that the folder can't have children.
Definition folderstorage.cpp:1108
void setRDict(KMMsgDictREntry *rentry) const
Sets the reverse-dictionary for this folder.
Definition folderstorage.cpp:1031
KMMsgDictREntry * mRDict
Points at the reverse dictionary for this folder.
Definition folderstorage.h:638
void readOnlyChanged(KMFolder *)
Emitted when the readonly status of the folder changes.
void contentsTypeChanged(KMail::FolderContentsType type)
Emitted when the contents type (calendar, mail, tasks, ..) of the folderstorage changes.
virtual void fillMessageDict()
Inserts messages into the message dictionary.
Definition folderstorage.h:558
virtual int writeIndex(bool createEmptyIndex=false)=0
Write index to index-file.
bool mAutoCreateIndex
is the automatic creation of a index file allowed ?
Definition folderstorage.h:615
void closed(KMFolder *)
Emitted when the folder was closed and ticket owners have to reopen.
virtual bool isCloseToQuota() const
Return whether the folder is close to its quota limit, which can be reflected in the UI.
Definition folderstorage.cpp:858
TQ_INT64 folderSize() const
Total size of the contents of this folder.
Definition folderstorage.cpp:847
virtual void quiet(bool beQuiet)
If set to quiet the folder will not emit msgAdded(idx) signal.
Definition folderstorage.cpp:205
void deregisterFromMessageDict()
Triggers deregistration from the message dict, which will cause the dict to ask the FolderStorage to ...
Definition folderstorage.cpp:970
virtual void setNoContent(bool aNoContent)
Specify, that the folder can't contain mails.
Definition folderstorage.cpp:1199
virtual ChildrenState hasChildren() const
Returns if the folder has children, has no children or we don't know.
Definition folderstorage.h:125
KMail list that manages the contents of one directory that may contain folders and/or other directori...
Definition kmfolderdir.h:16
This class is an abstraction of a search over messages.
Definition kmsearchpattern.h:308