From d334906cdb5ad988c9e3ad1e9827eab774d1a283 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 21 Jun 2015 20:49:42 +0200 Subject: use pen time, not host wall clock to store lastsync timestamp --- smartpen.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'smartpen.h') diff --git a/smartpen.h b/smartpen.h index 12ed898..18ac955 100644 --- a/smartpen.h +++ b/smartpen.h @@ -40,6 +40,8 @@ public: ~Smartpen(); typedef QPair Address; + typedef qint64 PenTime; + typedef quint64 PenId; bool isConnected() const; @@ -57,18 +59,19 @@ public: QString guid; QString className; QString title; + PenTime endTime; }; - QList getChangeList(const QDateTime &from = QDateTime()); + QList getChangeList(PenTime from = 0); - QByteArray getLspData(const QString &name, const QDateTime &from = QDateTime()); - QByteArray getPaperReplay(const QDateTime &from = QDateTime()); + QByteArray getLspData(const QString &name, PenTime from = 0); + QByteArray getPaperReplay(PenTime from = 0); - static qint64 toPenTime(const QDateTime &dt); - static QDateTime fromPenTime(qint64 t); + static PenTime toPenTime(const QDateTime &dt); + static QDateTime fromPenTime(PenTime t); - static QString toPenSerial(quint64 id); - static quint64 toPenId(const QString &serial); + static QString toPenSerial(PenId id); + static PenId toPenId(const QString &serial); public slots: bool connectToPen(const Address &addr); -- cgit v1.2.3