Index: sources/device/DeviceController.h =================================================================== diff -u -rc73feffa73c7fe073a7a7581144f5806dfc91beb -rdff4ac319c6619a1ccb894c7d6079e8e4a46b776 --- sources/device/DeviceController.h (.../DeviceController.h) (revision c73feffa73c7fe073a7a7581144f5806dfc91beb) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision dff4ac319c6619a1ccb894c7d6079e8e4a46b776) @@ -7,7 +7,7 @@ * * \file DeviceController.h * \author (last) Behrouz NematiPour - * \date (last) 19-Dec-2022 + * \date (last) 18-Jul-2023 * \author (original) Behrouz NematiPour * \date (original) 03-Jun-2021 * @@ -100,7 +100,6 @@ bool _mounted = false; bool _umounted = false; bool _removed = false; - const char *_usbDrive = ""; const int _interval = 1000; // in ms const qint8 _minRequiredAvailableSpacePercent = 10; @@ -113,7 +112,11 @@ QString _macEthernet = ""; QString _macWireless = ""; QString _macBluetooth = ""; + QString _netCloudSync = ""; + bool _hasThread = false; + bool _hasSalt = false; + //TODO: all of these should use the TimesProcess (instead of QProcess) // to be able to kill the process automatically after the set time out. DEVICE_DEV_DEFINITION_LIST @@ -131,8 +134,22 @@ void onUSBDriveUmount(); void onWatchFileChanged(const QString &vFile); - void onPOSTInformationReady(const QString &vMacEthernet, const QString &vMacWireless, const QString &vMacBluetooth); + void onEventThreadChange (); + + /*! + * \brief didPOSTData + * \details These signals will be emitted when UI is done with the POST and will let DeviceView update its property(ies). + * \param vMacEthernet - Ethernet Mac Adress + * \param vMacWireless - Wireless Mac Adress + * \param vMacBluetooth - Bluetooth Mac Adress + * \param vNetCloudSync - CloudSync IP Adress + */ + void onPOSTEthernetData (const QString &vMacAddress); + void onPOSTWirelessData (const QString &vMacAddress); + void onPOSTBluetoothData (const QString &vMacAddress); + void onPOSTCloudSyncData (const QString &vNetAddress); + protected: void timerEvent(QTimerEvent *) override; @@ -152,6 +169,8 @@ bool addWatch(const QString &vFilePath); + void checkConfugurationMountReady(); + signals: /*! * \brief didScreenshot @@ -211,28 +230,45 @@ */ void didSDCardSpaceTooLow(quint8 vAvailablePercent); - void didActionReceive( const DeviceBrightnessResponseData &vBrightness ); + void didActionReceive( const DeviceBrightnessResponseData &vBrightness ); + void didActionReceive( const DeviceRootSSHAccessResponseData &vRootSSHAccess); void didWatchFileChange(const QString &vFile); /*! - * \brief didPOSTReady - * \details This signal will be emitted when UI is done with the POST and will let DeviceView update its property(ies). - * \param vMacEthernet - Ethernet Mac Adress - * \param vMacWireless - Wireless Mac Adress - * \param vMacBluetooth - Bluetooth Mac Adress + * \brief didEventThreadChange + * \details this signal will be emitted when the curr */ - void didPOSTInformationReady(const QString &vMacEthernet, const QString &vMacWireless, const QString &vMacBluetooth); + void didEventThreadChange (QPrivateSignal); + void didPOSTEthernetData (const QString &vMacAddress); + void didPOSTWirelessData (const QString &vMacAddress); + void didPOSTBluetoothData (const QString &vMacAddress); + void didPOSTCloudSyncData (const QString &vNetAddress); + + /*! + * \brief didCryptSetupMount + * \details will be emitted when decrypting the configuration partition is. + * to notify the ApplicationController to call initSettings + */ + void didCryptSetupMount ( bool vPass ); + /*! + * \brief didFactoryReset + * \details will be emitted when the factory reset is done, + * to notify the CloudSyncController to do the FactoryReset/TokenRemoval. + * \param vPass + */ + void didFactoryReset ( bool vPass ); + private: // ----- USB - void usbCheck(); + void usbCheck (); + void usbError (const QString &vDevice ); + void usbMountReq(const QString &vDevice, bool vIsMount = true ); + void usbMount (const QString &vDevice ); + void usbUmount (const QString &vDevice ); + void usbRemove (); - bool usbMount (const QString &vDevice); - bool usbUmount(const QString &vDevice); - void usbRemove(); - void usbError (const QString &vDevice); - void sdcardSpaceCheck(); void usbSpaceCheck();