Index: sources/ApplicationController.cpp =================================================================== diff -u -rb38ddcaebab3033a52139f8ad7a4178e2bda3cff -rc70ae33e19c08779ce89e2f1728f2d1af7b5c100 --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision b38ddcaebab3033a52139f8ad7a4178e2bda3cff) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision c70ae33e19c08779ce89e2f1728f2d1af7b5c100) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file ApplicationController.cpp - * \author (last) Behrouz NematiPour - * \date (last) 08-Aug-2023 + * \author (last) Dara Navaei + * \date (last) 26-Mar-2024 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -89,6 +89,8 @@ */ void ApplicationController::initConnections() { + connect(&_post , SIGNAL(didOSVersion (bool)), + this , SLOT( onOSVersion (bool))); connect(&_post , SIGNAL( didEthernet (bool)), this , SLOT(onPOSTEthernet (bool))); connect(&_post , SIGNAL( didWiFi (bool)), @@ -564,12 +566,23 @@ } /*! + * \brief ApplicationController::onOSVersion + * \details Notifies the OS Version POST status + */ +void ApplicationController::onOSVersion(bool vPass) { + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. + emit didPOSTOSVersionData (_post.osVersion()); + emit didPOSTOSVersion (vPass); +} + +/*! * \brief ApplicationController::onPOSTEthernet * \details sends the Ethernet mac to device controller */ void ApplicationController::onPOSTEthernet(bool vPass) { - emit didPOSTEthernet (vPass); + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. emit didPOSTEthernetData(_post.macEthernet()); + emit didPOSTEthernet (vPass); } /*! @@ -580,8 +593,9 @@ if (vPass) { _WifiInterface.doStart(); } - emit didPOSTWireless (vPass); + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. emit didPOSTWirelessData(_post.macWireless()); + emit didPOSTWireless (vPass); //DEBUG qDebug() << " ---------- " << _post.macWireless(); } @@ -598,18 +612,19 @@ else { _BluetoothInterface.doNotifyStatePOSTError(); } - emit didPOSTBluetooth (vPass); + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. emit didPOSTBluetoothData (_post.macBluetooth()); + emit didPOSTBluetooth (vPass); } /*! * \brief ApplicationController::onPOSTCloudSync * \details Notifies the CloudSync POST status */ -void ApplicationController::onPOSTCloudSync(bool vPass) -{ +void ApplicationController::onPOSTCloudSync(bool vPass) { + // sending the data first, therefore in the slot for the didPOST we have the vPass and the Data to decide to use the data or not. + emit didPOSTCloudSyncData("" /*_post.netCloudSync*/); // not needed and POST is not getting it yet. [ApplicationController => DeviceController] emit didPOSTCloudSync (vPass); - emit didPOSTCloudSyncData("" /*_post.netCloudSync*/); // not needed and post is not getting it yet.[ApplicationController => DeviceController] } /*! @@ -644,7 +659,7 @@ * or * Queues the alarms if vSend is false. * \param vAlarmID - The alarm ID - * \param vSend - False to queue the ValarmID alarm ID, or True to send the list of the queued alarms. + * \param vSend - False to queue the vAlarmID alarm ID, or True to send the list of the queued alarms. */ void ApplicationController::onPOSTFail(GuiAlarmID vAlarmID) { alarmTrigger(vAlarmID, false, false); @@ -684,6 +699,16 @@ } /*! + * \brief ApplicationController::institutionalRequest + * \details Sends an institutional record request + */ +void ApplicationController::institutionalRequest() { + AdjustInstitutionalRequestData adjustInstitutionalRequestData; + emit didAdjustment(adjustInstitutionalRequestData); + LOG_DEBUG("POSTInstitutionalRecordReq Sent"); +} + +/*! * \brief ApplicationController::onstartPOST * \details The POST entry point * - Sends the first async check-in to the HD to let HD know it can start it's POST and UI is ready to communicate. @@ -700,13 +725,14 @@ /*! * \brief ApplicationController::onCryptSetupMount * \details It is the slot to handle _DeviceController::didCryptSetupMount signal. - * Tels the settings start initate. + * Tells the settings start initiate. */ void ApplicationController::onCryptSetupMount(bool vPass) { //DEBUG qDebug() << " ***** " << Q_FUNC_INFO << vPass; if ( ! vPass ) { _post.isDone(vPass); + LOG_APPED_PO(QString("Configuration partition encryption failed.")); alarmTrigger(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_SETTINGS_BAD); } // if ( vPass ) // it needs more investigation @@ -732,6 +758,7 @@ //DEBUG qDebug() << " ***** " << Q_FUNC_INFO; if ( ! vPass ) { _post.isDone(vPass); + LOG_APPED_PO(QString("Configuration treatment ranges failed.")); alarmTrigger(Gui::GuiAlarmID::ALARM_ID_HD_UI_POST_FAILURE_SETTINGS_BAD); } @@ -742,6 +769,7 @@ alarmTrigger (Gui::GuiAlarmID::ALARM_ID_NO_ALARM, true); // send queued fails postDoneRequest (); // send HD the POST result versionsRequest (); // send HD the version request + institutionalRequest (); // send HD the institutional record request emit didPOSTPass (_post.isDone( )); // GuiController -> GuiView : didPOSTPass(bool) }