Age | Commit message (Collapse) | Author |
|
LoginJob
This is _almost_ a backwards-compatible change, except that connect*()
and other relevant methods in Connection are no more virtual (that
wasn't much useful anyway). Otherwise it's a matter of passing
initial_device_name to connectToServer(), saving device_id (along with
access_token) from the result of LoginJob and then passing device_id
(along with access_token, again) to connectWithToken() upon the next run.
|
|
LoginJob
This is _almost_ a backwards-compatible change, except that connect*()
and other relevant methods in Connection are no more virtual (that
wasn't much useful anyway). Otherwise it's a matter of passing
initial_device_name to connectToServer(), saving device_id (along with
access_token) from the result of LoginJob and then passing device_id
(along with access_token, again) to connectWithToken() upon the next run.
|
|
This is important for (soon to be added) LoginJob, since the server is
sensitive to getting an (even empty) entity for "medium" as opposed to
omitting it entirely. This cannot be addressed on the spec level; on the
other hand, removing empty parameters from the payload reduces useless
bytes getting on the wire.
|
|
|
|
Closes #102.
|
|
|
|
|
|
|
|
|
|
Notably:
* API for SendEventJob and SetRoomStateJob has been altered to accept references, not pointers.
* Methods on Room that invoke requests to the server, have lost const, because they may be reflecting the changed state on the fly, within themselves
|
|
Closes #38. Also rearranged #includes
|
|
|
|
Template function cannot have partial specializations, and we need to deserialise QVector<> objects. So fromJson<>() is now a wrapper around FromJson<> template class that does all the dispatching stuff in its operator().
|
|
Having to pass ConnectionData to each and every job class was nothing but boilerplate since the very beginning. Removing it required to prepend BaseJob::start() with ConnectionData-setting code, and to provide a way to alter the request configuration depending on the (late-coming) ConnectionData object. This is a new responsibility of BaseJob::start(); the previous BaseJob::start() contents have moved to BaseJob::sendRequest() (which is now invoked on retries, instead of start()).
|
|
Closes #38. Also rearranged #includes
|
|
|
|
This addresses the last bullet in KitsuneRal/gtad#10, completing the implementation.
|
|
|
|
Template function cannot have partial specializations, and we need to deserialise QVector<> objects. So fromJson<>() is now a wrapper around FromJson<> template class that does all the dispatching stuff in its operator().
|
|
|
|
|
|
Having to pass ConnectionData to each and every job class was nothing but boilerplate since the very beginning. Removing it required to prepend BaseJob::start() with ConnectionData-setting code, and to provide a way to alter the request configuration depending on the (late-coming) ConnectionData object. This is a new responsibility of BaseJob::start(); the previous BaseJob::start() contents have moved to BaseJob::sendRequest() (which is now invoked on retries, instead of start()).
|
|
|
|
|
|
|
|
|
|
Also: no reason to start the job timer if the request is not running, so don't even bother.
|
|
|
|
|
|
Your QT_LOGGING_RULES (especially useful with Qt 5.6 and newer) should
work a bit better now:
* "Job" prefix is no more needed because the Qt logging prefix
(libqmatrixclient.jobs) says it already;
* The "created" record didn't follow the logging category if overridden
from the concrete job class (see SyncJob); so instead of "created"
there's now much more useful "sending request" record.
|
|
It seems that some reply processing still might have happened after
BaseJob::abandon() (caused in turn by destroying a Connection object),
probably because the event from QNetworkReply landed in the event queue
after BaseJob::abandon() but before actual deletion of a job object. Now
countered by disconnecting from QNetworkReply signals in abandon() and
stop().
|
|
|
|
Also use scaledThumbnail() in User::requestAvatar()
|
|
|
|
Kicking and inviting use generated job classes. Rooms in Invite state are stored separately in the hash from those in Join/Leave state because The Spec says so. For clients, this means that the same room may appear twice in the rooms map if it's been left and then the user was again invited to it. The code in Quaternion that properly processes this will arrive shortly.
|
|
Actual usage will come with the next commit.
|
|
A cherry-pick from the kitsune-apigen branch; a family of toJson() and fromJson<>() functions to unify conversion of data back and forth.
|
|
|
|
Kicking and inviting use generated job classes. Rooms in Invite state are stored separately in the hash from those in Join/Leave state because The Spec says so. For clients, this means that the same room may appear twice in the rooms map if it's been left and then the user was again invited to it. The code in Quaternion that properly processes this will arrive shortly.
|
|
Actual usage will some with the next commit.
|
|
Commented out parts that aren't used yet; moved the whole 'env:' section down below (because it's used by Printer rather than Analyzer or Translator).
|
|
|
|
The previous version couldn't deal with containers of objects that have no implicit conversion to QJsonValue. The current one can.
|
|
This reverts commit da975f68f6a8503bf5466292dcdceed8c6f7fa6f.
|
|
|
|
|
|
|
|
|
|
|
|
|