kmail

KMail::CopyFolderJob Class Reference

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

#include <copyfolderjob.h>

Inheritance diagram for KMail::CopyFolderJob:

List of all members.


Signals

void folderCopyComplete (bool success)

Public Member Functions

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

Protected Slots

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

Protected Attributes

QPtrListIterator< KMFolderNodemChildFolderNodeIterator
QGuardedPtr< KMFoldermNewFolder
KMFolderDir *const mNewParent
KMFoldermNextChildFolder
QGuardedPtr< FolderStorage > const mStorage

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 ( FolderStorage *const   storage,
KMFolderDir *const   newParent = 0 
)

Create a new job.

Parameters:
storage of the folder that should be copied
newParent the target parent folder

Definition at line 47 of file copyfolderjob.cpp.

CopyFolderJob::~CopyFolderJob (  )  [virtual]

Definition at line 56 of file copyfolderjob.cpp.


Member Function Documentation

void CopyFolderJob::copyMessagesToTargetDir (  )  [protected, slot]

Copy all messages from the original folder to mNewFolder.

Definition at line 79 of file copyfolderjob.cpp.

bool CopyFolderJob::createTargetDir (  )  [protected, slot]

Create the target directory under the new parent.

Returns success or failure.

Definition at line 171 of file copyfolderjob.cpp.

void CopyFolderJob::execute (  )  [virtual]

Has to be reimplemented.

It's called by the start() method. Should start the processing of the specified job function.

Implements KMail::FolderJob.

Definition at line 72 of file copyfolderjob.cpp.

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

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

void CopyFolderJob::folderCreationDone ( const QString name,
bool  success 
) [protected, slot]

Called when the online IMAP folder creation finished.

Definition at line 271 of file copyfolderjob.cpp.

void CopyFolderJob::rollback (  )  [protected, slot]

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.

void CopyFolderJob::slotCopyCompleted ( KMCommand command  )  [protected, slot]

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.

void CopyFolderJob::slotCopyNextChild ( bool  success = true  )  [protected, slot]

Called when the previous sibling's copy operation completed.

Parameters:
success indicates whether the last copy was successful.

Definition at line 125 of file copyfolderjob.cpp.

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

Returns the newly created target folder.

Definition at line 68 of file copyfolderjob.h.


Member Data Documentation

Definition at line 103 of file copyfolderjob.h.

Definition at line 102 of file copyfolderjob.h.

Definition at line 105 of file copyfolderjob.h.

Definition at line 101 of file copyfolderjob.h.


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