20#ifndef MAILTRANSPORT_SOCKET_H
21#define MAILTRANSPORT_SOCKET_H
23#include <mailtransport/mailtransport_export.h>
25#include <QtNetwork/QSslSocket>
27namespace MailTransport {
37class MAILTRANSPORT_EXPORT
Socket :
public QObject
48 explicit Socket( QObject *parent );
64 virtual void write(
const QString &text );
98 Q_DECLARE_PRIVATE(
Socket )
99 SocketPrivate *
const d;
101 Q_PRIVATE_SLOT( d,
void slotConnected() )
102 Q_PRIVATE_SLOT( d,
void slotStateChanged( QAbstractSocket::SocketState state ) )
103 Q_PRIVATE_SLOT( d,
void slotModeChanged( QSslSocket::SslMode state ) )
104 Q_PRIVATE_SLOT( d,
void slotSocketRead() )
105 Q_PRIVATE_SLOT( d,
void slotSslErrors(
const QList<QSslError> &errors ) )
void connected()
emitted when there is a connection (ready to send something).
Socket(QObject *parent)
Contructor, it will not auto connect.
void setServer(const QString &server)
set the server to use
void setPort(int port)
set the port to use.
virtual void reconnect()
Existing connection will be closed and a new connection will be made.
void failed()
emitted when not connected.
void data(const QString &)
emits the incoming data
void setSecure(bool what)
this will be a secure connection
void setProtocol(const QString &proto)
set the protocol to use
virtual void write(const QString &text)
Write text to the socket.
void tlsDone()
emitted when startShake() is completed.
void startTLS()
If you want to start TLS encryption, call this.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.