玉兔远程控制 0.1.0-bate11
载入中...
搜索中...
未找到
ParameterFreeRDP.h
1// Author: Kang Lin <kl222@126.com>
2
3#pragma once
4
5#include "ParameterDesktop.h"
6#include "ParameterProxy.h"
7#include "freerdp/freerdp.h"
8
10class CParameterFreeRDP : public CParameterDesktop
12{
13 Q_OBJECT
14 Q_PROPERTY(bool RedirectionPrinter READ GetRedirectionPrinter WRITE SetRedirectionPrinter NOTIFY sigRedirectionPrinterChanged)
15 Q_PROPERTY(UINT ReconnectInterval READ GetReconnectInterval WRITE SetReconnectInterval NOTIFY sigReconnectIntervalChanged)
16 Q_PROPERTY(RedirecionSoundType RedirectionSound READ GetRedirectionSound WRITE SetRedirectionSound NOTIFY sigRedirectionSoundChanged)
17 Q_PROPERTY(QString RedirectionSoundParameters READ GetRedirectionSoundParameters WRITE SetRedirectionSoundParameters NOTIFY sigRedirectionSoundParametersChanged)
18 Q_PROPERTY(bool RedirectionMicrophone READ GetRedirectionMicrophone WRITE SetRedirectionMicrophone NOTIFY sigRedirectionMicrophoneChanged)
19 Q_PROPERTY(QStringList RedirectionDrives READ GetRedirectionDrives WRITE SetRedirectionDrives NOTIFY sigRedirectionDrivesChanged)
20
21public:
22 explicit CParameterFreeRDP(QObject *parent = nullptr);
23
24 static QRect GetScreenGeometry();
25
26 // CParameter interface
27 virtual int OnLoad(QSettings &set) override;
28 virtual int OnSave(QSettings &set) override;
29
30public:
31
32 void SetDomain(const QString& szDomain);
33 const QString GetDomain() const;
34
35 UINT32 GetDesktopWidth() const;
36 int SetDesktopWidth(UINT32 nWidth);
37
38 UINT32 GetDesktopHeight() const;
39 int SetDesktopHeight(UINT32 nHeight);
40
41 UINT32 GetColorDepth() const;
42 int SetColorDepth(UINT32 color);
43
44 bool GetUseMultimon() const;
45 int SetUseMultimon(bool bUse);
46
47 UINT GetReconnectInterval() const;
48 void SetReconnectInterval(UINT newReconnectInterval);
49
50 bool GetShowVerifyDiaglog() const;
51 void SetShowVerifyDiaglog(bool bShow);
52
53 enum class RedirecionSoundType {
54 Disable,
55 Local,
56 Remote
57 };
58 Q_ENUM(RedirecionSoundType)
59 RedirecionSoundType GetRedirectionSound() const;
60 void SetRedirectionSound(RedirecionSoundType newRedirectionSound);
61 bool GetRedirectionMicrophone() const;
62 void SetRedirectionMicrophone(bool newRedirectionMicrophone);
63 QStringList GetRedirectionDrives() const;
64 void SetRedirectionDrives(const QStringList &newRedirectionDrive);
65
66 bool GetRedirectionPrinter() const;
67 void SetRedirectionPrinter(bool newRedirectionPrinter);
68
69 const QString &GetRedirectionSoundParameters() const;
70 void SetRedirectionSoundParameters(const QString &newRedirectionSoundParameters);
71
72 const QString &GetRedirectionMicrophoneParameters() const;
73 void SetRedirectionMicrophoneParameters(const QString &newRedirectionMicrophoneParameters);
74
75 bool GetNegotiateSecurityLayer() const;
76 void SetNegotiateSecurityLayer(bool newNegotiateSecurityLayer);
77 enum Security{
78 RDP = 0x01, /* Standard RDP */
79 TLS = 0x02, /* TLS */
80 NLA = 0x04, /* NLA */
81 NLA_Ext = 0x08, /* NLA Extended */
82 RDSAAD = 0x10, /* RDSAAD */
83 RDSTLS = 0x20 /* RDSTLS */
84 };
85 Q_ENUM(Security)
86 Security GetSecurity() const;
87 void SetSecurity(Security newSecurity);
88
89 UINT16 GetTlsVersion() const;
90 void SetTlsVersion(UINT16 newTlsVersion);
91
92 UINT32 GetConnectType() const;
93 void SetConnectType(UINT32 newConnectType);
94
95 UINT32 GetPerformanceFlags() const;
96 void SetPerformanceFlags(UINT32 newPerformanceFlags);
97
98signals:
99 void sigReconnectIntervalChanged();
100
101 void sigRedirectionSoundChanged(RedirecionSoundType RedirectionSound);
102 void sigRedirectionSoundParametersChanged();
103 void sigRedirectionMicrophoneChanged(bool RedirectionMicrophone);
104 void sigRedirectionMicrophoneParametersChanged();
105 void sigRedirectionDrivesChanged(QStringList RedirectionDrive);
106 void sigRedirectionPrinterChanged(bool RedirectionPrinter);
107
108private:
109 QString m_szDomain;
110
111 UINT32 m_nWidth;
112 UINT32 m_nHeight;
113
114 UINT32 m_nColorDepth;
115 bool m_bUseMultimon;
116
117 UINT32 m_nReconnectInterval; // Unit: second
118 bool m_bShowVerifyDiaglog;
119
120 bool m_bRedirectionPrinter;
121 RedirecionSoundType m_nRedirectionSound;
122 QString m_szRedirectionSoundParameters;
123 bool m_bRedirectionMicrophone;
124 QString m_szRedirectionMicrophoneParameters;
125 QStringList m_lstRedirectionDrives;
126 Q_PROPERTY(QString RedirectionMicrophoneParameters READ GetRedirectionMicrophoneParameters WRITE SetRedirectionMicrophoneParameters NOTIFY sigRedirectionMicrophoneParametersChanged)
127
128 bool m_bNegotiateSecurityLayer;
129 Security m_Security;
130 UINT16 m_tlsVersion;
131
132 UINT32 m_ConnectType;
133 UINT32 m_PerformanceFlags;
134};