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 <qdatetime.h>
00025 #include <qdom.h>
00026 #include <qmap.h>
00027 #include <kio/job.h>
00028
00029 #include <libkcal/calendar.h>
00030 #include <libkcal/icalformat.h>
00031
00032 namespace KPIM {
00033
00034 class ExchangeProgress;
00035 class ExchangeAccount;
00036
00037 class ExchangeDownload : public QObject {
00038 Q_OBJECT
00039 public:
00040 ExchangeDownload( ExchangeAccount* account, QWidget* window=0 );
00041 ~ExchangeDownload();
00042
00043 void download( KCal::Calendar* calendar,
00044 const QDate& start, const QDate& end, bool showProgress);
00045
00046 signals:
00047 void startDownload();
00048 void finishDownload();
00049
00050 void finished( ExchangeDownload*, int result, const QString& moreInfo );
00051
00052 private slots:
00053 void slotSearchResult( KIO::Job *job );
00054 void slotMasterResult( KIO::Job* job );
00055 void slotPropFindResult( KIO::Job * );
00056
00057 private:
00058 void handleAppointments( const QDomDocument &, bool recurrence );
00059 void readAppointment( const KURL& url );
00060 void handleRecurrence( QString uid );
00061 void finishUp( int result, const QString& moreInfo=QString::null );
00062 void finishUp( int result, KIO::Job* job );
00063
00064 void increaseDownloads();
00065 void decreaseDownloads();
00066
00067 QString dateSelectQuery( const QDate& start, const QDate& end );
00068
00069 KCal::Calendar *mCalendar;
00070 KCal::ICalFormat *mFormat;
00071 QPtrList<KCal::Event> mEvents;
00072 ExchangeAccount *mAccount;
00073 ExchangeProgress *mProgress;
00074 int mDownloadsBusy;
00075 QDomDocument mResponse;
00076
00077 QMap<QString,int> m_uids;
00078
00079 QWidget* mWindow;
00080 };
00081
00082 }
00083
00084 #endif
00085
This file is part of the documentation for kdelibs Version 3.1.4.