Add threaded session backend architecture with real SSH backend
This commit is contained in:
14
src/session_backend_factory.cpp
Normal file
14
src/session_backend_factory.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "session_backend_factory.h"
|
||||
|
||||
#include "session_backend.h"
|
||||
#include "ssh_session_backend.h"
|
||||
#include "unsupported_session_backend.h"
|
||||
|
||||
std::unique_ptr<SessionBackend> createSessionBackend(const Profile& profile)
|
||||
{
|
||||
if (profile.protocol.compare(QStringLiteral("SSH"), Qt::CaseInsensitive) == 0) {
|
||||
return std::make_unique<SshSessionBackend>(profile);
|
||||
}
|
||||
|
||||
return std::make_unique<UnsupportedSessionBackend>(profile);
|
||||
}
|
||||
Reference in New Issue
Block a user