diff options
author | Javier <dev.git@javispedro.com> | 2020-04-12 00:45:32 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2020-04-12 01:24:39 +0200 |
commit | 5cb277888995edecfafd83fed4cf2bd510052a4b (patch) | |
tree | 9c94054e59035eece0e34e8be10ee77769b1d9e4 /smartpen.h | |
parent | 7f3d796c50b1855e690f74b35fd35798142ceb35 (diff) | |
download | scribiu-5cb277888995edecfafd83fed4cf2bd510052a4b.tar.gz scribiu-5cb277888995edecfafd83fed4cf2bd510052a4b.zip |
port to qt5, libusb 1.0, and openobex 1.7
Diffstat (limited to 'smartpen.h')
-rw-r--r-- | smartpen.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -73,12 +73,14 @@ public: static QString toPenSerial(PenId id); static PenId toPenId(const QString &serial); + static bool reset(const Address &addr); + public slots: bool connectToPen(const Address &addr); void disconnectFromPen(); signals: - void error(); + void linkError(const QString &msg); private: static void obexEventCb(obex_t *handle, obex_object_t *obj, @@ -86,17 +88,25 @@ private: void handleObexEvent(obex_object_t *object, int event, int obex_cmd, int obex_rsp); void handleObexRequestDone(obex_object_t *object, int obex_cmd, int obex_rsp); + void handleObexContinue(obex_object_t *object, int obex_cmd); + + void prepareRequest(); + bool waitForRequestComplete(int timeout); + void addConnHeader(obex_object_t *object) const; + bool sendContinue(int obex_cmd); static QString toPenSerialSegment(quint32 id, int len); static quint32 fromPenSerialSegment(const QString &s); static QByteArray encodeUtf16(const QString &s); - void addConnHeader(obex_object_t *object) const; + private: obex_t * _obex; quint32 _connId; QByteArray _inBuf; + bool _reqComplete; + uint _continueReceived; }; #endif // SMARTPEN_H |