Refactored code to improve account and transaction data parsing and management, introducing support for additional fields like card numbers and account statuses. Added new utilities for database connections, device-specific screenshot handling, and XML parsing for enriched account and transaction details.
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QDomElement>
|
|
#include "android/xml/Node.h"
|
|
#include "db/AccountInfo.h"
|
|
#include "db/TransactionInfo.h"
|
|
|
|
class ScreenXmlParser final : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ScreenXmlParser(QObject *parent = nullptr);
|
|
|
|
~ScreenXmlParser() override;
|
|
|
|
Node tryToFindBannerOrDialog(int width, int height);
|
|
|
|
Node tryToFindSecurityBanner();
|
|
|
|
Node findTextNode(const QString &text);
|
|
Node findTextNode(const QString &text, int x1, int y1, int x2, int y2);
|
|
|
|
Node findFirstEditText();
|
|
|
|
Node findButtonNode(const QString &text, bool contains);
|
|
|
|
bool isHomeScreen();
|
|
|
|
|
|
QList<Node> tryToFindPinCode(const QString &pinCode, const QString &title);
|
|
|
|
QList<Node> getLast2DaysTransactions();
|
|
|
|
void parseAndSaveXml(const QString &xml);
|
|
|
|
TransactionInfo parseTransactionInfoHistory(int screenWidth, int screenHeight);
|
|
QList<TransactionInfo> parseTodayAndYesterdayHistory();
|
|
|
|
QList<AccountInfo> parseAccountsInfo();
|
|
|
|
void test();
|
|
|
|
private:
|
|
QList<Node> m_nodes;
|
|
QDomElement m_xml;
|
|
|
|
QList<Node> findPinCodeNodes(const QString &pinCode);
|
|
};
|