#include <folderstorage.h>
|
enum | ChildrenState { HasChildren
, HasNoChildren
, ChildrenUnknown
} |
|
|
void | changed () |
|
void | cleared () |
|
void | expunged (KMFolder *) |
|
void | closed (KMFolder *) |
|
void | invalidated (KMFolder *) |
|
void | nameChanged () |
|
void | locationChanged (const TQString &, const TQString &) |
|
void | contentsTypeChanged (KMail::FolderContentsType type) |
|
void | readOnlyChanged (KMFolder *) |
|
void | noContentChanged () |
|
void | msgRemoved (KMFolder *, TQ_UINT32 sernum) |
|
void | msgRemoved (int idx, TQString msgIdMD5) |
|
void | msgRemoved (KMFolder *) |
|
void | msgAdded (int idx) |
|
void | msgAdded (KMFolder *, TQ_UINT32 sernum) |
|
void | msgChanged (KMFolder *, TQ_UINT32 sernum, int delta) |
|
void | msgHeaderChanged (KMFolder *, int) |
|
void | statusMsg (const TQString &) |
|
void | numUnreadMsgsChanged (KMFolder *) |
|
void | removed (KMFolder *, bool) |
|
void | searchResult (KMFolder *, TQValueList< TQ_UINT32 >, const KMSearchPattern *, bool complete) |
|
void | searchDone (KMFolder *, TQ_UINT32, const KMSearchPattern *, bool) |
|
void | folderSizeChanged () |
|
void | syncStateChanged () |
|
|
| FolderStorage (KMFolder *folder, const char *name=0) |
|
KMFolder * | folder () const |
|
virtual KMFolderType | folderType () const |
|
virtual TQString | fileName () const |
|
TQString | location () const |
|
virtual TQString | indexLocation () const =0 |
|
virtual bool | noContent () const |
|
virtual void | setNoContent (bool aNoContent) |
|
virtual bool | noChildren () const |
|
virtual void | setNoChildren (bool aNoChildren) |
|
virtual ChildrenState | hasChildren () const |
|
virtual void | setHasChildren (ChildrenState state) |
|
virtual void | updateChildrenState () |
|
virtual KMMessage * | getMsg (int idx) |
|
virtual KMMsgInfo * | unGetMsg (int idx) |
|
virtual bool | isMessage (int idx) |
|
virtual KMMessage * | readTemporaryMsg (int idx) |
|
virtual DwString | getDwString (int idx)=0 |
|
virtual void | ignoreJobsForMessage (KMMessage *) |
|
virtual FolderJob * | createJob (KMMessage *msg, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0, TQString partSpecifier=TQString(), const AttachmentStrategy *as=0) const |
|
virtual FolderJob * | createJob (TQPtrList< KMMessage > &msgList, const TQString &sets, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0) const |
|
virtual const KMMsgBase * | getMsgBase (int idx) const =0 |
|
virtual KMMsgBase * | getMsgBase (int idx)=0 |
|
virtual const KMMsgBase * | operator[] (int idx) const |
|
virtual KMMsgBase * | operator[] (int idx) |
|
virtual KMMessage * | take (int idx) |
|
virtual void | take (TQPtrList< KMMessage > msgList) |
|
virtual int | addMsg (KMMessage *msg, int *index_return=0)=0 |
|
virtual int | addMsgKeepUID (KMMessage *msg, int *index_return=0) |
|
virtual int | addMsg (TQPtrList< KMMessage > &, TQValueList< int > &index_return) |
|
void | emitMsgAddedSignals (int idx) |
|
virtual bool | canAddMsgNow (KMMessage *aMsg, int *aIndex_ret) |
|
virtual void | removeMsg (int i, bool imapQuiet=false) |
|
virtual void | removeMsg (const TQPtrList< KMMsgBase > &msgList, bool imapQuiet=false) |
|
virtual void | removeMsg (const TQPtrList< KMMessage > &msgList, bool imapQuiet=false) |
|
virtual int | expungeOldMsg (int days) |
|
virtual int | moveMsg (KMMessage *msg, int *index_return=0) |
|
virtual int | moveMsg (TQPtrList< KMMessage >, int *index_return=0) |
|
virtual int | find (const KMMsgBase *msg) const =0 |
|
int | find (const KMMessage *msg) const |
|
virtual int | count (bool cache=false) const |
|
virtual int | countUnread () |
|
TQ_INT64 | folderSize () const |
|
virtual bool | isCloseToQuota () const |
|
virtual void | msgStatusChanged (const KMMsgStatus oldStatus, const KMMsgStatus newStatus, int idx) |
|
virtual int | open (const char *owner)=0 |
|
virtual int | canAccess ()=0 |
|
void | close (const char *owner, bool force=false) |
|
virtual void | reallyDoClose (const char *owner)=0 |
|
virtual void | tryReleasingFolder (KMFolder *) |
|
virtual void | sync ()=0 |
|
bool | isOpened () const |
|
virtual void | markNewAsUnread () |
|
virtual void | markUnreadAsRead () |
|
virtual int | create ()=0 |
|
virtual void | remove () |
|
virtual int | expunge () |
|
virtual int | compact (bool silent)=0 |
|
virtual int | rename (const TQString &newName, KMFolderDir *aParent=0) |
|
bool | autoCreateIndex () const |
|
virtual void | setAutoCreateIndex (bool) |
|
bool | dirty () const |
|
void | setDirty (bool f) |
|
bool | needsCompacting () const |
|
virtual void | setNeedsCompacting (bool f) |
|
virtual void | quiet (bool beQuiet) |
|
virtual bool | isReadOnly () const =0 |
|
virtual bool | canDeleteMessages () const |
|
TQString | label () const |
|
virtual void | correctUnreadMsgsCount () |
|
virtual int | writeIndex (bool createEmptyIndex=false)=0 |
|
void | registerWithMessageDict () |
|
void | deregisterFromMessageDict () |
|
virtual void | setStatus (int idx, KMMsgStatus status, bool toggle=false) |
|
virtual void | setStatus (TQValueList< int > &ids, KMMsgStatus status, bool toggle=false) |
|
void | removeJobs () |
|
virtual void | readConfig () |
|
virtual void | writeConfig () |
|
virtual KMFolder * | trashFolder () const |
|
void | addJob (FolderJob *) const |
|
bool | compactable () const |
|
virtual void | setContentsType (KMail::FolderContentsType type, bool quiet=false) |
|
KMail::FolderContentsType | contentsType () const |
|
virtual void | search (const KMSearchPattern *) |
|
virtual void | search (const KMSearchPattern *, TQ_UINT32 serNum) |
|
virtual bool | isMoveable () const |
|
virtual KMAccount * | account () const |
|
virtual bool | mailCheckInProgress () const |
|
|
enum | { mDirtyTimerInterval = 600000
} |
|
|
virtual FolderJob * | doCreateJob (KMMessage *msg, FolderJob::JobType jt, KMFolder *folder, TQString partSpecifier, const AttachmentStrategy *as) const =0 |
|
virtual FolderJob * | doCreateJob (TQPtrList< KMMessage > &msgList, const TQString &sets, FolderJob::JobType jt, KMFolder *folder) const =0 |
|
void | headerOfMsgChanged (const KMMsgBase *, int idx) |
|
virtual KMMessage * | readMsg (int idx)=0 |
|
virtual void | fillMessageDict () |
|
void | readFolderIdsFile () |
|
int | writeFolderIdsFile () const |
|
int | touchFolderIdsFile () |
|
int | appendToFolderIdsFile (int idx=-1) |
|
void | setRDict (KMMsgDictREntry *rentry) const |
|
KMMsgDictREntry * | rDict () const |
|
void | replaceMsgSerNum (unsigned long sernum, KMMsgBase *msg, int idx) |
|
void | invalidateFolder () |
|
virtual int | removeContents ()=0 |
|
virtual int | expungeContents ()=0 |
|
virtual bool | readIndex ()=0 |
|
virtual KMMsgBase * | takeIndexEntry (int idx)=0 |
|
virtual KMMsgInfo * | setIndexEntry (int idx, KMMessage *msg)=0 |
|
virtual void | clearIndex (bool autoDelete=true, bool syncDict=false)=0 |
|
virtual void | truncateIndex ()=0 |
|
virtual TQ_INT64 | doFolderSize () const |
|
The FolderStorage class is the bass class for the storage related aspects of a collection of mail (a folder).
Accounts
The accounts (of KMail) that are fed into the folder are represented as the children of the folder. They are only stored here during runtime to have a reference for which accounts point to a specific folder.
Definition at line 79 of file folderstorage.h.
◆ anonymous enum
◆ ChildrenState
enum FolderStorage::ChildrenState |
◆ FolderStorage()
FolderStorage::FolderStorage |
( |
KMFolder * |
folder, |
|
|
const char * |
name = 0 |
|
) |
| |
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 63 of file folderstorage.cpp.
◆ ~FolderStorage()
FolderStorage::~FolderStorage |
( |
| ) |
|
|
virtual |
◆ account()
KMAccount * FolderStorage::account |
( |
| ) |
const |
|
virtual |
◆ addJob()
void FolderStorage::addJob |
( |
FolderJob * |
job | ) |
const |
Add job for this folder.
This is done automatically by createJob. This method is public only for other kind of FolderJob like ExpireJob.
Definition at line 119 of file folderstorage.cpp.
◆ addMsg() [1/2]
virtual int FolderStorage::addMsg |
( |
KMMessage * |
msg, |
|
|
int * |
index_return = 0 |
|
) |
| |
|
pure virtual |
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).
◆ addMsg() [2/2]
int FolderStorage::addMsg |
( |
TQPtrList< KMMessage > & |
msgList, |
|
|
TQValueList< int > & |
index_return |
|
) |
| |
|
virtual |
Adds the given messages to the folder.
Behaviour is identical to addMsg(msg)
Definition at line 1162 of file folderstorage.cpp.
◆ addMsgKeepUID()
virtual int FolderStorage::addMsgKeepUID |
( |
KMMessage * |
msg, |
|
|
int * |
index_return = 0 |
|
) |
| |
|
inlinevirtual |
(Note(bo): This needs to be fixed better at a later point.) This is overridden by dIMAP because addMsg strips the X-UID header from the mail.
Definition at line 197 of file folderstorage.h.
◆ appendToFolderIdsFile()
int FolderStorage::appendToFolderIdsFile |
( |
int |
idx = -1 | ) |
|
|
protected |
◆ autoCreateIndex()
bool FolderStorage::autoCreateIndex |
( |
| ) |
const |
|
inline |
Returns TRUE if a table of contents file is automatically created.
Definition at line 314 of file folderstorage.h.
◆ canAccess()
virtual int FolderStorage::canAccess |
( |
| ) |
|
|
pure virtual |
Check folder for permissions Returns zero if readable and writable.
◆ canAddMsgNow()
bool FolderStorage::canAddMsgNow |
( |
KMMessage * |
aMsg, |
|
|
int * |
aIndex_ret |
|
) |
| |
|
virtual |
Returns FALSE, if the message has to be retrieved from an IMAP account first.
In this case this function does this and cares for the rest
Definition at line 301 of file folderstorage.cpp.
◆ canDeleteMessages()
bool FolderStorage::canDeleteMessages |
( |
| ) |
const |
|
virtual |
◆ changed
void FolderStorage::changed |
( |
| ) |
|
|
signal |
Emitted when the status, name, or associated accounts of this folder changed.
◆ cleared
void FolderStorage::cleared |
( |
| ) |
|
|
signal |
Emitted when the contents of a folder have been cleared (new search in a search folder, for example)
◆ close()
void FolderStorage::close |
( |
const char * |
owner, |
|
|
bool |
force = false |
|
) |
| |
Close folder.
open() and close() use reference counting. If force is true the files are closed regardless of reference count, and the reference count will be set to zero.
Definition at line 102 of file folderstorage.cpp.
◆ closed
void FolderStorage::closed |
( |
KMFolder * |
| ) |
|
|
signal |
Emitted when the folder was closed and ticket owners have to reopen.
◆ compact()
virtual int FolderStorage::compact |
( |
bool |
silent | ) |
|
|
pure virtual |
Remove deleted messages from the folder.
Returns zero on success and an errno on failure. A statusbar message will inform the user that the compaction worked, unless silent is set.
◆ compactable()
bool FolderStorage::compactable |
( |
| ) |
const |
|
inline |
false if index file is out of sync with mbox file
Definition at line 396 of file folderstorage.h.
◆ contentsType()
KMail::FolderContentsType FolderStorage::contentsType |
( |
| ) |
const |
|
inline |
- Returns
- the type of contents held in this folder (mail, calendar, etc.)
Definition at line 404 of file folderstorage.h.
◆ contentsTypeChanged
void FolderStorage::contentsTypeChanged |
( |
KMail::FolderContentsType |
type | ) |
|
|
signal |
Emitted when the contents type (calendar, mail, tasks, ..) of the folderstorage changes.
◆ correctUnreadMsgsCount()
void FolderStorage::correctUnreadMsgsCount |
( |
| ) |
|
|
virtual |
A cludge to help make sure the count of unread messges is kept in sync.
Definition at line 957 of file folderstorage.cpp.
◆ count()
int FolderStorage::count |
( |
bool |
cache = false | ) |
const |
|
virtual |
◆ countUnread()
int FolderStorage::countUnread |
( |
| ) |
|
|
virtual |
◆ create()
virtual int FolderStorage::create |
( |
| ) |
|
|
pure virtual |
Create a new folder with the name of this object and open it.
Returns zero on success and an error code equal to the c-library fopen call otherwise.
◆ createJob() [1/2]
FolderJob * FolderStorage::createJob |
( |
KMMessage * |
msg, |
|
|
FolderJob::JobType |
jt = FolderJob::tGetMessage , |
|
|
KMFolder * |
folder = 0 , |
|
|
TQString |
partSpecifier = TQString() , |
|
|
const AttachmentStrategy * |
as = 0 |
|
) |
| const |
|
virtual |
These methods create respective FolderJob (You should derive FolderJob for each derived KMFolder).
Definition at line 600 of file folderstorage.cpp.
◆ createJob() [2/2]
FolderJob * FolderStorage::createJob |
( |
TQPtrList< KMMessage > & |
msgList, |
|
|
const TQString & |
sets, |
|
|
FolderJob::JobType |
jt = FolderJob::tGetMessage , |
|
|
KMFolder * |
folder = 0 |
|
) |
| const |
|
virtual |
◆ deregisterFromMessageDict()
void FolderStorage::deregisterFromMessageDict |
( |
| ) |
|
Triggers deregistration from the message dict, which will cause the dict to ask the FolderStorage to write the relevant data structures to disk.
Definition at line 970 of file folderstorage.cpp.
◆ dirty()
bool FolderStorage::dirty |
( |
| ) |
const |
|
inline |
Returns TRUE if the table of contents is dirty.
This happens when a message is deleted from the folder. The toc will then be re-created when the folder is closed.
Definition at line 323 of file folderstorage.h.
◆ doCreateJob()
virtual FolderJob * FolderStorage::doCreateJob |
( |
KMMessage * |
msg, |
|
|
FolderJob::JobType |
jt, |
|
|
KMFolder * |
folder, |
|
|
TQString |
partSpecifier, |
|
|
const AttachmentStrategy * |
as |
|
) |
| const |
|
protectedpure virtual |
These two methods actually create the jobs.
They have to be implemented in all folders. - See also
- createJob
◆ doFolderSize()
virtual TQ_INT64 FolderStorage::doFolderSize |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ dotEscape()
TQString FolderStorage::dotEscape |
( |
const TQString & |
aStr | ) |
|
|
static |
◆ emitMsgAddedSignals()
void FolderStorage::emitMsgAddedSignals |
( |
int |
idx | ) |
|
Called by derived classes implementation of addMsg.
Emits msgAdded signals
Restart always the timer or not. BTW we get a kmheaders refresh each 3 seg.?
Definition at line 284 of file folderstorage.cpp.
◆ expunge()
int FolderStorage::expunge |
( |
| ) |
|
|
virtual |
Delete entire folder.
Forces a close but opens the folder again afterwards. Returns errno(3) error code or zero on success. see KMFolder::expungeContents
Definition at line 783 of file folderstorage.cpp.
◆ expungeContents()
virtual int FolderStorage::expungeContents |
( |
| ) |
|
|
protectedpure virtual |
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.
◆ expunged
void FolderStorage::expunged |
( |
KMFolder * |
| ) |
|
|
signal |
Emitted after an expunge.
If not quiet, changed() will be emmitted first.
◆ expungeOldMsg()
int FolderStorage::expungeOldMsg |
( |
int |
days | ) |
|
|
virtual |
Delete messages in the folder that are older than days.
Return the number of deleted messages.
Definition at line 254 of file folderstorage.cpp.
◆ fileName()
TQString FolderStorage::fileName |
( |
| ) |
const |
|
virtual |
Returns the filename of the folder (reimplemented in KMFolderImap)
Definition at line 143 of file folderstorage.cpp.
◆ fillMessageDict()
virtual void FolderStorage::fillMessageDict |
( |
| ) |
|
|
inlineprotectedvirtual |
Inserts messages into the message dictionary.
The messages will get new serial numbers. This is only used on newly appeared folders, where there is no .ids file yet, or when that has been invalidated.
Reimplemented in KMFolderIndex.
Definition at line 558 of file folderstorage.h.
◆ find() [1/2]
int FolderStorage::find |
( |
const KMMessage * |
msg | ) |
const |
◆ find() [2/2]
virtual int FolderStorage::find |
( |
const KMMsgBase * |
msg | ) |
const |
|
pure virtual |
Returns the index of the given message or -1 if not found.
Implemented in KMFolderIndex.
◆ folder()
KMFolder * FolderStorage::folder |
( |
void |
| ) |
const |
|
inline |
◆ folderSize()
TQ_INT64 FolderStorage::folderSize |
( |
| ) |
const |
◆ folderSizeChanged
void FolderStorage::folderSizeChanged |
( |
| ) |
|
|
signal |
Emitted when the folder's size changes.
◆ folderType()
virtual KMFolderType FolderStorage::folderType |
( |
| ) |
const |
|
inlinevirtual |
◆ getDwString()
virtual DwString FolderStorage::getDwString |
( |
int |
idx | ) |
|
|
pure virtual |
Read a message and returns a DwString.
◆ getMsg()
Read message at given index.
Indexing starts at zero
Definition at line 477 of file folderstorage.cpp.
◆ getMsgBase()
virtual const KMMsgBase * FolderStorage::getMsgBase |
( |
int |
idx | ) |
const |
|
pure virtual |
Provides access to the basic message fields that are also stored in the index.
Whenever you only need subject, from, date, status you should use this method instead of getMsg() because getMsg() will load the message if necessary and this method does not.
Implemented in KMFolderIndex.
◆ hasChildren()
virtual ChildrenState FolderStorage::hasChildren |
( |
| ) |
const |
|
inlinevirtual |
Returns if the folder has children, has no children or we don't know.
Definition at line 125 of file folderstorage.h.
◆ headerOfMsgChanged()
void FolderStorage::headerOfMsgChanged |
( |
const KMMsgBase * |
aMsg, |
|
|
int |
idx |
|
) |
| |
|
protected |
Tell the folder that a header field that is usually used for the index (subject, from, ...) has changed of given message.
This method is usually called from within KMMessage::setSubject/set...
Definition at line 898 of file folderstorage.cpp.
◆ ignoreJobsForMessage()
void FolderStorage::ignoreJobsForMessage |
( |
KMMessage * |
msg | ) |
|
|
virtual |
Removes and deletes all jobs associated with the particular message.
Definition at line 1064 of file folderstorage.cpp.
◆ indexLocation()
virtual TQString FolderStorage::indexLocation |
( |
| ) |
const |
|
pure virtual |
◆ invalidated
void FolderStorage::invalidated |
( |
KMFolder * |
| ) |
|
|
signal |
Emitted when the serial numbers of this folder were invalidated.
◆ invalidateFolder()
void FolderStorage::invalidateFolder |
( |
| ) |
|
|
protected |
Called when serial numbers for a folder are invalidated, invalidates/recreates data structures dependent on the serial numbers for this folder.
Definition at line 987 of file folderstorage.cpp.
◆ isCloseToQuota()
bool FolderStorage::isCloseToQuota |
( |
| ) |
const |
|
virtual |
Return whether the folder is close to its quota limit, which can be reflected in the UI.
Definition at line 858 of file folderstorage.cpp.
◆ isMessage()
bool FolderStorage::isMessage |
( |
int |
idx | ) |
|
|
virtual |
Checks if the message is already "gotten" with getMsg.
Definition at line 591 of file folderstorage.cpp.
◆ isMoveable()
bool FolderStorage::isMoveable |
( |
| ) |
const |
|
virtual |
◆ isOpened()
bool FolderStorage::isOpened |
( |
| ) |
const |
|
inline |
Test if folder is opened, i.e.
its reference count is greater than zero.
Definition at line 279 of file folderstorage.h.
◆ isReadOnly()
virtual bool FolderStorage::isReadOnly |
( |
| ) |
const |
|
pure virtual |
◆ label()
TQString FolderStorage::label |
( |
| ) |
const |
Returns the label of the folder for visualization.
Definition at line 815 of file folderstorage.cpp.
◆ location()
TQString FolderStorage::location |
( |
| ) |
const |
◆ locationChanged
void FolderStorage::locationChanged |
( |
const TQString & |
, |
|
|
const TQString & |
|
|
) |
| |
|
signal |
Emitted when the location on disk of the folder changes.
This is used by all code which uses the locatio on disk of the folder storage ( or the cache storage ) as an identifier for the folder.
◆ mailCheckInProgress()
bool FolderStorage::mailCheckInProgress |
( |
| ) |
const |
|
virtual |
◆ markNewAsUnread()
void FolderStorage::markNewAsUnread |
( |
| ) |
|
|
virtual |
◆ markUnreadAsRead()
void FolderStorage::markUnreadAsRead |
( |
| ) |
|
|
virtual |
◆ moveMsg() [1/2]
int FolderStorage::moveMsg |
( |
KMMessage * |
msg, |
|
|
int * |
index_return = 0 |
|
) |
| |
|
virtual |
Detaches the given message from it's current folder and adds it to this 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.
Definition at line 621 of file folderstorage.cpp.
◆ moveMsg() [2/2]
int FolderStorage::moveMsg |
( |
TQPtrList< KMMessage > |
msglist, |
|
|
int * |
index_return = 0 |
|
) |
| |
|
virtual |
◆ msgAdded
void FolderStorage::msgAdded |
( |
int |
idx | ) |
|
|
signal |
Emitted when a message is added from the folder.
◆ msgChanged
void FolderStorage::msgChanged |
( |
KMFolder * |
, |
|
|
TQ_UINT32 |
sernum, |
|
|
int |
delta |
|
) |
| |
|
signal |
Emitted, when the status of a message is changed.
◆ msgHeaderChanged
void FolderStorage::msgHeaderChanged |
( |
KMFolder * |
, |
|
|
int |
|
|
) |
| |
|
signal |
Emitted when a field of the header of a specific message changed.
◆ msgRemoved [1/2]
void FolderStorage::msgRemoved |
( |
int |
idx, |
|
|
TQString |
msgIdMD5 |
|
) |
| |
|
signal |
Emitted after a message is removed from the folder.
◆ msgRemoved [2/2]
void FolderStorage::msgRemoved |
( |
KMFolder * |
, |
|
|
TQ_UINT32 |
sernum |
|
) |
| |
|
signal |
Emitted before a message is removed from the folder.
◆ msgStatusChanged()
void FolderStorage::msgStatusChanged |
( |
const KMMsgStatus |
oldStatus, |
|
|
const KMMsgStatus |
newStatus, |
|
|
int |
idx |
|
) |
| |
|
virtual |
Called by KMMsgBase::setStatus when status of a message has changed required to keep the number unread messages variable current.
Definition at line 864 of file folderstorage.cpp.
◆ nameChanged
void FolderStorage::nameChanged |
( |
| ) |
|
|
signal |
Emitted when the name of the folder changes.
◆ needsCompacting()
bool FolderStorage::needsCompacting |
( |
| ) |
const |
|
inline |
Returns TRUE if the folder contains deleted messages.
Definition at line 329 of file folderstorage.h.
◆ noChildren()
virtual bool FolderStorage::noChildren |
( |
| ) |
const |
|
inlinevirtual |
Returns, if the folder can't have children.
Definition at line 113 of file folderstorage.h.
◆ noContent()
virtual bool FolderStorage::noContent |
( |
| ) |
const |
|
inlinevirtual |
Returns, if the folder can't contain mails, but only subfolder.
Definition at line 107 of file folderstorage.h.
◆ noContentChanged
void FolderStorage::noContentChanged |
( |
| ) |
|
|
signal |
Emitted when the no content state of the folder changes.
◆ numUnreadMsgsChanged
void FolderStorage::numUnreadMsgsChanged |
( |
KMFolder * |
| ) |
|
|
signal |
Emitted when number of unread messages has changed.
◆ open()
virtual int FolderStorage::open |
( |
const char * |
owner | ) |
|
|
pure virtual |
Open folder for access.
open() and close() use reference counting. Returns zero on success and an error code equal to the c-library fopen call otherwise (errno). - See also
- KMFolderOpener
◆ operator[]() [1/2]
virtual KMMsgBase * FolderStorage::operator[] |
( |
int |
idx | ) |
|
|
inlinevirtual |
Same as getMsgBase(int).
This time non-const.
Definition at line 179 of file folderstorage.h.
◆ operator[]() [2/2]
virtual const KMMsgBase * FolderStorage::operator[] |
( |
int |
idx | ) |
const |
|
inlinevirtual |
◆ quiet()
void FolderStorage::quiet |
( |
bool |
beQuiet | ) |
|
|
virtual |
If set to quiet the folder will not emit msgAdded(idx) signal.
This is necessary because adding the messages to the listview one by one as they come in ( as happens on msgAdded(idx) ) is very slow for large ( >10000 ) folders. For pop, where whole bodies are downloaded this is not an issue, but for imap, where we only download headers it becomes a bottleneck. We therefore set the folder quiet() and rebuild the listview completely once the complete folder has been checked.
Definition at line 205 of file folderstorage.cpp.
◆ rDict()
KMMsgDictREntry * FolderStorage::rDict |
( |
| ) |
const |
|
inlineprotected |
Returns the reverse-dictionary for this folder.
Definition at line 580 of file folderstorage.h.
◆ readConfig()
void FolderStorage::readConfig |
( |
void |
| ) |
|
|
virtual |
◆ readFolderIdsFile()
void FolderStorage::readFolderIdsFile |
( |
| ) |
|
|
protected |
Read the on-disk cache of serial numbers of messages in this store and fill those into the global message dict, such that the messages we hold can be looked up there.
Definition at line 976 of file folderstorage.cpp.
◆ readIndex()
virtual bool FolderStorage::readIndex |
( |
| ) |
|
|
protectedpure virtual |
Read index file and fill the message-info list mMsgList.
Implemented in KMFolderIndex.
◆ readMsg()
virtual KMMessage * FolderStorage::readMsg |
( |
int |
idx | ) |
|
|
protectedpure virtual |
Load message from file and store it at given index.
Returns 0 on failure.
◆ readOnlyChanged
void FolderStorage::readOnlyChanged |
( |
KMFolder * |
| ) |
|
|
signal |
Emitted when the readonly status of the folder changes.
◆ readTemporaryMsg()
KMMessage * FolderStorage::readTemporaryMsg |
( |
int |
idx | ) |
|
|
virtual |
Load message from file and do NOT store it, only return it.
This is equivalent to, but faster than, getMsg+unGetMsg WARNING: the caller has to delete the returned value!
Definition at line 527 of file folderstorage.cpp.
◆ reallyAddCopyOfMsg
void FolderStorage::reallyAddCopyOfMsg |
( |
KMMessage * |
aMsg | ) |
|
|
virtualslot |
Add a copy of the message to the folder after it has been retrieved from an IMAP server.
Definition at line 344 of file folderstorage.cpp.
◆ reallyAddMsg
void FolderStorage::reallyAddMsg |
( |
KMMessage * |
aMsg | ) |
|
|
virtualslot |
Add the message to the folder after it has been retrieved from an IMAP server.
Definition at line 323 of file folderstorage.cpp.
◆ registerWithMessageDict()
void FolderStorage::registerWithMessageDict |
( |
| ) |
|
Triggers registration with the message dict, which will cause the dict to ask the FolderStorage to fill itself into it.
Definition at line 964 of file folderstorage.cpp.
◆ remove()
void FolderStorage::remove |
( |
| ) |
|
|
virtual |
Removes the folder physically from disk and empties the contents of the folder in memory.
Note that the folder is closed during this process, whether there are others using it or not. - See also
- KMFolder::removeContents
Definition at line 755 of file folderstorage.cpp.
◆ removeContents()
virtual int FolderStorage::removeContents |
( |
| ) |
|
|
protectedpure virtual |
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.
◆ removed
void FolderStorage::removed |
( |
KMFolder * |
, |
|
|
bool |
|
|
) |
| |
|
signal |
Emitted when a folder was removed.
◆ removeJob
void FolderStorage::removeJob |
( |
TQObject * |
job | ) |
|
|
protectedvirtualslot |
◆ removeJobs()
void FolderStorage::removeJobs |
( |
| ) |
|
◆ removeMsg() [1/3]
void FolderStorage::removeMsg |
( |
const TQPtrList< KMMessage > & |
msgList, |
|
|
bool |
imapQuiet = false |
|
) |
| |
|
virtual |
◆ removeMsg() [2/3]
void FolderStorage::removeMsg |
( |
const TQPtrList< KMMsgBase > & |
msgList, |
|
|
bool |
imapQuiet = false |
|
) |
| |
|
virtual |
◆ removeMsg() [3/3]
void FolderStorage::removeMsg |
( |
int |
i, |
|
|
bool |
imapQuiet = false |
|
) |
| |
|
virtual |
Remove (first occurrence of) given message from the folder.
Definition at line 380 of file folderstorage.cpp.
◆ rename()
int FolderStorage::rename |
( |
const TQString & |
newName, |
|
|
KMFolderDir * |
aParent = 0 |
|
) |
| |
|
virtual |
Physically rename the folder.
Returns zero on success and an errno on failure.
Definition at line 665 of file folderstorage.cpp.
◆ replaceMsgSerNum()
void FolderStorage::replaceMsgSerNum |
( |
unsigned long |
sernum, |
|
|
KMMsgBase * |
msg, |
|
|
int |
idx |
|
) |
| |
|
protected |
Replaces the serial number for the message msg at index idx with sernum .
Definition at line 1025 of file folderstorage.cpp.
◆ search() [1/2]
◆ search() [2/2]
void FolderStorage::search |
( |
const KMSearchPattern * |
pattern, |
|
|
TQ_UINT32 |
serNum |
|
) |
| |
|
virtual |
◆ searchDone
Emitted when a search for a single message is completed The serial number and a bool matching yes/no is included.
◆ searchResult
void FolderStorage::searchResult |
( |
KMFolder * |
, |
|
|
TQValueList< TQ_UINT32 > |
, |
|
|
const KMSearchPattern * |
, |
|
|
bool |
complete |
|
) |
| |
|
signal |
Emitted when a search delivers results The matching serial numbers are included If complete is true the search is done.
◆ setAutoCreateIndex()
void FolderStorage::setAutoCreateIndex |
( |
bool |
autoIndex | ) |
|
|
virtual |
Allow/disallow automatic creation of a table of contents file.
Default is TRUE.
Definition at line 151 of file folderstorage.cpp.
◆ setContentsType()
void FolderStorage::setContentsType |
( |
KMail::FolderContentsType |
type, |
|
|
bool |
quiet = false |
|
) |
| |
|
virtual |
Set the type of contents held in this folder (mail, calendar, etc.)
Definition at line 1116 of file folderstorage.cpp.
◆ setDirty()
void FolderStorage::setDirty |
( |
bool |
f | ) |
|
◆ setHasChildren()
virtual void FolderStorage::setHasChildren |
( |
ChildrenState |
state | ) |
|
|
inlinevirtual |
◆ setNeedsCompacting()
virtual void FolderStorage::setNeedsCompacting |
( |
bool |
f | ) |
|
|
inlinevirtual |
◆ setNoChildren()
void FolderStorage::setNoChildren |
( |
bool |
aNoChildren | ) |
|
|
virtual |
◆ setNoContent()
void FolderStorage::setNoContent |
( |
bool |
aNoContent | ) |
|
|
virtual |
◆ setRDict()
void FolderStorage::setRDict |
( |
KMMsgDictREntry * |
rentry | ) |
const |
|
protected |
Sets the reverse-dictionary for this folder.
const, because the mRDict is mutable, since it is not part of the (conceptually) const-relevant state of the object.
Definition at line 1031 of file folderstorage.cpp.
◆ setStatus() [1/2]
void FolderStorage::setStatus |
( |
int |
idx, |
|
|
KMMsgStatus |
status, |
|
|
bool |
toggle = false |
|
) |
| |
|
virtual |
◆ setStatus() [2/2]
void FolderStorage::setStatus |
( |
TQValueList< int > & |
ids, |
|
|
KMMsgStatus |
status, |
|
|
bool |
toggle = false |
|
) |
| |
|
virtual |
Set the status of the message(s) in the TQValueList ids to status .
Definition at line 1056 of file folderstorage.cpp.
◆ slotEmitChangedTimer
void FolderStorage::slotEmitChangedTimer |
( |
| ) |
|
|
slot |
◆ slotProcessNextSearchBatch
void FolderStorage::slotProcessNextSearchBatch |
( |
| ) |
|
|
protectedslot |
◆ statusMsg
void FolderStorage::statusMsg |
( |
const TQString & |
| ) |
|
|
signal |
Emmited to display a message somewhere in a status line.
◆ sync()
virtual void FolderStorage::sync |
( |
| ) |
|
|
pure virtual |
◆ syncStateChanged
void FolderStorage::syncStateChanged |
( |
| ) |
|
|
signal |
Emiitted when the sync state, i.e.
mailCheckInProgress(), changes. Currently only supported for disconnected IMAP.
◆ take() [1/2]
Detach message from this folder.
Usable to call addMsg() afterwards. Loads the message if it is not loaded up to now.
Definition at line 423 of file folderstorage.cpp.
◆ take() [2/2]
void FolderStorage::take |
( |
TQPtrList< KMMessage > |
msgList | ) |
|
|
virtual |
◆ touchFolderIdsFile()
int FolderStorage::touchFolderIdsFile |
( |
| ) |
|
|
protected |
◆ trashFolder()
virtual KMFolder * FolderStorage::trashFolder |
( |
| ) |
const |
|
inlinevirtual |
If this folder has a special trash folder set, return it.
Otherwise return 0.
Definition at line 387 of file folderstorage.h.
◆ tryReleasingFolder()
virtual void FolderStorage::tryReleasingFolder |
( |
KMFolder * |
| ) |
|
|
inlinevirtual |
Try releasing folder if possible, something is attempting an exclusive access to it.
Currently used for KMFolderSearch and the background tasks like expiry.
Definition at line 273 of file folderstorage.h.
◆ unGetMsg()
KMMsgInfo * FolderStorage::unGetMsg |
( |
int |
idx | ) |
|
|
virtual |
◆ updateChildrenState()
void FolderStorage::updateChildrenState |
( |
| ) |
|
|
virtual |
◆ updateIndex
virtual int FolderStorage::updateIndex |
( |
| ) |
|
|
pure virtualslot |
Incrementally update the index if possible else call writeIndex.
◆ writeConfig()
void FolderStorage::writeConfig |
( |
| ) |
|
|
virtual |
◆ writeFolderIdsFile()
int FolderStorage::writeFolderIdsFile |
( |
| ) |
const |
|
protected |
◆ writeIndex()
virtual int FolderStorage::writeIndex |
( |
bool |
createEmptyIndex = false | ) |
|
|
pure virtual |
Write index to index-file.
Returns 0 on success and errno error on failure.
Implemented in KMFolderIndex.
◆ KMMsgDict
◆ mAutoCreateIndex
bool FolderStorage::mAutoCreateIndex |
|
protected |
is the automatic creation of a index file allowed ?
Definition at line 615 of file folderstorage.h.
◆ mChanged
bool FolderStorage::mChanged |
|
protected |
◆ mCompactable
bool FolderStorage::mCompactable |
|
protected |
false if index file is out of sync with mbox file
Definition at line 632 of file folderstorage.h.
◆ mContentsType
KMail::FolderContentsType FolderStorage::mContentsType |
|
protected |
◆ mConvertToUtf8
bool FolderStorage::mConvertToUtf8 |
|
protected |
◆ mCurrentSearchedMsg
int FolderStorage::mCurrentSearchedMsg |
|
protected |
◆ mDirty
bool FolderStorage::mDirty |
|
protected |
◆ mDirtyTimer
TQTimer* FolderStorage::mDirtyTimer |
|
protected |
◆ mEmitChangedTimer
TQTimer* FolderStorage::mEmitChangedTimer |
|
protected |
◆ mExportsSernums
bool FolderStorage::mExportsSernums |
|
protected |
Has this storage exported its serial numbers to the global message dict for lookup?
Definition at line 618 of file folderstorage.h.
◆ mFilesLocked
bool FolderStorage::mFilesLocked |
|
protected |
TRUE if the files of the folder are locked (writable)
Definition at line 622 of file folderstorage.h.
◆ mFolder
◆ mGuessedUnreadMsgs
int FolderStorage::mGuessedUnreadMsgs |
|
protected |
◆ mHasChildren
ChildrenState FolderStorage::mHasChildren |
|
protected |
◆ mJobList
TQPtrList<FolderJob> FolderStorage::mJobList |
|
mutableprotected |
◆ mNoChildren
bool FolderStorage::mNoChildren |
|
protected |
◆ mNoContent
bool FolderStorage::mNoContent |
|
protected |
◆ mOpenCount
int FolderStorage::mOpenCount |
|
protected |
◆ mQuiet
int FolderStorage::mQuiet |
|
protected |
◆ mRDict
KMMsgDictREntry* FolderStorage::mRDict |
|
mutableprotected |
Points at the reverse dictionary for this folder.
Definition at line 638 of file folderstorage.h.
◆ mSearchPattern
◆ mSize
TQ_INT64 FolderStorage::mSize |
|
protected |
◆ mTotalMsgs
int FolderStorage::mTotalMsgs |
|
protected |
◆ mUnreadMsgs
int FolderStorage::mUnreadMsgs |
|
protected |
number of unread messages, -1 if not yet set
Definition at line 625 of file folderstorage.h.
◆ mWriteConfigEnabled
bool FolderStorage::mWriteConfigEnabled |
|
protected |
◆ needsCompact
bool FolderStorage::needsCompact |
|
protected |
sven: true if on destruct folder needs to be compacted.
Definition at line 630 of file folderstorage.h.
The documentation for this class was generated from the following files:
|