kmfolder.h
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a ...
Definition: folderstorage.h:80
KMail list that manages the contents of one directory that may contain folders and/or other directori...
Definition: kmfolderdir.h:16
int getUnreadExpireAge() const
Get the age at which unread messages are expired.
Definition: kmfolder.h:449
void setNoChildren(bool aNoChildren)
Specify, that the folder can't have children.
Definition: kmfolder.cpp:316
void viewConfigChanged()
Emitted when the variables for the config of the view have changed.
bool isTrash()
Returns true if this folder is configured as a trash folder, locally or for one of the accounts.
Definition: kmfolder.h:110
KMFolder * trashFolder() const
If this folder has a special trash folder set, return it.
Definition: kmfolder.cpp:821
void emitMsgAddedSignals(int idx)
Called by derived classes implementation of addMsg.
Definition: kmfolder.cpp:405
int updateIndex()
Incrementally update the index if possible else call writeIndex.
Definition: kmfolder.cpp:856
int moveMsg(KMMessage *msg, int *index_return=0)
Detaches the given message from it's current folder and adds it to this folder.
Definition: kmfolder.cpp:425
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: kmfolder.cpp:395
void correctUnreadMsgsCount()
A cludge to help make sure the count of unread messges is kept in sync.
Definition: kmfolder.cpp:700
bool isMainInbox()
Returns true if this folder is the inbox on the local disk.
Definition: kmfolder.h:96
void setReadExpireUnits(ExpireUnits units)
Set units to use for expiry of read messages.
Definition: kmfolder.cpp:756
KMFolder(KMFolderDir *parent, const TQString &name, KMFolderType aFolderType, bool withIndex=true, bool exportedSernums=true)
Constructs a new Folder object.
Definition: kmfolder.cpp:48
TQString idString() const
Returns a string that can be used to identify this folder.
Definition: kmfolder.cpp:705
void changed()
Emitted when the status, name, or associated accounts of this folder changed.
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: kmfolder.cpp:473
virtual TQString prettyURL() const
URL of the node for visualization purposes.
Definition: kmfolder.cpp:593
bool moveInProgress() const
Returns true if there is currently a move or copy operation going on with this folder as target.
Definition: kmfolder.h:538
void shortcutChanged(KMFolder *)
Emitted when the shortcut associated with this folder changes.
void reallyAddCopyOfMsg(KMMessage *aMsg)
Add a copy of the message to the folder after it has been retrieved from an IMAP server.
Definition: kmfolder.cpp:866
bool isDrafts()
Returns true if this folder is the drafts box of the local account, or is configured to be the drafts...
Definition: kmfolder.h:115
const FolderStorage * storage() const
if the folder is const, the storage should be as well
Definition: kmfolder.h:138
void ignoreJobsForMessage(KMMessage *)
Removes and deletes all jobs associated with the particular message.
Definition: kmfolder.cpp:341
ExpireAction expireAction() const
What should expiry do? Delete or move to another folder?
Definition: kmfolder.h:473
virtual TQString label() const
Returns the label of the folder for visualization.
Definition: kmfolder.cpp:581
void cleared()
Emitted when the contents of a folder have been cleared (new search in a search folder,...
KMFolderDir * child() const
Returns the folder directory associated with this node or 0 if no such directory exists.
Definition: kmfolder.h:157
bool isTemplates()
Returns true if this folder is the templates folder of the local account, or is configured to be the ...
Definition: kmfolder.h:120
void numUnreadMsgsChanged(KMFolder *)
Emitted when number of unread messages has changed.
ExpireUnits getReadExpireUnits() const
Units getReadExpireAge() is returned in.
Definition: kmfolder.h:467
bool isValidName(const TQString &folderName, TQString &message)
Returns true if the name is valid for a child of this folder.
Definition: kmfolder.cpp:899
TQString fileName() const
Returns the filename of the folder (reimplemented in KMFolderImap)
Definition: kmfolder.cpp:238
void msgRemoved(KMFolder *, TQ_UINT32 sernum)
Emitted before a message is removed from the folder.
bool putRepliesInSameFolder() const
Returns true if the replies to mails from this folder should be put in the same folder.
Definition: kmfolder.h:519
bool isSent()
Returns true if this folder is the sent-mail box of the local account, or is configured to be the sen...
Definition: kmfolder.h:105
KMMsgInfo * unGetMsg(int idx)
Replace KMMessage with KMMsgInfo and delete KMMessage
Definition: kmfolder.cpp:326
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: kmfolder.cpp:346
int canAccess()
Check folder for permissions Returns zero if readable and writable.
Definition: kmfolder.cpp:484
int addMsg(KMMessage *msg, int *index_return=0)
Add the given message to the folder.
Definition: kmfolder.cpp:390
TQString whoField() const
Get / set the name of the field that is used for the Sender/Receiver column in the headers (From/To)
Definition: kmfolder.h:396
int getReadExpireAge() const
Get the age at which read messages are expired.
Definition: kmfolder.h:455
bool isMessage(int idx)
Checks if the message is already "gotten" with getMsg.
Definition: kmfolder.cpp:331
bool isAutoExpire() const
Does this folder automatically expire old messages?
Definition: kmfolder.h:417
void msgHeaderChanged(KMFolder *, int)
Emitted when a field of the header of a specific message changed.
bool ignoreNewMail() const
Returns true if the user doesn't want to get notified about new mail in this folder.
Definition: kmfolder.h:526
bool needsCompacting() const
Returns true if the folder contains deleted messages.
Definition: kmfolder.cpp:546
void setUnreadExpireAge(int age)
Set the maximum age for unread messages in this folder.
Definition: kmfolder.cpp:733
void msgRemoved(int idx, TQString msgIdMD5)
Emitted after a message is removed from the folder.
int expungeOldMsg(int days)
Delete messages in the folder that are older than days.
Definition: kmfolder.cpp:420
bool isSystemFolder() const
Returns true if the folder is a kmail system folder.
Definition: kmfolder.h:369
void setAutoExpire(bool enabled)
Set whether this folder automatically expires messages.
Definition: kmfolder.cpp:725
int rename(const TQString &newName, KMFolderDir *aParent=0)
Physically rename the folder.
Definition: kmfolder.cpp:531
TQString expireToFolderId() const
If expiry should move to folder, return the ID of that folder.
Definition: kmfolder.h:479
KMFolderDir * createChildFolder()
Create a child folder directory and associates it with this folder.
Definition: kmfolder.cpp:264
void readConfig(TDEConfig *config)
This is used by the storage to read the folder specific configuration.
Definition: kmfolder.cpp:161
void expireOldMessages(bool immediate)
Expire old messages in this folder.
Definition: kmfolder.cpp:801
void setNoContent(bool aNoContent)
Specify, that the folder can't contain mails.
Definition: kmfolder.cpp:306
const KMMsgBase * getMsgBase(int idx) const
Provides access to the basic message fields that are also stored in the index.
Definition: kmfolder.cpp:360
void folderSizeChanged(KMFolder *)
Emitted when the folder's size changes.
void setStatus(int idx, KMMsgStatus status, bool toggle=false)
Set the status of the message at index idx to status.
Definition: kmfolder.cpp:831
void setMailingListEnabled(bool enabled)
Returns true if this folder is associated with a mailing-list.
Definition: kmfolder.cpp:620
int countUnreadRecursive()
Number of new or unread messages in this folder and all folders contained by this folder.
Definition: kmfolder.cpp:455
bool isWritable() const
Can we write into and delete from this folder (on IMAP that's not necessarily !isReadOnly())
Definition: kmfolder.cpp:571
void remove()
Removes the folder physically from disk and empties the contents of the folder in memory.
Definition: kmfolder.cpp:515
bool noContent() const
Returns, if the folder can't contain mails, but only subfolder.
Definition: kmfolder.cpp:301
void statusMsg(const TQString &)
Emmited to display a message somewhere in a status line.
void setUnreadExpireUnits(ExpireUnits units)
Set units to use for expiry of unread messages.
Definition: kmfolder.cpp:741
TQString userWhoField(void)
Get / set the user-settings for the WhoField (From/To/Empty)
Definition: kmfolder.h:400
void setReadExpireAge(int age)
Set the maximum age for read messages in this folder.
Definition: kmfolder.cpp:748
void writeConfig(TDEConfig *config) const
This is used by the storage to save the folder specific configuration.
Definition: kmfolder.cpp:200
void removeMsg(int i, bool imapQuiet=false)
Remove (first occurrence of) given message from the folder.
Definition: kmfolder.cpp:410
void quiet(bool beQuiet)
If set to quiet the folder will not emit msgAdded(idx) signal.
Definition: kmfolder.cpp:556
void closed()
Emitted when the folder is closed for real - ticket holders should discard any messages.
ExpireUnits getUnreadExpireUnits() const
Units getUnreadExpireAge() is returned in.
Definition: kmfolder.h:461
bool hasAccounts() const
Returns TRUE if accounts are associated with this folder.
Definition: kmfolder.h:128
int find(const KMMsgBase *msg) const
Returns the index of the given message or -1 if not found.
Definition: kmfolder.cpp:435
virtual TQString systemLabel() const
Set the label that is used as a system default.
Definition: kmfolder.h:377
void setChild(KMFolderDir *aChild)
Set the folder directory associated with this node.
Definition: kmfolder.cpp:295
void reallyAddMsg(KMMessage *aMsg)
Add the message to the folder after it has been retrieved from an IMAP server.
Definition: kmfolder.cpp:861
void msgChanged(KMFolder *, TQ_UINT32 sernum, int delta)
Emitted, when the status of a message is changed.
bool folderIsSentMailFolder(const KMFolder *)
Returns true if the folder is one of the sent-mail folders.
Definition: kmkernel.cpp:2222
Class is used for all Mailing List handling inside KMail.
Definition: mailinglist-magic.h:23