1 #ifndef RESPONSEMANAGER_H
2 #define RESPONSEMANAGER_H
5 #include <QJsonDocument>
73 void userloginSuccess(QString email, QString first_name, QString account_number, QString balance);
Manages the responses received from the server.
Definition: ResponseManager.h:18
ResponseManager(QObject *parent=nullptr)
Constructor for ResponseManager.
Definition: ResponseManager.cpp:24
void TransactionsFetched(const QList< QMap< QString, QString >> &transactions)
Signal emitted when transactions are fetched.
void FailedRequest(QString message)
Signal emitted for a failed request.
void userloginSuccess(QString email, QString first_name, QString account_number, QString balance)
Signal emitted when a user login is successful.
void ConnectionResponse(bool status)
Signal emitted for connection response.
void adminLoginSuccess(QString email, QString first_name)
Signal emitted when an admin login is successful.
void handleResponse(QJsonObject Data)
Handles the response received from the server.
Definition: ResponseManager.cpp:28
QString getResponseMessage(QJsonObject Data)
Retrieves the message from the response.
Definition: ResponseManager.cpp:15
void DatabaseFetched(const QList< QMap< QString, QString >> &databaseContent)
Signal emitted when the database content is fetched.
bool getResponseStatus(QJsonObject Data)
Checks the status value in the response.
Definition: ResponseManager.cpp:3
AvailableRequests
Defines the types of requests that can be handled.
Definition: ResponseManager.h:28
@ CreateNewUser
Response to create a new user.
Definition: ResponseManager.h:36
@ UserInit
Response to initialize user.
Definition: ResponseManager.h:40
@ GetTransactionsHistory
Response to get transaction history.
Definition: ResponseManager.h:32
@ MakeTransaction
Response to make a transaction.
Definition: ResponseManager.h:33
@ DeleteUser
Response to delete a user.
Definition: ResponseManager.h:37
@ JsonParseError
Indicates a JSON parse error.
Definition: ResponseManager.h:43
@ GetDatabase
Response to get the database.
Definition: ResponseManager.h:35
@ UpdatePassword
Response to update user password.
Definition: ResponseManager.h:42
@ TransferAmount
Response to transfer an amount (not used for now)
Definition: ResponseManager.h:34
@ GetAccountnumber
Response to get account number.
Definition: ResponseManager.h:30
@ Login
User login response.
Definition: ResponseManager.h:29
@ UpdateEmail
Response to update user email.
Definition: ResponseManager.h:41
@ Connection
Indicates a connection response.
Definition: ResponseManager.h:44
@ UpdateUser
Response to update user information.
Definition: ResponseManager.h:38
@ GetBalance
Response to get account balance.
Definition: ResponseManager.h:31
void SuccessfullRequest(QString message)
Signal emitted for a successful request.
void BalanceFetched(QString balance)
Signal emitted when the balance is fetched.