玉兔远程控制 0.1.0-bate11
载入中...
搜索中...
未找到
ParameterServer.h
1// Author: Kang Lin <kl222@126.com>
2
3#pragma once
4
5#include "ParameterNet.h"
6
11class PLUGIN_EXPORT CParameterServer : public CParameterOperate
12{
13 Q_OBJECT
14
15public:
16 explicit CParameterServer(
17 QObject *parent = nullptr,
18 const QString& szPrefix = QString());
19
20 CParameterNet m_Net;
21 CParameterFilter m_WhiteFilter;
22 CParameterFilter m_BlackFilter;
23
24public:
25 bool GetAnonymousLogin() const;
26 void SetAnonymousLogin(bool newAnonymousLogin);
27private:
28 bool m_bAnonymousLogin;
29public:
30 bool GetReadOnly() const;
31 void SetReadOnly(bool newReadOnly);
32private:
33 bool m_bReadOnly;
34public:
35 QString GetRoot() const;
36 void SetRoot(const QString &newRoot);
37private:
38 QString m_szRoot;
39public:
45 int GetConnectCount() const;
46 void SetConnectCount(int newConnectCount);
47private:
48 int m_ConnectCount;
49public:
50 bool GetListenAll() const;
51 void SetListenAll(bool newListenAll);
52private:
53 bool m_bListenAll;
54public:
55 QStringList GetListen() const;
56 void SetListen(const QStringList &newListen);
57private:
58 QStringList m_Listen;
59public:
60 QString GetHostKeyFile() const;
61 void SetHostKeyFile(const QString& key);
62private:
63 QString m_szHostKeyFile; // Private key
64public:
69 qint64 GetAuthenticateTime() const;
74 void SetAuthenticateTime(qint64 tm);
75private:
76 qint64 m_tmAuthenticate;
77public:
82 int GetAuthenticateAttempts() const;
87 void SetAuthenticateAttempts(int attempts);
88private:
89 int m_AuthAttempts;
90
91 // CParameter interface
92protected:
93 virtual int OnLoad(QSettings &set) override;
94 virtual int OnSave(QSettings &set) override;
95
96 // CParameterOperate interface
97protected slots:
98 virtual void slotSetPluginParameters() override;
99};
网络连接参数接口。此类仅在插件内有效。 其界面为 CParameterNetUI
CParameterOperate(QObject *parent, const QString &szPrefix=QString())
void SetAuthenticateTime(qint64 tm)
Set authenticate time out
int GetAuthenticateAttempts() const
Get authenticate attempts
qint64 GetAuthenticateTime() const
Get authenticate time out
int GetConnectCount() const
Connect count.
void SetAuthenticateAttempts(int attempts)
Set authenticate attempts