Index: sources/cloudsync/CloudSyncController.h =================================================================== diff -u -r9ae3b0d6624904693329309aaf8ff02784c17184 -re60d099fd4fbada632a974b9fc95d4d2c9652b1a --- sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 9ae3b0d6624904693329309aaf8ff02784c17184) +++ sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision e60d099fd4fbada632a974b9fc95d4d2c9652b1a) @@ -17,6 +17,7 @@ // Qt #include #include +#include // Project #include "main.h" // Doxygen : do not remove @@ -46,8 +47,29 @@ QThread *_thread = nullptr; bool _init = false; - const QString _location = "cloudsync/"; + const int _interval = 1000; // 1s + const QString _location = QString(Storage::SDCard_Base_Path_Name) + "cloudsync/"; + const char* _out_File = "out.buf"; // The base file name : CloudSync puts its output to this file + const char* _inp_File = "inp.buf"; // The base file name : UI Software puts the input data for the CloudSync in this file + QString _date_out_File = ""; // The dated/actual filename : CloudSync puts its output to this file + QString _date_inp_File = ""; // The dated/actual filename : UI Software puts the input data for the CloudSync in this file + QDateTime _datetime ; + + QString _dateFormatted ; + QString _timeFormatted ; + + const char* _dateFormat = "yyyy_MM_dd" ; // date used in the file name + const char* _timeFormat = "HH:mm:ss.zzz"; // timestamp in the file + + const char _dateSeparator = '_'; // used in filename + const char _separator = ','; + + quint64 _seq = 0; + +protected: + void timerEvent(QTimerEvent *event) override; + public slots: bool init(); bool init(QThread &vThread); @@ -64,6 +86,8 @@ void initThread(QThread &vThread); void quitThread(); + void checkDate(); void addWatch(); bool interpreter(const QString &vContent); // this function may later need to be a class. + bool sendOutBuff(const QString &vData); };