Index: sources/ApplicationController.h =================================================================== diff -u -r20b370a54d2737831b307a0de82aec9e06e2b772 -r99cf0dc3002c0395f0d10d1d4fb34e2052449fd6 --- sources/ApplicationController.h (.../ApplicationController.h) (revision 20b370a54d2737831b307a0de82aec9e06e2b772) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision 99cf0dc3002c0395f0d10d1d4fb34e2052449fd6) @@ -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.h - * \author (last) Behrouz NematiPour - * \date (last) 19-Dec-2022 + * \author (last) Dara Navaei + * \date (last) 26-Mar-2024 * \author (original) Behrouz NematiPour * \date (original) 26-Aug-2020 * @@ -55,7 +55,8 @@ QThread *_thread = nullptr; bool _init = false; - QFutureWatcher _settingsWatcher; + QFutureWatcher _settingsWatcher; + int _settingsError = 0; ApplicationPost _post; // I may need to be put in a concurrent. @@ -76,14 +77,18 @@ void initThread(QThread &vThread); void quitThread(); + void initSetttings(); + void keepAlive(); void createFakeSequencedLongMessage (QVariantList &vData, const int vFakeDataLen); void createFakeSeqAtBeginLongMessage(QVariantList &vData, const int vFakeDataLen); - void settingsInit(); + void postDoneRequest(); + void versionsRequest(); + void institutionalRequest(); - void versionsRequest(bool vPass); + void alarmTrigger (Gui::GuiAlarmID vAlarmID, bool vSend = false, bool vSingle = false); private slots: // Should be private for thread safety and is connected internally. void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG @@ -100,6 +105,8 @@ void onSDCardSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent); void onSDCardSpaceTooLow(quint8 vAvailablePercent); + void onCryptSetupMount (bool vPass); + void onExportLog (const GuiStringIndexMap &vExportList); void onExportService (const GuiStringIndexMap &vExportList); void onExportTreatment (const GuiStringIndexMap &vExportList); @@ -108,20 +115,36 @@ void onFailedTransmit(Sequence seq); - void onSettingsInit(); void onSettingsUpdate(); + void onOSVersion (bool vPass); + void onPOSTEthernet (bool vPass); void onPOSTWiFi (bool vPass); void onPOSTBluetooth (bool vPass); void onPOSTCloudSync (bool vPass); void onPOSTFail (Gui::GuiAlarmID vAlarmID); void onPOSTDone (bool vPass); + void onQuitApplication (); + + void onLogIOFail(); + + void onTreatmentRangesDone(bool vPass); + signals: - void didPOSTWiFi (bool vPass); + void didPOSTOSVersion (bool vPass); + void didPOSTEthernet (bool vPass); + void didPOSTWireless (bool vPass); void didPOSTBluetooth (bool vPass); void didPOSTCloudSync (bool vPass); + + void didPOSTOSVersionData (const QString &vOSVersion ); + void didPOSTEthernetData (const QString &vMacAddress); + void didPOSTWirelessData (const QString &vMacAddress); + void didPOSTBluetoothData (const QString &vMacAddress); + void didPOSTCloudSyncData (const QString &vNetAddress); + void didPOSTDone (bool vPass); signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG @@ -151,6 +174,26 @@ * \details This signal will be emitted when the settings are read and ready to be used. */ void didSettingsDone (); + /*! + * \brief didPOSTPass + * \details This signal will be emitted when UI is done with the POST and will let other layers to know the result. + * As an example the Manufacturing or update will not start if the POST failed since it needs POST info for the Encrypted partition. + * \param vPass - true if passed. + */ + void didPOSTPass (bool vPass); + /*! + * \brief didKeepAliveBegin + * \details this signal will be emitted by ApplicationController + * when it is done with all the messaging and has nothing to say + * just to keep the conversation alive and let HD know UI is alive. + */ + void didKeepAliveBegin (); + /*! + * \brief didQuitApplication + * \details this signal is a placeholder for any farther notification to any class which needs to close itself. + * it will be used to let the other classes to stop and move to main thread. + */ + void didQuitApplication (); // Device Signal/Slots DEVICE_APP_BRIDGE_DEFINITION_LIST @@ -160,7 +203,7 @@ ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS ACTION_RECEIVE_PRIVATE_SLOT_NOEMIT(UIPostFinalResultHDRequestData) { - onPOSTDone(_post.isDone()); + postDoneRequest(); emit didActionReceive(vData); }