aboutsummaryrefslogtreecommitdiff
path: root/smartpen.h
diff options
context:
space:
mode:
Diffstat (limited to 'smartpen.h')
-rw-r--r--smartpen.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/smartpen.h b/smartpen.h
index 18ac955..30c1f74 100644
--- a/smartpen.h
+++ b/smartpen.h
@@ -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