#include <copyfolderjob.h>

Inherits KMail::FolderJob.

Signals

void folderCopyComplete (bool success)
 

Public Member Functions

 CopyFolderJob (FolderStorage *const storage, KMFolderDir *const newParent=0)
 
virtual void execute ()
 
KMFoldertargetFolder () const
 

Protected Slots

bool createTargetDir ()
 
void copyMessagesToTargetDir ()
 
void slotCopyCompleted (KMCommand *command)
 
void slotCopyNextChild (bool success=true)
 
void rollback ()
 
void folderCreationDone (const TQString &name, bool success)
 

Protected Attributes

TQGuardedPtr< FolderStorage > const mStorage
 
KMFolderDir *const mNewParent
 
TQGuardedPtr< KMFoldermNewFolder
 
TQPtrListIterator< KMFolderNode > mChildFolderNodeIterator
 
KMFoldermNextChildFolder
 

Detailed Description

Copy a hierarchy of folders somewhere else in the folder tree.

Currently online imap folders are not supported as target folders, and the same is true for search folders where it does not make much sense for them to be target folders.

Definition at line 50 of file copyfolderjob.h.

Constructor & Destructor Documentation

◆ CopyFolderJob()

CopyFolderJob::CopyFolderJob ( FolderStorage *const  storage,
KMFolderDir *const  newParent = 0 
)

Create a new job.

Parameters
storageof the folder that should be copied
newParentthe target parent folder

Definition at line 47 of file copyfolderjob.cpp.

Member Function Documentation

◆ copyMessagesToTargetDir

void CopyFolderJob::copyMessagesToTargetDir ( )
protectedslot

Copy all messages from the original folder to mNewFolder.

Definition at line 79 of file copyfolderjob.cpp.

◆ createTargetDir

bool CopyFolderJob::createTargetDir ( )
protectedslot

Create the target directory under the new parent.

Returns success or failure.

Definition at line 171 of file copyfolderjob.cpp.

◆ folderCopyComplete

void KMail::CopyFolderJob::folderCopyComplete ( bool  success)
signal

Emitted when the job is done, check the success bool.

◆ folderCreationDone

void CopyFolderJob::folderCreationDone ( const TQString &  name,
bool  success 
)
protectedslot

Called when the online IMAP folder creation finished.

Definition at line 271 of file copyfolderjob.cpp.

◆ rollback

void CopyFolderJob::rollback ( )
protectedslot

Called when one of the operations of the foldre itself or one of it's child folders failed and the already created target folder needs to be removed again.

Definition at line 241 of file copyfolderjob.cpp.

◆ slotCopyCompleted

void CopyFolderJob::slotCopyCompleted ( KMCommand *  command)
protectedslot

Called when the CopyCommand has either succesfully completed copying the contents of our folder to the new location or failed.

Definition at line 104 of file copyfolderjob.cpp.

◆ slotCopyNextChild

void CopyFolderJob::slotCopyNextChild ( bool  success = true)
protectedslot

Called when the previous sibling's copy operation completed.

Parameters
successindicates whether the last copy was successful.

Definition at line 125 of file copyfolderjob.cpp.

◆ targetFolder()

KMFolder* KMail::CopyFolderJob::targetFolder ( ) const
inline

Returns the newly created target folder.

Definition at line 69 of file copyfolderjob.h.


The documentation for this class was generated from the following files: