Add threaded session backend architecture with real SSH backend
This commit is contained in:
26
src/unsupported_session_backend.cpp
Normal file
26
src/unsupported_session_backend.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "unsupported_session_backend.h"
|
||||
|
||||
UnsupportedSessionBackend::UnsupportedSessionBackend(const Profile& profile, QObject* parent)
|
||||
: SessionBackend(profile, parent)
|
||||
{
|
||||
}
|
||||
|
||||
void UnsupportedSessionBackend::connectSession(const SessionConnectOptions&)
|
||||
{
|
||||
const QString message = QStringLiteral("Protocol '%1' is not implemented yet.")
|
||||
.arg(profile().protocol);
|
||||
emit eventLogged(message);
|
||||
emit stateChanged(SessionState::Failed, message);
|
||||
emit connectionError(message, message);
|
||||
}
|
||||
|
||||
void UnsupportedSessionBackend::disconnectSession()
|
||||
{
|
||||
emit stateChanged(SessionState::Disconnected,
|
||||
QStringLiteral("No active connection for this protocol."));
|
||||
}
|
||||
|
||||
void UnsupportedSessionBackend::reconnectSession(const SessionConnectOptions& options)
|
||||
{
|
||||
connectSession(options);
|
||||
}
|
||||
Reference in New Issue
Block a user