1 #ifndef _PVSSERVERCONNECTION_H_
2 #define _PVSSERVERCONNECTION_H_
5 #include "../../shared/networkmessage.h"
6 #include "../connectwindow/connectwindow.h"
36 ServerConnection(
const QString& host, quint16 port,
const QByteArray& sessionName,
const QByteArray& certHash,
bool autoConnect);
41 return _socket !=
nullptr && _socket->state() == QAbstractSocket::ConnectedState;
44 QString
getPeerAdress()
const {
return _socket->peerAddress().toString(); }
47 if (_isLocalConnection == -1) {
50 return _isLocalConnection == 1;
60 void sslErrors(
const QList<QSslError> & errors);
63 void sock_error(QAbstractSocket::SocketError errcode);
72 void openVnc(
const QString& host,
int port,
const QString& passwd,
bool ro,
bool fullscreen,
const QString& caption,
const int clientId,
const QByteArray& rawThumb);
QString getPeerAdress() const
void checkLocalConnection()
QByteArray _expectedFingerprint
~ServerConnection() override
void stateChange(ConnectWindow::ConnectionState state)
void sendMessage(NetworkMessage &message)
Send the given message to the server.
int _timerConnectionCheck
void disconnectFromServer()
Disconnect from current server.
void attentionChanged(bool state)
NetworkMessage _fromServer
void disconnected(ServerConnection *connection)
void onVncServerStartStop(int port, const QString &ropass, const QString &rwpass)
This slot is triggered by the vnc server runner once the external VNC server was succesfully started...
void timerEvent(QTimerEvent *event) override
void sock_error(QAbstractSocket::SocketError errcode)
void sslErrors(const QList< QSslError > &errors)
An ssl error happened.
ServerConnection(const QString &host, quint16 port, const QByteArray &sessionName, const QByteArray &certHash, bool autoConnect)
void openVnc(const QString &host, int port, const QString &passwd, bool ro, bool fullscreen, const QString &caption, const int clientId, const QByteArray &rawThumb)
void handleMsg()
Handles an incoming message by the server.
void onVncViewerStartStop(bool started, int clientId)
This slot is triggered once the internal VNC viewer has started or stopped displaying a VNC stream...
void sendAttention(bool on)