From a69e97943539a8abc4d2762638c169dc19c88516 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 7 Jun 2015 21:22:45 +0200 Subject: initial import --- smartpensyncer.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 smartpensyncer.h (limited to 'smartpensyncer.h') diff --git a/smartpensyncer.h b/smartpensyncer.h new file mode 100644 index 0000000..6279485 --- /dev/null +++ b/smartpensyncer.h @@ -0,0 +1,39 @@ +#ifndef SMARTPENSYNCER_H +#define SMARTPENSYNCER_H + +#include +#include +#include "smartpen.h" + +class SmartpenSyncer : public QThread +{ + Q_OBJECT +public: + explicit SmartpenSyncer(const Smartpen::Address &addr, QObject *parent = 0); + ~SmartpenSyncer(); + + Smartpen::Address penAddress() const; + +signals: + +public slots: + void abort(); + +private: + void run(); + bool syncPen(); + bool syncNotebook(const Smartpen::ChangeReport &change); + bool extractZip(QByteArray &zipData, QDir &dir); + +private: + Smartpen::Address _addr; + Smartpen *_pen; + bool _errored; + bool _aborted; + + QString _penSerial; + QString _penName; + QDir _penDataDir; +}; + +#endif // SMARTPENSYNCER_H -- cgit v1.2.3