-
Notifications
You must be signed in to change notification settings - Fork 1
/
cpeac8.cpp
95 lines (77 loc) · 3.35 KB
/
cpeac8.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include "cpeac8.h"
QString CpeAC8::getSSID24(QJsonObject item)
{
return item.value("InternetGatewayDevice").toObject().value("LANDevice").toObject().value("1").toObject().value("WLANConfiguration").toObject().value("1").toObject().value("SSID").toObject().value("_value").toString();
}
QString CpeAC8::getSSID24Pass(QJsonObject item)
{
return item.value("InternetGatewayDevice").toObject().value("LANDevice").toObject().value("1").toObject().value("WLANConfiguration").toObject().value("1").toObject().value("PreSharedKey").toObject().value("1").toObject().value("PreSharedKey").toObject().value("_value").toString();
}
QString CpeAC8::getSSID5(QJsonObject item)
{
return item.value("InternetGatewayDevice").toObject().value("LANDevice").toObject().value("1").toObject().value("WLANConfiguration").toObject().value("2").toObject().value("SSID").toObject().value("_value").toString();
}
QString CpeAC8::getSSID5Pass(QJsonObject item)
{
return item.value("InternetGatewayDevice").toObject().value("LANDevice").toObject().value("1").toObject().value("WLANConfiguration").toObject().value("2").toObject().value("PreSharedKey").toObject().value("1").toObject().value("PreSharedKey").toObject().value("_value").toString();
}
QString CpeAC8::getPPPoELogin(QJsonObject item)
{
return item.value("InternetGatewayDevice").toObject().value("WANDevice").toObject().value("1").toObject().value("WANConnectionDevice").toObject().value("1").toObject().value("WANPPPConnection").toObject().value("1").toObject().value("Username").toObject().value("_value").toString();
}
QString CpeAC8::getPPPoEPass(QJsonObject item)
{
return item.value("InternetGatewayDevice").toObject().value("WANDevice").toObject().value("1").toObject().value("WANConnectionDevice").toObject().value("1").toObject().value("WANPPPConnection").toObject().value("1").toObject().value("Password").toObject().value("_value").toString();
}
QString CpeAC8::getPPPoEEnable(QJsonObject item)
{
return item.value("InternetGatewayDevice").toObject().value("WANDevice").toObject().value("1").toObject().value("WANConnectionDevice").toObject().value("1").toObject().value("WANPPPConnection").toObject().value("1").toObject().value("Enable").toObject().value("_value").toString();
}
QString CpeAC8::getReboot(QJsonObject item)
{
QDateTime d = QDateTime::fromString(item.value("Reboot").toObject().value("_value").toString(), Qt::ISODate).toLocalTime();
d.setTimeSpec(Qt::LocalTime);
return d.toString("yyyy-MM-dd hh:mm:ss");
}
QString CpeAC8::getFactoryReset(QJsonObject item)
{
QDateTime d = QDateTime::fromString(item.value("FactoryReset").toObject().value("_value").toString(), Qt::ISODate).toLocalTime();
d.setTimeSpec(Qt::LocalTime);
return d.toString("yyyy-MM-dd hh:mm:ss");
}
QString CpeAC8::getNodeSSID24()
{
return this->nodeSSID24;
}
QString CpeAC8::getNodeSSID24Pass()
{
return this->nodeSSID24Pass;
}
QString CpeAC8::getNodeSSID5()
{
return this->nodeSSID5;
}
QString CpeAC8::getNodeSSID5Pass()
{
return this->nodeSSID5Pass;
}
QString CpeAC8::getNodePPPoELogin()
{
return this->nodePPPoELogin;
}
QString CpeAC8::getNodePPPoEPass()
{
return this->nodePPPoEPass;
}
QString CpeAC8::getNodePPPoEEnable()
{
return this->nodePPPoEEnable;
}
QString CpeAC8::getNodeReboot()
{
return this->nodeReboot;
}
QString CpeAC8::getNodeFactoryReset()
{
return this->nodeFactoryReset;
}