mailtransport
MailTransport::ServerTest Class Reference
This class can be used to test certain server to see if they support stuff. More...
#include <servertest.h>
Inherits QWidget.
Public Types | |
enum | Capability { Pipelining, Top, UIDL } |
Signals | |
void | finished (QList< int >) |
Public Member Functions | |
QList< Capability > | capabilities () const |
QString | fakeHostname () |
QList< int > | normalProtocols () |
int | port (Transport::EnumEncryption::type encryptionMode) |
QProgressBar * | progressBar () |
QString | protocol () |
QList< int > | secureProtocols () |
QString | server () |
ServerTest (QWidget *parent=0) | |
void | setFakeHostname (const QString &fakeHostname) |
void | setPort (Transport::EnumEncryption::type encryptionMode, uint port) |
void | setProgressBar (QProgressBar *pb) |
void | setProtocol (const QString &protocol) |
void | setServer (const QString &server) |
void | start () |
QList< int > | tlsProtocols () |
~ServerTest () | |
Properties | |
QProgressBar | progressBar |
QString | protocol |
QString | server |
Detailed Description
This class can be used to test certain server to see if they support stuff.
Definition at line 42 of file servertest.h.
Member Enumeration Documentation
This enumeration has the special capabilities a server might support.
This covers only capabilities not related to authentication.
- Since:
- 4.1
- Enumerator:
-
Pipelining POP3 only. The server supports pipeplining of commands. Top POP3 only. The server supports fetching only the headers. UIDL POP3 only. The server has support for unique identifiers.
Definition at line 56 of file servertest.h.
Constructor & Destructor Documentation
ServerTest::ServerTest | ( | QWidget * | parent = 0 |
) |
ServerTest::~ServerTest | ( | ) |
Member Function Documentation
QList< ServerTest::Capability > ServerTest::capabilities | ( | ) | const |
Get the special capabilities of the server.
Call this only after the finished() signals has been sent.
- Returns:
- the list of special capabilities of the server.
- Since:
- 4.1
Definition at line 594 of file servertest.cpp.
QString ServerTest::fakeHostname | ( | ) |
- Returns:
- the fake hostname, as set before with setFakeHostname
Definition at line 526 of file servertest.cpp.
void MailTransport::ServerTest::finished | ( | QList< int > | ) | [signal] |
This will be emitted when the test is done.
It will contain the values from the enum EnumEncryption which are possible.
QList< int > ServerTest::normalProtocols | ( | ) |
Get the protocols for the normal connections.
. Call this only after the finished() signals has been sent.
- Returns:
- an enum of the type Transport::EnumAuthenticationType
Definition at line 579 of file servertest.cpp.
int ServerTest::port | ( | Transport::EnumEncryption::type | encryptionMode | ) |
- Parameters:
-
encryptionMode the port of this encryption mode is returned. Can only be 'None' and 'SSL'
- Since:
- 4.1
Definition at line 563 of file servertest.cpp.
QProgressBar* MailTransport::ServerTest::progressBar | ( | ) |
returns the used progressBar
QString MailTransport::ServerTest::protocol | ( | ) |
returns the protocol
QList< int > ServerTest::secureProtocols | ( | ) |
Get the protocols for the SSL connections.
Call this only after the finished() signals has been sent.
- Returns:
- an enum of the type Transport::EnumAuthenticationType
Definition at line 589 of file servertest.cpp.
QString MailTransport::ServerTest::server | ( | ) |
Get the server to test.
void ServerTest::setFakeHostname | ( | const QString & | fakeHostname | ) |
Sets a fake hostname for the test.
This is currently only used when testing a SMTP server; there, the command for testing the capabilities (called EHLO) needs to have the hostname of the client included. The user can however choose to send a fake hostname instead of the local hostname to work around various problems. This fake hostname needs to be set here.
- Parameters:
-
fakeHostname the fake hostname to send
Definition at line 521 of file servertest.cpp.
void ServerTest::setPort | ( | Transport::EnumEncryption::type | encryptionMode, | |
uint | port | |||
) |
Set a custom port to use.
Each encryption mode (no encryption or SSL) has a different port. TLS uses the same port as no encryption, because TLS is invoked during a normal session.
If this function is never called, the default port is used, which is: (normal first, then SSL) SMTP: 25, 465 POP: 110, 995 IMAP: 143, 993
- Parameters:
-
encryptionMode the port will only be used in this encryption mode. Valid values for this are only 'None' and 'SSL'. port the port to use
- Since:
- 4.1
Definition at line 536 of file servertest.cpp.
void ServerTest::setProgressBar | ( | QProgressBar * | pb | ) |
Makes pb
the progressbar to use.
This class will call show() and hide() and will count down. It does not take ownership of the progressbar.
Definition at line 543 of file servertest.cpp.
void ServerTest::setProtocol | ( | const QString & | protocol | ) |
Set protocol
the protocol to test, currently supported are "smtp", "pop" and "imap".
Definition at line 548 of file servertest.cpp.
void ServerTest::setServer | ( | const QString & | server | ) |
void ServerTest::start | ( | ) |
QList< int > ServerTest::tlsProtocols | ( | ) |
Get the protocols for the TLS connections.
Call this only after the finished() signals has been sent.
- Returns:
- an enum of the type Transport::EnumAuthenticationType
- Since:
- 4.1
Definition at line 584 of file servertest.cpp.
The documentation for this class was generated from the following files: