19 lines
626 B
C++
19 lines
626 B
C++
#include "session_backend_factory.h"
|
|
|
|
#include "rdp_session_backend.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);
|
|
}
|
|
if (profile.protocol.compare(QStringLiteral("RDP"), Qt::CaseInsensitive) == 0) {
|
|
return std::make_unique<RdpSessionBackend>(profile);
|
|
}
|
|
|
|
return std::make_unique<UnsupportedSessionBackend>(profile);
|
|
}
|