Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
ParameterWakeOnLan.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef PARAMETERWAKEONLAN_H
4#define PARAMETERWAKEONLAN_H
5
6#include "ParameterConnecter.h"
7#include "ParameterNet.h"
8
15{
16 Q_OBJECT
17public:
18 explicit CParameterWakeOnLan(QObject* parent = nullptr);
19
20 const bool GetEnable() const;
21 int SetEnable(bool bEnable);
22
23 // Target IP
24 CParameterNet m_Net;
25
26 const QString GetMac() const;
27 int SetMac(const QString &szMac);
28
29 const QString GetBroadcastAddress() const;
30 int SetBroadcastAddress(const QString& szBroadcastAddress);
31
36 const QString GetNetworkInterface() const;
37 int SetNetworkInterface(const QString& szName);
38
39 const quint16 GetPort() const;
40 int SetPort(quint16 port);
41
42 const QString GetPassword() const;
43 int SetPassword(const QString& szPassword);
44
45 const bool GetSavePassword() const;
50 int SetSavePassword(bool save);
51
52 const int GetRepeat() const;
53 int SetRepeat(int nRepeat);
54
56 const int GetInterval() const;
58 int SetInterval(int nInterval);
59
61 const int GetTimeOut() const;
63 int SetTimeOut(int nTimeout);
64
65 enum class HostState{
66 Online,
67 GetMac,
68 WakeOnLan,
69 Offline
70 };
71
72 HostState GetHostState() const;
73 void SetHostState(HostState newHostState);
74
75signals:
76 void sigHostStateChanged();
77
78private:
79 bool m_bEnable;
80 HostState m_HostState;
81 QString m_szMac;
82 QString m_szBoardcastAddress;
83 QString m_szNetworkInteface;
84 quint16 m_nPort;
85 QString m_szPassword;
86 bool m_bSavePassword;
87
88 int m_nRepeat;
89 int m_nInterval;
91
92 // CParameter interface
93protected:
94 virtual int OnLoad(QSettings &set) override;
95 virtual int OnSave(QSettings &set) override;
96 virtual bool OnCheckValidity() override;
97
98 // CParameterConnecter interface
99protected slots:
100 virtual void slotSetParameterClient() override;
101};
102
103#endif // PARAMETERWAKEONLAN_H
the parameters of connecter interface.
Basic network parameters.
The wake on lan parameters.
virtual int OnLoad(QSettings &set) override
Unit: ms.
int SetTimeOut(int nTimeout)
Unit: ms.
int SetSavePassword(bool save)
Set save password.
int SetInterval(int nInterval)
Unit: ms.
const QString GetNetworkInterface() const
Get network interface.
virtual bool OnCheckValidity() override
Check validity.
const int GetTimeOut() const
Unit: ms.
const int GetInterval() const
Unit: ms.