aboutsummaryrefslogtreecommitdiff
path: root/connection.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-03-28 01:58:16 +0900
committerGitHub <noreply@github.com>2017-03-28 01:58:16 +0900
commit781278b3358e63359b54deb16b0c7ac8bf95df7c (patch)
tree8c0755f6ee801a4f438df25fc2927966a00d4813 /connection.h
parent57980b04c1a9d8bde974683fbae892580aee7466 (diff)
parent6895d14865c44b6dd6cf138a6a7413c6337b9802 (diff)
downloadlibquotient-781278b3358e63359b54deb16b0c7ac8bf95df7c.tar.gz
libquotient-781278b3358e63359b54deb16b0c7ac8bf95df7c.zip
Merge pull request #56 from Fxrh/kitsune-retry-on-some-errors
Jobs retry functionality for recoverable errors
Diffstat (limited to 'connection.h')
-rw-r--r--connection.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/connection.h b/connection.h
index 55b688a2..849106a1 100644
--- a/connection.h
+++ b/connection.h
@@ -54,6 +54,7 @@ namespace QMatrixClient
Q_INVOKABLE virtual void logout();
Q_INVOKABLE virtual void sync(int timeout=-1);
+ Q_INVOKABLE virtual void stopSync();
/** @deprecated Use callApi<PostMessageJob>() or Room::postMessage() instead */
Q_INVOKABLE virtual void postMessage( Room* room, QString type, QString message );
/** @deprecated Use callApi<PostReceiptJob>() or Room::postReceipt() instead */
@@ -71,6 +72,8 @@ namespace QMatrixClient
/** @deprecated Use accessToken() instead. */
Q_INVOKABLE QString token() const;
Q_INVOKABLE QString accessToken() const;
+ Q_INVOKABLE SyncJob* syncJob() const;
+ Q_INVOKABLE int millisToReconnect() const;
template <typename JobT, typename... JobArgTs>
JobT* callApi(JobArgTs... jobArgs)
@@ -91,8 +94,9 @@ namespace QMatrixClient
void joinedRoom(Room* room);
void loginError(QString error);
- void connectionError(QString error);
+ void networkError(size_t nextAttempt, int inMilliseconds);
void resolveError(QString error);
+ void syncError(QString error);
//void jobError(BaseJob* job);
protected: