Added finalResult() -> send final message to ISMAS in any case.
This commit is contained in:
parent
769626581f
commit
4968942cc2
@ -762,6 +762,27 @@ QString IsmasClient::jsonParseFailed(int resultCode, QString reason, QString con
|
|||||||
version.toStdString().c_str());
|
version.toStdString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::optional<QString> IsmasClient::finalResult(int resultCode, QString reason, QString const &version) {
|
||||||
|
m_progressInPercent = 0;
|
||||||
|
if (resultCode == RESULT_CODE::SUCCESS) {
|
||||||
|
return updateNewsToIsmas("U0002",
|
||||||
|
m_progressInPercent,
|
||||||
|
RESULT_CODE::SUCCESS,
|
||||||
|
"FINAL-UPDATE-RESULT",
|
||||||
|
"(re-)set WAIT state",
|
||||||
|
version.toStdString().c_str());
|
||||||
|
}
|
||||||
|
if (resultCode == RESULT_CODE::INSTALL_ERROR) {
|
||||||
|
return updateNewsToIsmas("U0003",
|
||||||
|
m_progressInPercent,
|
||||||
|
resultCode,
|
||||||
|
"FINAL-UPDATE-RESULT",
|
||||||
|
reason.toStdString().c_str(),
|
||||||
|
version.toStdString().c_str());
|
||||||
|
}
|
||||||
|
return std::nullopt;
|
||||||
|
}
|
||||||
|
|
||||||
QString IsmasClient::updateOfPSAFailed(int resultCode, QString step,
|
QString IsmasClient::updateOfPSAFailed(int resultCode, QString step,
|
||||||
QString reason, QString const &version) {
|
QString reason, QString const &version) {
|
||||||
return updateNewsToIsmas("U0003",
|
return updateNewsToIsmas("U0003",
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
struct PSAInstalled {
|
struct PSAInstalled {
|
||||||
struct Tariff {
|
struct Tariff {
|
||||||
QString name;
|
QString name;
|
||||||
@ -159,6 +161,7 @@ public:
|
|||||||
QString updateOfPSAFailed(int resultCode, QString step, QString reason, QString const &version = QString());
|
QString updateOfPSAFailed(int resultCode, QString step, QString reason, QString const &version = QString());
|
||||||
QString sanityCheckFailed(int resultCode, QString reason, QString const &version = QString());
|
QString sanityCheckFailed(int resultCode, QString reason, QString const &version = QString());
|
||||||
QString jsonParseFailed(int resultCode, QString reason, QString const &version = QString());
|
QString jsonParseFailed(int resultCode, QString reason, QString const &version = QString());
|
||||||
|
std::optional<QString> finalResult(int resultCode, QString reason, QString const &version = QString());
|
||||||
|
|
||||||
QString updateOfPSASendVersion(PSAInstalled const &psa);
|
QString updateOfPSASendVersion(PSAInstalled const &psa);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user