Age | Commit message (Collapse) | Author |
|
Running a request in background, aside from some tweaks on the network
layer (see QNetworkRequest::BackgroundRequestAttribute), allows to
distinguish jobs not immediately caused by user interaction (such as
fetching thumbnails). This can be used to show or not show certain
notifications in UI of clients.
Error reporting has been extended with more methods:
errorCaption() - a human-readable phrase calculated from the status
code; intended to be shown as a dialog caption and in similar
situations.
errorRawData() - former errorDetails(), returns the raw response from
the server.
errorUrl() - returns a URL that may be useful with the error (e.g. for
the upcoming "consent not given" error, this will have the policy URL).
Connection::resultFailed() - a new signal emitted when _any_
BaseJob::failure() is emitted (enables centralised error handling
across all network requests in clients).
As a part of matching changes in Connection, callApi has an overload
that allows to specify the policy; a custom enum instead of bool has
been chosen for the parameter type, to avoid clashes with (arbitrary)
types of job parameters.
|
|
The newly introduced statusChanged() signal allows clients to be
notified about the job state transitions.
|
|
There is no more BaseJob::kill() for a very long time; we have abandon()
instead, with a bit different meaning. Which, by the way, now emits
finished() because that's what finished() has been for.
|
|
Connection
(Note: this commit breaks back-compatibility.)
BaseJob::gotReply() had a bold assumption that whenever there's no reasonable JSON body in case of error, that meant IncorrectRequestError (which of course was incorrect). This led to syncs dying in Quaternion because it (correctly) considered IncorrectRequestError to be grave enough to not retry. Closes #206.
Also: don't dump the whole payload to logs, limit with initial 500 characters (closes #205)
|
|
|
|
|
|
|
|
|
|
With most recent GTAD.
|
|
QStringList's API is richer, after all.
|
|
QStringList's API is richer, after all.
|
|
|
|
Use std::unordered_map<> (now supported by GTAD and converters.h) for
that.
|
|
|
|
|
|
This is useful for things like tags map in m.tags event, or the map-of-maps-of-messages in SendToDeviceJob (coming in the next commit). Requires GTAD 0.4.9 or later.
|
|
The template part (not exposed in the auto-generated class) goes to Room::Private::requestSetState(). Also, Room::setMemberState() to interface with User class.
|
|
The latter one causes linkage errors when used from a template method (but not from a template class, puzzlingly).
|
|
According to KitsuneRal/gtad#31.
|
|
Enables responding to third-party invites.
|
|
|
|
1. Updates in this commit (see further) allow to generate and build
GetRoomEventsJob from message_pagination.yaml; this job completely
preempts RoomMessagesJob.
2. EventsBatch<> is no more a thing; there's EventsArray<> to replace it
but it's loaded from a JSON array rather than an event batch (a JSON
array inside another JSON object). SyncJob that used it extensively has
been moved to "conventional" containers (Events, RoomEvents and the
newly introduced StateEvents). RoomMessagesJob that also used
EventsBatch<> is decommissioned (see above).
3. RoomEventsRange is now an alias for Range<RoomEvents>, defined in
util.h (otherwise almost the same).
4. Connection::getMessages() is no more. Use Room::getPreviousContent()
and Connection::callApi<GetRooMEventsJob>() instead.
5. Moving things around in Room, since SyncJob now supplies state events
in more specific StateEvents, rather than RoomEvents.
|
|
cleanup
This should make generated jobs buildable across the whole CS API (sync.yaml is disabled as the manual implementation is still considerably better).
|
|
|
|
The type updates are a matter of pending PR to matrix-doc yet.
|
|
Variants are not yet supported but just in case, let's have the line, it's very obvious.
|
|
It's useless and misleading.
|
|
The type updates are a matter of pending PR to matrix-doc yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Qt Network error codes don't represent well some cases. Closes #200.
|
|
It slightly reduces the header interface and shortcuts the actual call chain (not that it had any performance implications, just easier reasoning).
|
|
QJsonObject()/QJsonValue()
It slightly reduces the header interface and shortcuts the actual call chain (not that it had any performance implications, just easier reasoning).
|
|
According to the most recent changes in GTAD.
|
|
|
|
So that DownloadFileJob could figure if it should save the incoming payload to the file or it's the JSON details about the error.
|
|
...instead of copying the whole QDebug object.
|
|
Closes #113.
|
|
It's been long overdue to separate them from the rest of the stuff (docs etc.). Also, this allows installing to a directory within the checked out git tree (say, ./install/, similar to ./build/).
|