Index: sources/device/DeviceController.h =================================================================== diff -u -rfc329c788fe9453983072bee937ccbc95b4ed6e4 -r9ae3b0d6624904693329309aaf8ff02784c17184 --- sources/device/DeviceController.h (.../DeviceController.h) (revision fc329c788fe9453983072bee937ccbc95b4ed6e4) +++ sources/device/DeviceController.h (.../DeviceController.h) (revision 9ae3b0d6624904693329309aaf8ff02784c17184) @@ -17,14 +17,14 @@ // Qt #include #include +#include "QFileSystemWatcher" // Project #include "main.h" // Doxygen : do not remove #include "Threads.h" #include "DeviceGlobals.h" #include "DeviceModels.h" #include "DeviceError.h" - // Define #define _DeviceController Device::DeviceController::I() @@ -71,6 +71,8 @@ bool _pauseSpaceCheck = false; + QFileSystemWatcher _fileSystemWatcher; + DEVICE_DEV_DEFINITION_LIST public slots: @@ -101,6 +103,8 @@ bool checkError(DeviceError::Scripts_Error_Enum vError, TModel &vModel,QString vExtraLogInfo = ""); DeviceError::Scripts_Error_Enum checkScript(QString &vScript, const QString &vShellScript); + bool addWatch(const QString &vFilePath); + signals: /*! * \brief didScreenshot @@ -159,6 +163,8 @@ void didActionReceive( const DeviceBrightnessResponseData &vBrightness ); + void didWatchFileChange(const QString &vFile); + private slots: // ----- USB void usbCheck(); @@ -170,7 +176,11 @@ void onUSBDriveUmount(); + void onWatchFileChanged(const QString &vFile); + // ----- SDCard void sdcardSpaceCheck(); + + SAFE_CALL_EX(doAddWatch, const QString &) }; }