3#include "ServiceFreeRDP.h"
4#include "ParameterServiceFreeRDP.h"
6 #include "FrmParameterFreeRDP.h"
19CServiceFreeRDP::~CServiceFreeRDP()
26 shadow_subsystem_set_entry_builtin(NULL);
28 m_pServer = shadow_server_new();
31 qCritical(m_Log) <<
"Server new failed";
37 nRet = shadow_server_init(m_pServer);
40 qCritical(m_Log) <<
"Server initialization failed.";
45 if ((nRet = shadow_server_start(m_pServer)) < 0)
47 qCritical(m_Log) <<
"Failed to start server.";
63 shadow_server_uninit(m_pServer);
64 shadow_server_free(m_pServer);
72QWidget* CServiceFreeRDP::GetParameterWidget(QWidget *parent)
79int CServiceFreeRDP::SetParameters()
84 m_pSettings = m_pServer->settings;
85 m_pSettings->NlaSecurity = p->getNlaSecurity();
86 m_pSettings->TlsSecurity = p->getTlsSecurity();
87 m_pSettings->RdpSecurity = p->getRdpSecurity();
88 m_pSettings->UseRdpSecurityLayer = m_pSettings->RdpSecurity;
89 m_pSettings->ExtSecurity = p->getNlaExtSecurity();
90 if(!p->getSamFile().isEmpty())
91 freerdp_settings_set_string(m_pSettings, FreeRDP_NtlmSamFile,
92 p->getSamFile().toStdString().c_str());
94 m_pServer->authentication = p->getAuthentication();
96 m_pServer->port = p->getPort();
97 m_pServer->mayView = p->getMayView();
98 m_pServer->mayInteract = p->getMayInteract();
virtual int OnClean() override
Clean service.
virtual int OnInit() override
Init service.