kmfolder.cpp
83 TQString msg = i18n("<qt>Error while creating file <b>%1</b>:<br>%2</qt>").arg(aFolderName).arg(strerror(rc));
170 mExpireAction = config->readEntry("ExpireAction", "Delete") == "Move" ? ExpireMove : ExpireDelete;
218 if ( mIdentity != 0 && ( !mStorage || !mStorage->account() || mIdentity != mStorage->account()->identityId() ) )
907 message = i18n( "Folder names cannot contain the / (slash) character; please choose another folder name." );
913 message = i18n( "Folder names cannot start with a . (dot) character; please choose another folder name." );
932 message = i18n( "Your IMAP server does not allow the character '%1'; please choose another folder name." ).arg( delimiter );
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.
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
virtual bool noChildren() const
Returns, if the folder can't have children.
Definition: folderstorage.h:113
void emitMsgAddedSignals(int idx)
Called by derived classes implementation of addMsg.
Definition: folderstorage.cpp:284
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 int rename(const TQString &newName, KMFolderDir *aParent=0)
Physically rename the folder.
Definition: folderstorage.cpp:665
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
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
virtual int find(const KMMsgBase *msg) const =0
Returns the index of the given message or -1 if not found.
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 needsCompacting() const
Returns TRUE if the folder contains deleted messages.
Definition: folderstorage.h:329
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 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
virtual void markUnreadAsRead()
Mark all new and unread messages as read.
Definition: folderstorage.cpp:183
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
virtual KMFolder * trashFolder() const
If this folder has a special trash folder set, return it.
Definition: folderstorage.h:387
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 void updateChildrenState()
Updates the hasChildren() state.
Definition: folderstorage.cpp:1096
virtual void removeMsg(int i, bool imapQuiet=false)
Remove (first occurrence of) given message from the folder.
Definition: folderstorage.cpp:380
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
virtual KMMsgInfo * unGetMsg(int idx)
Replace KMMessage with KMMsgInfo and delete KMMessage
Definition: folderstorage.cpp:566
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
virtual bool noContent() const
Returns, if the folder can't contain mails, but only subfolder.
Definition: folderstorage.h:107
virtual void setNoChildren(bool aNoChildren)
Specify, that the folder can't have children.
Definition: folderstorage.cpp:1108
virtual const KMMsgBase * getMsgBase(int idx) const =0
Provides access to the basic message fields that are also stored in the index.
virtual int writeIndex(bool createEmptyIndex=false)=0
Write index to index-file.
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
KMail list that manages the contents of one directory that may contain folders and/or other directori...
Definition: kmfolderdir.h:16
virtual KMFolderMgr * manager() const
Returns the folder manager that manages this folder.
Definition: kmfolderdir.cpp:355
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.
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
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
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
void ignoreJobsForMessage(KMMessage *)
Removes and deletes all jobs associated with the particular message.
Definition: kmfolder.cpp:341
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
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.
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
void msgHeaderChanged(KMFolder *, int)
Emitted when a field of the header of a specific message changed.
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
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
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
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
ExpireUnits getUnreadExpireUnits() const
Units getUnreadExpireAge() is returned in.
Definition: kmfolder.h:461
int find(const KMMsgBase *msg) const
Returns the index of the given message or -1 if not found.
Definition: kmfolder.cpp:435
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.
Class is used for all Mailing List handling inside KMail.
Definition: mailinglist-magic.h:23
A scheduled "compact mails in this folder" task.
Definition: compactionjob.h:102