diff options
author | Javier <dev.git@javispedro.com> | 2015-06-07 21:22:45 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-06-07 21:22:45 +0200 |
commit | a69e97943539a8abc4d2762638c169dc19c88516 (patch) | |
tree | f3516ea29745db65971247cee4c260b49f1067b2 /smartpensyncer.h | |
download | scribiu-a69e97943539a8abc4d2762638c169dc19c88516.tar.gz scribiu-a69e97943539a8abc4d2762638c169dc19c88516.zip |
initial import
Diffstat (limited to 'smartpensyncer.h')
-rw-r--r-- | smartpensyncer.h | 39 |
1 files changed, 39 insertions, 0 deletions
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 <QtCore/QThread> +#include <QtCore/QDir> +#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 |