#include "process/check_ismas_connectivity_command.h" #include "worker.h" #include CheckIsmasConnectivityCommand::CheckIsmasConnectivityCommand(QString const &command, Worker *worker, int nextCommandIndex, int start_timeout, int finish_timeout) : UpdateCommand(command, worker, nextCommandIndex, start_timeout, finish_timeout) { } void CheckIsmasConnectivityCommand::finished(int exitCode, QProcess::ExitStatus exitStatus) { return UpdateCommand::finished(exitCode, exitStatus); } void CheckIsmasConnectivityCommand::readyReadStandardOutput() { QProcess *p = (QProcess *)sender(); if (p) { Worker *w = worker(); if (w) { QString s = p->readAllStandardOutput().trimmed(); if (s == UpdateCommand::ISMAS_CONNECTED) { emit w->showISMASConnectivity(UpdateCommand::ISMAS_CONNECTED); } else if (s == UpdateCommand::NO_CUSTOMER_REPOSITORY) { emit w->showISMASConnectivity(UpdateCommand::NO_CUSTOMER_REPOSITORY); } else if (s == UpdateCommand::ISMAS_NOT_CONNECTED) { emit w->showISMASConnectivity(UpdateCommand::ISMAS_NOT_CONNECTED); } else if (s == UpdateCommand::ISMAS_CONNECTION_IN_PROGRESS) { emit w->showISMASConnectivity(UpdateCommand::ISMAS_CONNECTION_IN_PROGRESS); } } } }