kmail
listjob.hGo to the documentation of this file.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 public:
00068 ListJob( ImapAccountBase* account, ImapAccountBase::ListType type,
00069 FolderStorage* storage = 0, const QString& path = QString::null,
00070 bool complete = false, KPIM::ProgressItem* item = 0 );
00071
00072 virtual ~ListJob();
00073
00079 void setHonorLocalSubscription( bool value );
00080
00086 bool honorLocalSubscription() const;
00087
00088 virtual void execute();
00089
00091 void setPath( const QString& path ) { mPath = path; }
00092
00094 void setStorage( FolderStorage* st ) { mStorage = st; }
00095
00097 void setComplete( bool complete ) { mComplete = complete; }
00098
00100 void setParentProgressItem( KPIM::ProgressItem* it ) {
00101 mParentProgressItem = it; }
00102
00104 void setNamespace( const QString& ns ) { mNamespace = ns; }
00105
00106 protected slots:
00111 void slotListResult( KIO::Job* job );
00112
00116 void slotListEntries( KIO::Job* job, const KIO::UDSEntryList& uds );
00117
00121 void slotConnectionResult( int errorCode, const QString& errorMsg );
00122
00123 signals:
00127 void receivedFolders( const QStringList&, const QStringList&,
00128 const QStringList&, const QStringList&, const ImapAccountBase::jobData& );
00129
00130 protected:
00131 FolderStorage* mStorage;
00132 ImapAccountBase* mAccount;
00133 ImapAccountBase::ListType mType;
00134 bool mComplete;
00135 bool mHonorLocalSubscription;
00136 QString mPath;
00137 QStringList mSubfolderNames, mSubfolderPaths,
00138 mSubfolderMimeTypes, mSubfolderAttributes;
00139 KPIM::ProgressItem* mParentProgressItem;
00140 QString mNamespace;
00141 };
00142
00143 }
00144
00145 #endif
00146
|