00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef LISTJOB_H
00029 #define LISTJOB_H
00030
00031 #include "folderjob.h"
00032 #include "imapaccountbase.h"
00033
00034 class KMFolderImap;
00035 class KMFolderCachedImap;
00036 class KMAcctImap;
00037 class KMAcctCachedImap;
00038 class FolderStorage;
00039 class KURL;
00040
00041 namespace KIO {
00042 class Job;
00043 }
00044
00045 namespace KPIM {
00046 class ProgressItem;
00047 }
00048
00049 namespace KMail {
00050
00054 class ListJob : public FolderJob
00055 {
00056 Q_OBJECT
00057 TQ_OBJECT
00058 public:
00069 ListJob( ImapAccountBase* account, ImapAccountBase::ListType type,
00070 FolderStorage* storage = 0, const TQString& path = TQString(),
00071 bool complete = false, KPIM::ProgressItem* item = 0 );
00072
00073 virtual ~ListJob();
00074
00080 void setHonorLocalSubscription( bool value );
00081
00087 bool honorLocalSubscription() const;
00088
00089 virtual void execute();
00090
00092 void setPath( const TQString& path ) { mPath = path; }
00093
00095 void setStorage( FolderStorage* st ) { mStorage = st; }
00096
00098 void setComplete( bool complete ) { mComplete = complete; }
00099
00101 void setParentProgressItem( KPIM::ProgressItem* it ) {
00102 mParentProgressItem = it; }
00103
00105 void setNamespace( const TQString& ns ) { mNamespace = ns; }
00106
00107 protected slots:
00112 void slotListResult( KIO::Job* job );
00113
00117 void slotListEntries( KIO::Job* job, const KIO::UDSEntryList& uds );
00118
00122 void slotConnectionResult( int errorCode, const TQString& errorMsg );
00123
00124 signals:
00128 void receivedFolders( const TQStringList&, const TQStringList&,
00129 const TQStringList&, const TQStringList&, const ImapAccountBase::jobData& );
00130
00131 protected:
00132 FolderStorage* mStorage;
00133 ImapAccountBase* mAccount;
00134 ImapAccountBase::ListType mType;
00135 bool mComplete;
00136 bool mHonorLocalSubscription;
00137 TQString mPath;
00138 TQStringList mSubfolderNames, mSubfolderPaths,
00139 mSubfolderMimeTypes, mSubfolderAttributes;
00140 KPIM::ProgressItem* mParentProgressItem;
00141 TQString mNamespace;
00142 };
00143
00144 }
00145
00146 #endif
00147