Index: sources/device/DeviceController.h =================================================================== diff -u -r2467780df22b7fdfb309612abe987d116a657327 -r14cd1c61c1b956e7605d63be7450657817d17355 --- sources/device/DeviceController.h (.../DeviceController.h) (revision 2467780df22b7fdfb309612abe987d116a657327) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision 14cd1c61c1b956e7605d63be7450657817d17355) @@ -51,8 +51,9 @@ private slots: void onFinish(int) { killTimer(_pid); + emit _process->finished(-1, QProcess::CrashExit); _process->kill(); - _process = nullptr; + _process->deleteLater(); deleteLater(); } public: @@ -64,10 +65,13 @@ void start() { #ifdef BUILD_FOR_DESKTOP qDebug() << "DeviceController.TimedProcess: " << _timeout << _command << _arguments; -#else + QFileInfo fileInfo(_command); + QString path = fileInfo.absolutePath(); + QString name = "empty.sh"; + _command = QString("%1/%2").arg(path, name); +#endif _pid = startTimer(_timeout); _process->start(_command, _arguments); -#endif } protected: @@ -186,6 +190,9 @@ void findPendingLogs(); + bool logBackup(const QString &vFileName); + bool logUpload(const QString &vFileName); + signals: /*! * \brief didScreenshot @@ -290,21 +297,47 @@ * 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. + * \details will be emitted when the Factory Reset is done, + * to notify the CloudSyncController to do the Factory Reset/Logs Removal. * \param vPass */ void didFactoryReset ( bool vPass ); /*! + * \brief didDecommissioning + * \details will be emitted when the Decommissioning is done, + * to notify the CloudSyncController to do the Decommissioning/TokenRemoval. + * \param vPass + */ + void didDecommissioning ( bool vPass ); + + /*! * \brief didPendingLog * \details will be emitted when a log file is pending to be uploaded. * \param vFileName - the pending log file name */ void didPendingLog (const QString &vFileName, const QString vChecksum ); + /*! + * \brief logBackup + * \details notification of the log back up complete (either case of pass or fail) + * \param vFileName - file name to backup + * \param vPass - false if the backup failed. + * \return void + */ + void didLogBackup ( bool vPass, const QString &vFileName ); + + /*! + * \brief didLogUpload + * \details notification of pending log upload file rename complete (rename and remove the 'u.' (pending sub-ext)) + * \param vPass - true if the pending log file name rename was successful. + * \param vFileName - the pending log file name (meaning it includes 'u.' ) + */ + void didLogUpload ( bool vPass, const QString &vFileName ); + private: // ----- USB void usbCheck ();