Show connection type/last seen

This commit is contained in:
adityapk00
2019-02-07 20:44:59 -08:00
parent 445c2845da
commit 3caa372d5a
3 changed files with 106 additions and 20 deletions

View File

@@ -60,6 +60,11 @@ enum NonceType {
REMOTE
};
enum AppConnectionType {
DIRECT = 1,
INTERNET
};
class AppDataServer {
public:
static AppDataServer* getInstance() {
@@ -74,7 +79,7 @@ public:
void updateUIWithNewQRCode(MainWindow* mainwindow);
void processSendTx(QJsonObject sendTx, MainWindow* mainwindow, QWebSocket* pClient);
void processMessage(QString message, MainWindow* mainWindow, QWebSocket* pClient);
void processMessage(QString message, MainWindow* mainWindow, QWebSocket* pClient, AppConnectionType connType);
void processGetInfo(QJsonObject jobj, MainWindow* mainWindow, QWebSocket* pClient);
void processDecryptedMessage(QString message, MainWindow* mainWindow, QWebSocket* pClient);
void processGetTransactions(MainWindow* mainWindow, QWebSocket* pClient);
@@ -91,6 +96,14 @@ public:
QString getNonceHex(NonceType nt);
void saveNonceHex(NonceType nt, QString noncehex);
void saveLastSeenTime();
QDateTime getLastSeenTime();
QString connDesc(AppConnectionType t);
void saveLastConnectedOver(AppConnectionType type);
AppConnectionType getLastConnectionType();
private:
AppDataServer() = default;