Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
WakeOnLanQt.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef WAKEONLANQT_H
4#define WAKEONLANQT_H
5
6#include <QHostAddress>
7
8#include "WakeOnLan.h"
9
10class CWakeOnLanQt : public QObject, protected CWakeOnLan
11{
12 Q_OBJECT
13public:
14 CWakeOnLanQt(const QString& szBroadcastAddress = "255.255.255.255",
15 QObject *parent=nullptr);
16
17 void SetBroadcastAddress(const QString& szBroadcastAddress = "255.255.255.255");
18 QString SetBroadcastAddress(const QString& szIP, const QString& szMask);
19
27 bool SendMagicPacket(const QString& szMac, uint16_t portNum = 9);
37 bool SendSecureMagicPacket(const QString& szMac,
38 const QString& szPassword, uint16_t portNum = 9);
39
40protected:
41 virtual int SendPacket(const char *data, int64_t size,
42 std::string addr, uint16_t port) override;
43};
44
45#endif // WAKEONLANQT_H
bool SendMagicPacket(const QString &szMac, uint16_t portNum=9)
SendMagicPacket.
bool SendSecureMagicPacket(const QString &szMac, const QString &szPassword, uint16_t portNum=9)
SendSecureMagicPacket.