3#include "ParameterServiceFreeRDP.h"
6CParameterServiceFreeRDP::CParameterServiceFreeRDP(QObject *parent)
10 m_bNlaSecurity(false),
11 m_bNlaExtSecurity(false),
12 #ifdef WITH_SHADOW_X11
13 m_bAuthentication(true),
15 m_bAuthentication(false),
23bool CParameterServiceFreeRDP::getTlsSecurity()
const
25 return m_bTlsSecurity;
28void CParameterServiceFreeRDP::setTlsSecurity(
bool newTlsSecurity)
30 if (m_bTlsSecurity == newTlsSecurity)
32 m_bTlsSecurity = newTlsSecurity;
33 emit sigTlsSecurityChanged();
36bool CParameterServiceFreeRDP::getRdpSecurity()
const
38 return m_bRdpSecurity;
41void CParameterServiceFreeRDP::setRdpSecurity(
bool newRdpSecurity)
43 if (m_bRdpSecurity == newRdpSecurity)
45 m_bRdpSecurity = newRdpSecurity;
46 emit sigRdpSecurityChanged();
49bool CParameterServiceFreeRDP::getNlaSecurity()
const
51 return m_bNlaSecurity;
54void CParameterServiceFreeRDP::setNlaSecurity(
bool newNlaSecurity)
56 if (m_bNlaSecurity == newNlaSecurity)
58 m_bNlaSecurity = newNlaSecurity;
59 emit sigNlaecurityChanged();
62bool CParameterServiceFreeRDP::getNlaExtSecurity()
const
64 return m_bNlaExtSecurity;
67void CParameterServiceFreeRDP::setNlaExtSecurity(
bool newNlaExtSecurity)
69 if (m_bNlaExtSecurity == newNlaExtSecurity)
71 m_bNlaExtSecurity = newNlaExtSecurity;
72 emit sigNlaExtSecurityChanged();
75bool CParameterServiceFreeRDP::getAuthentication()
const
77 return m_bAuthentication;
80void CParameterServiceFreeRDP::setAuthentication(
bool newAuthentication)
82 if (m_bAuthentication == newAuthentication)
84 m_bAuthentication = newAuthentication;
85 emit sigAuthenticationChanged();
88bool CParameterServiceFreeRDP::getMayView()
const
93void CParameterServiceFreeRDP::setMayView(
bool newMayView)
95 if (m_MayView == newMayView)
97 m_MayView = newMayView;
98 emit sigMayViewChanged();
101bool CParameterServiceFreeRDP::getMayInteract()
const
103 return m_MayInteract;
106void CParameterServiceFreeRDP::setMayInteract(
bool newMayInteract)
108 if (m_MayInteract == newMayInteract)
110 m_MayInteract = newMayInteract;
111 emit sigMayInteractChanged();
114const QString &CParameterServiceFreeRDP::getSamFile()
const
119void CParameterServiceFreeRDP::setSamFile(
const QString &newSamFile)
121 if (m_szSamFile == newSamFile)
123 m_szSamFile = newSamFile;
124 emit sigSamFileChanged();
127int CParameterServiceFreeRDP::Load(
const QString &szFile)
129 QSettings set(szFile, QSettings::IniFormat);
131 setTlsSecurity(set.value(
"Security/Tls", getTlsSecurity()).toBool());
132 setRdpSecurity(set.value(
"Security/Rdp", getRdpSecurity()).toBool());
133 setNlaSecurity(set.value(
"Security/Nla", getNlaSecurity()).toBool());
134 setNlaExtSecurity(set.value(
"Security/NlaExt", getNlaExtSecurity()).toBool());
135 setSamFile(set.value(
"Security/Nla/SamFIle", getSamFile()).toString());
137 setAuthentication(set.value(
"Server/Authentication", getAuthentication()).toBool());
138 setMayView(set.value(
"Server/MayView", getMayView()).toBool());
139 setMayInteract(set.value(
"Server/MayInteract", getMayInteract()).toBool());
140 return CParameterService::Load(szFile);
143int CParameterServiceFreeRDP::Save(
const QString &szFile)
145 QSettings set(szFile, QSettings::IniFormat);
147 set.setValue(
"Security/Tls", getTlsSecurity());
148 set.setValue(
"Security/Rdp", getRdpSecurity());
149 set.setValue(
"Security/Nla", getNlaSecurity());
150 set.setValue(
"Security/NlaExt", getNlaExtSecurity());
151 set.setValue(
"Security/Nla/SamFIle", getSamFile());
153 set.setValue(
"Server/Authentication", getAuthentication());
154 set.setValue(
"Server/MayView", getMayView());
155 set.setValue(
"Server/MayInteract", getMayInteract());
157 return CParameterService::Save(szFile);