diff options
Diffstat (limited to 'src/TcpTasks/Updater/syncupdater.h')
| -rw-r--r-- | src/TcpTasks/Updater/syncupdater.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/TcpTasks/Updater/syncupdater.h b/src/TcpTasks/Updater/syncupdater.h new file mode 100644 index 0000000..9bd2299 --- /dev/null +++ b/src/TcpTasks/Updater/syncupdater.h @@ -0,0 +1,33 @@ +#ifndef SYNCUPDATER_H +#define SYNCUPDATER_H + +#include <QTimer> +#include <QHostInfo> + +#include "Core/CoreObject/coreobject.h" +#include "Database/Common/commonactions.h" +#include "TcpTasks/SyncClient/syncclient.h" + +class SyncUpdater: public QObject +{ + Q_OBJECT +public: + SyncUpdater(const QSharedPointer<CoreObject> &coreObject); + bool scheduleUpdater(); + +private: + QSharedPointer<CoreObject> _coreObject; + const int _graceTime_ms = 5000; + + // update/ticker timer + QTimer _updaterTimer; + QTimer _syncTicker; + + // index + int _syncIndex = 0; + +private slots: + void onSyncTickerAction(); +}; + +#endif // SYNCUPDATER_H |
