• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

mailtransport

  • MailTransport
  • ServerTest
Public Types | Signals | Public Member Functions | Properties | List of all members
MailTransport::ServerTest Class Reference

#include <servertest.h>

Inherits QWidget.

Public Types

enum  Capability { Pipelining , Top , UIDL }
 

Signals

void finished (QList< int >)
 

Public Member Functions

 ServerTest (QWidget *parent=0)
 
 ~ServerTest ()
 
QList< Capability > capabilities () const
 
QString fakeHostname ()
 
bool isNormalPossible ()
 
bool isSecurePossible ()
 
QList< int > normalProtocols ()
 
int port (Transport::EnumEncryption::type encryptionMode)
 
QProgressBar * progressBar ()
 
QString protocol ()
 
QList< int > secureProtocols ()
 
QString server ()
 
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 ()
 

Properties

QProgressBar * progressBar
 
QString protocol
 
QString server
 

Detailed Description

This class can be used to test certain server to see if they support stuff.

Author
Tom Albers tomal.nosp@m.bers.nosp@m.@kde..nosp@m.nl

Definition at line 41 of file servertest.h.

Member Enumeration Documentation

◆ Capability

enum MailTransport::ServerTest::Capability

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 55 of file servertest.h.

Constructor & Destructor Documentation

◆ ServerTest()

ServerTest::ServerTest ( QWidget * parent = 0)

Creates a new server test.

Parameters
parentThe parent widget.

Definition at line 447 of file servertest.cpp.

◆ ~ServerTest()

ServerTest::~ServerTest ( )

Destroys the server test.

Definition at line 462 of file servertest.cpp.

Member Function Documentation

◆ capabilities()

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 615 of file servertest.cpp.

◆ fakeHostname()

QString ServerTest::fakeHostname ( )
Returns
the fake hostname, as set before with setFakeHostname

Definition at line 537 of file servertest.cpp.

◆ finished

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.

◆ isNormalPossible()

bool ServerTest::isNormalPossible ( )

tells you if the normal server is available

Since
4.5

Definition at line 595 of file servertest.cpp.

◆ isSecurePossible()

bool ServerTest::isSecurePossible ( )

tells you if the ssl server is available

Since
4.5

Definition at line 610 of file servertest.cpp.

◆ normalProtocols()

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 590 of file servertest.cpp.

◆ port()

int ServerTest::port ( Transport::EnumEncryption::type encryptionMode)
Parameters
encryptionModethe port of this encryption mode is returned. Can only be 'None' and 'SSL'
Returns
the port set by setPort or -1 if setPort() was never called for this encryption mode.
Since
4.1

Definition at line 574 of file servertest.cpp.

◆ progressBar()

QProgressBar * MailTransport::ServerTest::progressBar ( )

Returns the used progress bar.

◆ protocol()

QString MailTransport::ServerTest::protocol ( )

Returns the protocol.

◆ secureProtocols()

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 605 of file servertest.cpp.

◆ server()

QString MailTransport::ServerTest::server ( )

Returns the server to test.

◆ setFakeHostname()

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
fakeHostnamethe fake hostname to send

Definition at line 532 of file servertest.cpp.

◆ setPort()

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
encryptionModethe port will only be used in this encryption mode. Valid values for this are only 'None' and 'SSL'.
portthe port to use
Since
4.1

Definition at line 547 of file servertest.cpp.

◆ setProgressBar()

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 554 of file servertest.cpp.

◆ setProtocol()

void ServerTest::setProtocol ( const QString & protocol)

Sets protocol the protocol to test, currently supported are "smtp", "pop" and "imap".

Definition at line 559 of file servertest.cpp.

◆ setServer()

void ServerTest::setServer ( const QString & server)

Sets the server to test.

Definition at line 542 of file servertest.cpp.

◆ start()

void ServerTest::start ( )

Starts the test.

Will emit finished() when done.

Definition at line 467 of file servertest.cpp.

◆ tlsProtocols()

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 600 of file servertest.cpp.

Property Documentation

◆ progressBar

QProgressBar * ServerTest::progressBar
readwrite

Definition at line 46 of file servertest.h.

◆ protocol

QString ServerTest::protocol
readwrite

Definition at line 45 of file servertest.h.

◆ server

QString ServerTest::server
readwrite

Definition at line 44 of file servertest.h.


The documentation for this class was generated from the following files:
  • servertest.h
  • servertest.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailtransport

Skip menu "mailtransport"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal