diff options
Diffstat (limited to 'kimap/tests/kimaptest/fakeserver.h')
-rw-r--r-- | kimap/tests/kimaptest/fakeserver.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/kimap/tests/kimaptest/fakeserver.h b/kimap/tests/kimaptest/fakeserver.h index 22b970c..add3626 100644 --- a/kimap/tests/kimaptest/fakeserver.h +++ b/kimap/tests/kimaptest/fakeserver.h @@ -19,7 +19,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #ifndef FAKESERVER_H #define FAKESERVER_H @@ -28,6 +27,7 @@ #include <QTcpServer> #include <QThread> #include <QMutex> +#include <QSsl> namespace KIMAP { @@ -130,6 +130,11 @@ public: ~FakeServer(); /** + * Sets the encryption mode used by the server socket. + */ + void setEncrypted( QSsl::SslProtocol protocol ); + + /** * Starts the server and waits for it to be ready * * You should use this instead of start() to avoid race conditions. @@ -202,6 +207,13 @@ public: */ bool isAllScenarioDone() const; +protected: + /** + * Whether the received content is the same as the expected. + * Use QCOMPARE, if creating subclasses. + */ + virtual void compareReceived(const QByteArray& received, const QByteArray& expected) const; + private Q_SLOTS: void newConnection(); void dataAvailable(); @@ -216,7 +228,9 @@ private: mutable QMutex m_mutex; QList<QTcpSocket*> m_clientSockets; QList<KIMAP::ImapStreamParser*> m_clientParsers; + bool m_encrypted; + bool m_starttls; + QSsl::SslProtocol m_sslProtocol; }; #endif - |