kmail

copyfolderjob.h
1 
28 #ifndef COPYFOLDERJOB_H
29 #define COPYFOLDERJOB_H
30 
31 #include "folderjob.h"
32 
33 #include <tqguardedptr.h>
34 
35 class FolderStorage;
36 class KMFolderDir;
37 class KMFolder;
38 class KMCommand;
39 
40 class KMFolderNode;
41 
42 namespace KMail {
43 
50 class CopyFolderJob : public FolderJob
51 {
52  TQ_OBJECT
53 
54 public:
60  CopyFolderJob( FolderStorage* const storage, KMFolderDir* const newParent = 0 );
61 
62  virtual ~CopyFolderJob();
63 
64  virtual void execute();
65 
69  KMFolder* targetFolder() const { return mNewFolder; }
70 
71 protected slots:
72 
74  bool createTargetDir();
75 
78 
81  void slotCopyCompleted( KMCommand *command );
82 
85  void slotCopyNextChild( bool success = true );
86 
90  void rollback();
91 
95  void folderCreationDone( const TQString &name, bool success );
96 
97 signals:
99  void folderCopyComplete( bool success );
100 
101 protected:
102  TQGuardedPtr<FolderStorage> const mStorage;
103  KMFolderDir* const mNewParent;
104  TQGuardedPtr<KMFolder> mNewFolder;
105  TQPtrListIterator<KMFolderNode> mChildFolderNodeIterator;
106  KMFolder* mNextChildFolder;
107 };
108 
109 } // namespace KMail
110 
111 #endif /* COPYFOLDERJOB_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
Mail folder.
Definition: kmfolder.h:69
Copy a hierarchy of folders somewhere else in the folder tree.
Definition: copyfolderjob.h:51
void copyMessagesToTargetDir()
Copy all messages from the original folder to mNewFolder.
KMFolder * targetFolder() const
Returns the newly created target folder.
Definition: copyfolderjob.h:69
void folderCreationDone(const TQString &name, bool success)
Called when the online IMAP folder creation finished.
void rollback()
Called when one of the operations of the foldre itself or one of it's child folders failed and the al...
bool createTargetDir()
Create the target directory under the new parent.
void folderCopyComplete(bool success)
Emitted when the job is done, check the success bool.
void slotCopyCompleted(KMCommand *command)
Called when the CopyCommand has either succesfully completed copying the contents of our folder to th...
void slotCopyNextChild(bool success=true)
Called when the previous sibling's copy operation completed.
CopyFolderJob(FolderStorage *const storage, KMFolderDir *const newParent=0)
Create a new job.
folderdiaquotatab.h
Definition: aboutdata.cpp:40