mailtransport
servertest.h
00001 /* 00002 Copyright (C) 2007 KovoKs <info@kovoks.nl> 00003 Copyright (c) 2008 Thomas McGuire <thomas.mcguire@gmx.net> 00004 00005 This library is free software; you can redistribute it and/or modify it 00006 under the terms of the GNU Library General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or (at your 00008 option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, but WITHOUT 00011 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to the 00017 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00018 02110-1301, USA. 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 00067 ServerTest( QWidget *parent = 0 ); 00068 00072 ~ServerTest(); 00073 00077 void setServer( const QString &server ); 00078 00082 QString server(); 00083 00103 void setPort( Transport::EnumEncryption::type encryptionMode, uint port ); 00104 00114 int port( Transport::EnumEncryption::type encryptionMode ); 00115 00126 void setFakeHostname( const QString &fakeHostname ); 00127 00131 QString fakeHostname(); 00132 00138 void setProgressBar( QProgressBar *pb ); 00139 00143 QProgressBar *progressBar(); 00144 00149 void setProtocol( const QString &protocol ); 00150 00154 QString protocol(); 00155 00159 void start(); 00160 00166 QList<int> normalProtocols(); 00167 00172 bool isNormalPossible(); 00173 00180 QList<int> tlsProtocols(); 00181 00187 QList<int> secureProtocols(); 00188 00193 bool isSecurePossible(); 00194 00202 QList<Capability> capabilities() const; 00203 00204 Q_SIGNALS: 00209 void finished( QList<int> ); 00210 00211 private: 00212 Q_DECLARE_PRIVATE( ServerTest ) 00213 ServerTestPrivate *const d; 00214 00215 Q_PRIVATE_SLOT( d, void slotNormalPossible() ) 00216 Q_PRIVATE_SLOT( d, void slotTlsDone() ) 00217 Q_PRIVATE_SLOT( d, void slotSslPossible() ) 00218 Q_PRIVATE_SLOT( d, void slotReadNormal( const QString &text ) ) 00219 Q_PRIVATE_SLOT( d, void slotReadSecure( const QString &text ) ) 00220 Q_PRIVATE_SLOT( d, void slotNormalNotPossible() ) 00221 Q_PRIVATE_SLOT( d, void slotSslNotPossible() ) 00222 Q_PRIVATE_SLOT( d, void slotUpdateProgress() ) 00223 }; 00224 00225 } // namespace MailTransport 00226 00227 #endif // MAILTRANSPORT_SERVERTEST_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 04:49:32 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 04:49:32 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.