exchangedownload.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KDEPIM_EXCHANGE_DOWNLOAD_H
00021 #define KDEPIM_EXCHANGE_DOWNLOAD_H
00022
00023 #include <qstring.h>
00024 #include <qptrlist.h>
00025 #include <qdatetime.h>
00026 #include <qdom.h>
00027 #include <qmap.h>
00028 #include <kio/job.h>
00029
00030 #include <libkcal/calendar.h>
00031 #include <libkcal/icalformat.h>
00032
00033 namespace KPIM {
00034
00035 class ExchangeProgress;
00036 class ExchangeAccount;
00037
00038 class ExchangeDownload : public QObject {
00039 Q_OBJECT
00040 public:
00041 ExchangeDownload( ExchangeAccount* account, QWidget* window=0 );
00042 ~ExchangeDownload();
00043
00044 void download( KCal::Calendar* calendar,
00045 const QDate& start, const QDate& end, bool showProgress );
00046 void download( const QDate& start, const QDate& end, bool showProgress );
00047
00048 signals:
00049 void startDownload();
00050 void finishDownload();
00051
00052 void gotEvent( KCal::Event* event, const KURL& url );
00053 void finished( ExchangeDownload*, int result, const QString& moreInfo );
00054 void finished( ExchangeDownload*, int result, const QString& moreInfo, QPtrList<KCal::Event>& events );
00055
00056 private slots:
00057 void slotSearchResult( KIO::Job *job );
00058 void slotMasterResult( KIO::Job* job );
00059 void slotPropFindResult( KIO::Job * );
00060
00061 private:
00062 void handleAppointments( const QDomDocument &, bool recurrence );
00063 void readAppointment( const KURL& url );
00064 void handleRecurrence( QString uid );
00065 void finishUp( int result, const QString& moreInfo=QString::null );
00066 void finishUp( int result, KIO::Job* job );
00067
00068 void increaseDownloads();
00069 void decreaseDownloads();
00070
00071 QString dateSelectQuery( const QDate& start, const QDate& end );
00072
00073 KCal::Calendar *mCalendar;
00074 KCal::ICalFormat *mFormat;
00075 QPtrList<KCal::Event> *mEvents;
00076 ExchangeAccount *mAccount;
00077 ExchangeProgress *mProgress;
00078 int mDownloadsBusy;
00079 QDomDocument mResponse;
00080
00081 QMap<QString,int> m_uids;
00082
00083 QWidget* mWindow;
00084 };
00085
00086 }
00087
00088 #endif
00089
This file is part of the documentation for libkpimexchange Library Version 3.2.2.