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