diff options
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/connection.h b/lib/connection.h index cfad8774..32533b6e 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -280,7 +280,7 @@ namespace QMatrixClient * to be QML-friendly. Empty parameter means using a path * defined by stateCachePath(). */ - Q_INVOKABLE void loadState(const QUrl &fromFile = {}); + Q_INVOKABLE void loadState(); /** * This method saves the current state of rooms (but not messages * in them) to a local cache file, so that it could be loaded by @@ -290,7 +290,10 @@ namespace QMatrixClient * QML-friendly. Empty parameter means using a path defined by * stateCachePath(). */ - Q_INVOKABLE void saveState(const QUrl &toFile = {}) const; + Q_INVOKABLE void saveState() const; + + /// This method saves the current state of a single room. + void saveRoomState(Room* r) const; /** * The default path to store the cached room state, defined as @@ -461,7 +464,8 @@ namespace QMatrixClient CreateRoomJob* createDirectChat(const QString& userId, const QString& topic = {}, const QString& name = {}); - virtual JoinRoomJob* joinRoom(const QString& roomAlias); + virtual JoinRoomJob* joinRoom(const QString& roomAlias, + const QStringList& serverNames = {}); /** Sends /forget to the server and also deletes room locally. * This method is in Connection, not in Room, since it's a @@ -518,7 +522,7 @@ namespace QMatrixClient * a successful login and logout and are constant at other times. */ void stateChanged(); - void loginError(QString message, QByteArray details); + void loginError(QString message, QString details); /** A network request (job) failed * @@ -536,11 +540,11 @@ namespace QMatrixClient * @param retriesTaken - how many retries have already been taken * @param nextRetryInMilliseconds - when the job will retry again */ - void networkError(QString message, QByteArray details, + void networkError(QString message, QString details, int retriesTaken, int nextRetryInMilliseconds); void syncDone(); - void syncError(QString message, QByteArray details); + void syncError(QString message, QString details); void newUser(User* user); @@ -673,7 +677,7 @@ namespace QMatrixClient /** * Completes loading sync data. */ - void onSyncSuccess(SyncData &&data); + void onSyncSuccess(SyncData &&data, bool fromCache = false); private: class Private; |