mailtransport
servertest.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef MAILTRANSPORT_SERVERTEST_H
00022 #define MAILTRANSPORT_SERVERTEST_H
00023
00024 #include <mailtransport/mailtransport_export.h>
00025 #include <mailtransport/transport.h>
00026
00027 #include <QtGui/QWidget>
00028 #include <QtCore/QHash>
00029
00030 class QProgressBar;
00031
00032 namespace MailTransport
00033 {
00034
00035 class ServerTestPrivate;
00036
00042 class MAILTRANSPORT_EXPORT ServerTest : public QWidget
00043 {
00044 Q_OBJECT
00045 Q_PROPERTY( QString server READ server WRITE setServer )
00046 Q_PROPERTY( QString protocol READ protocol WRITE setProtocol )
00047 Q_PROPERTY( QProgressBar *progressBar READ progressBar WRITE setProgressBar )
00048
00049 public:
00050
00056 enum Capability {
00057 Pipelining,
00058 Top,
00059 UIDL
00060 };
00061
00066 ServerTest( QWidget *parent = 0 );
00067
00071 ~ServerTest();
00072
00076 void setServer( const QString &server );
00077
00081 QString server();
00082
00102 void setPort( Transport::EnumEncryption::type encryptionMode, uint port );
00103
00113 int port( Transport::EnumEncryption::type encryptionMode );
00114
00125 void setFakeHostname( const QString &fakeHostname );
00126
00130 QString fakeHostname();
00131
00137 void setProgressBar( QProgressBar *pb );
00138
00142 QProgressBar *progressBar();
00143
00148 void setProtocol( const QString &protocol );
00149
00153 QString protocol();
00154
00158 void start();
00159
00165 QList< int > normalProtocols();
00166
00173 QList< int > tlsProtocols();
00174
00180 QList< int > secureProtocols();
00181
00189 QList< Capability > capabilities() const;
00190
00191 Q_SIGNALS:
00196 void finished( QList< int > );
00197
00198 private:
00199 Q_DECLARE_PRIVATE( ServerTest )
00200 ServerTestPrivate *const d;
00201
00202 Q_PRIVATE_SLOT( d, void slotNormalPossible() )
00203 Q_PRIVATE_SLOT( d, void slotTlsDone() )
00204 Q_PRIVATE_SLOT( d, void slotSslPossible() )
00205 Q_PRIVATE_SLOT( d, void slotReadNormal( const QString &text ) )
00206 Q_PRIVATE_SLOT( d, void slotReadSecure( const QString &text ) )
00207 Q_PRIVATE_SLOT( d, void slotNormalNotPossible() )
00208 Q_PRIVATE_SLOT( d, void slotSslNotPossible() )
00209 Q_PRIVATE_SLOT( d, void slotUpdateProgress() )
00210 };
00211
00212 }
00213
00214 #endif // MAILTRANSPORT_SERVERTEST_H