exchangeaccount.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef EXCHANGE_ACCOUNT_H
00023 #define EXCHANGE_ACCOUNT_H
00024
00025 #include <qobject.h>
00026 #include <qstring.h>
00027
00028 #include <kurl.h>
00029 #include <kio/job.h>
00030
00031 namespace KPIM {
00032
00033 class ExchangeAccount : public QObject {
00034 Q_OBJECT
00035 public:
00036 ExchangeAccount( const QString& host, const QString& port, const QString& account,
00037 const QString& password, const QString& mailbox = QString::null );
00041 ExchangeAccount( const QString& group );
00042 ~ExchangeAccount();
00043
00044 void save( QString const& group );
00045 void load( QString const& group );
00046
00047 QString host() { return mHost; }
00048 QString port() { return mPort; }
00049 QString account() { return mAccount; }
00050 QString mailbox() { return mMailbox; }
00051 QString password() { return mPassword; }
00052
00053 void setHost( QString host ) { mHost = host; }
00054 void setPort( QString port ) { mPort = port; }
00055 void setAccount( QString account ) { mAccount = account; }
00056 void setMailbox( QString mailbox ) { mMailbox = mailbox; }
00057 void setPassword( QString password ) { mPassword = password; }
00058
00059 KURL baseURL();
00060 KURL calendarURL();
00061
00062
00063 static QString tryFindMailbox( const QString& host, const QString& port, const QString& user, const QString& password );
00064
00065
00066
00067 void authenticate();
00068 void authenticate( QWidget* window );
00069
00070 private:
00071 void authenticate( int windowId );
00072 void calcFolderURLs();
00073 static QString tryMailbox( const QString& _url, const QString& user, const QString& password );
00074
00075
00076 private slots:
00077 void slotFolderResult( KIO::Job * );
00078
00079 private:
00080 QString mHost;
00081 QString mPort;
00082 QString mAccount;
00083 QString mMailbox;
00084 QString mPassword;
00085
00086 KURL* mCalendarURL;
00087 };
00088
00089 }
00090
00091 #endif
00092
This file is part of the documentation for libkpimexchange Library Version 3.2.2.