forked from Legatto2/MotoTool_MTK
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetamodethread.h
More file actions
91 lines (68 loc) · 3.24 KB
/
metamodethread.h
File metadata and controls
91 lines (68 loc) · 3.24 KB
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
#ifndef METAMODETHREAD_H
#define METAMODETHREAD_H
#include <QObject>
#include "globalvars.h"
#define APP_MAXTIME 150000 // in MiliSecond
class MetaModeThread : public QObject
{
Q_OBJECT
public:
explicit MetaModeThread(QObject *parent = nullptr);
signals:
void tx_ProcessCompleted_metaMode(int idx, bool complt);
void tx_TextBoxOutput_metaMode(TOOL_TYPE tool, int idx, QString s, bool isBold, bool newline, QColor color);
void tx_miscOperations_metaMode(TOOL_TYPE tool, int idx, int value, QString str);
public slots:
void setGeneralIndex_metaMode(int idx);
void rx_StartRepairing_metaMode(int idx, bool startStop, TOOL_TYPE tool);
void rx_CommandLine_OutPutReceived();
void rx_CommandLine_ErrorReceived();
void rx_timer_Meta_singleShot();
void on_timer_AppMaxTime_Elapsed();
private:
QSerialPort *serialport;
QProcess *metaProcess;
QTimer *timer_Meta_singleShot;
QTimer *timer_AppMaxTime;
int generalIndex = 10;
QString commandlineOutPut = "";
QString commandError = "";
QString commandStr = "";
void getAuthenticationFromServer(QString strData, QString strIMEI);
bool getServerIMEInumber_updateGlobal();
QByteArray authenReply;
QNetworkReply *reply;
QNetworkAccessManager *nam;
QString powerShellPath = "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe";
QString cmdShellPath = "C:/windows/system32/cmd.exe";
QString m3FolderPath = QString(QDir::currentPath() + "/M3");
QString adbFolderPath = QString(QDir::currentPath() + "/ADB");
QString ChinoeIMEICMToolFolderPath_Data1 = QString(QDir::currentPath() + "/DATA/DATA1");
QString ChinoeIMEICMToolFolderPath_Data2 = QString(QDir::currentPath() + "/DATA/DATA2");
QString ChinoeIMEICMToolFolderPath_Data3 = QString(QDir::currentPath() + "/DATA/DATA3");
//1. "E6I"
QString simUnLock_E6I = QString(QDir::currentPath() +"/DATA/DATA1/e6isimlock/fijisc_mexico.att.bin");
//2. "E7I"
QString simUnLock_E7I = QString(QDir::currentPath() +"/DATA/DATA1/E7Isimlock/maltalsc_guatemala.tigo.bin");
//3. "E6s XT2053"
QString simUnLock_E6sXT2053 = QString(QDir::currentPath() +"/DATA/DATA2/e6eSimlock/SIMLock.MTK.Guatemala.Tigo.20191128.SIMLock");
//4. "G8 Power Lite XT2055"
QString simUnLock_G8PowerLite = QString(QDir::currentPath() +"/DATA/DATA2/g8simlock/SIMLock.MTK.Guatemala.Claro.20200720.SIMLock");
//5. "E7 Play XT2095"
QString simUnLock_E7PlayXT2095 = QString(QDir::currentPath() +"/DATA/DATA2/E7simlock/SIMLock.MTK.Guatemala.Tigo.20201014.SIMLock");
//6. "G20"
QString simUnLock_G20 = QString(QDir::currentPath() +"/DATA/DATA3/g20simlock/simlock-attmx_region.bin");
//7. E20 XT2155
QString simUnLock_E20xt2155 = QString(QDir::currentPath() +"/DATA/DATA4/e20xt2155/simlock.bin");
//8. E40 XT2159
QString simUnLock_E40xt2159 = QString(QDir::currentPath() +"/DATA/DATA4/e40xt2159/simlock.bin");
QStringList shellArguments;
bool processStartStop = false;
MMM_Commands currentCommand = MMM_Idle;
TOOL_TYPE currentToolType = Tool_MTK;
bool showTheConsole = false;
void check_Repair_Cmd_outPut(QString str);
void check_UnLock_Cmd_outPut(QString str);
void check_CarrierFix_Cmd_outPut(QString str);
};
#endif // METAMODETHREAD_H