aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/syncjob.h
AgeCommit message (Collapse)Author
2021-01-16Updated copyright statements upon Git auditKitsune Ral
After going through all the files and the history of commits on them it was clear that some copyright statements are obsolete (the code has been overwritten since) and some are missing. This commit tries best to remedy that, along with adding SPDX tags where they were still not used. Also, a minimal SPDX convention is documented for further contributions. Closes #426.
2020-12-26Port existing copyright statement to reuse using licensediggerCarl Schwan
2020-06-07BaseJob: jsonData() and prepareResult/Error()Kitsune Ral
* JSON response is stored internally in BaseJob, rather than passed around virtual response handlers. This allow to lazily deserialise parts of the JSON response when the client calls for them instead of deserialising upon arrival and storing POD pieces. This is incompatible with the current generated code, so temporarily FTBFS. * BaseJob::loadFromJson() and BaseJob::takeFromJson() have been added to facilitate picking parts of the result as described above in derived job classes. * BaseJob::jsonData(), BaseJob::jsonItems() and (protected) BaseJob::reply() for direct access to the response in its various forms. * To further eliminate boilerplate code in generated job classes, a group of *ExpectedKeys() methods has been added - this allows to reflect the API definition of required response keys in a more "declarative" way, delegating validation to BaseJob. * parseReply() and parseJson() pair turns to singular prepareResult(). Thanks to all the changes above, in most cases it will not need overriding, unlike before. * BaseJob::Private::parseJson() is introduced, to wrap QJsonDocument::parseJson() into something less verbose. This serves a completely different purpose to the former BaseJob::parseJson(). * BaseJob::doCheckReply() takes the place, and the name, of checkReply().
2019-08-09Namespace: QMatrixClient -> Quotient (with back comp alias)Kitsune Ral
2019-08-02Apply the new brace wrapping to source filesKitsune Ral
2019-06-24Merge branch 'master' into clang-formatKitsune Ral
# Conflicts: # CMakeLists.txt # lib/avatar.cpp # lib/connection.cpp # lib/connection.h # lib/connectiondata.cpp # lib/csapi/account-data.cpp # lib/csapi/account-data.h # lib/csapi/capabilities.cpp # lib/csapi/capabilities.h # lib/csapi/content-repo.cpp # lib/csapi/create_room.cpp # lib/csapi/filter.cpp # lib/csapi/joining.cpp # lib/csapi/keys.cpp # lib/csapi/list_joined_rooms.cpp # lib/csapi/notifications.cpp # lib/csapi/openid.cpp # lib/csapi/presence.cpp # lib/csapi/pushrules.cpp # lib/csapi/registration.cpp # lib/csapi/room_upgrades.cpp # lib/csapi/room_upgrades.h # lib/csapi/search.cpp # lib/csapi/users.cpp # lib/csapi/versions.cpp # lib/csapi/whoami.cpp # lib/csapi/{{base}}.cpp.mustache # lib/events/accountdataevents.h # lib/events/eventcontent.h # lib/events/roommemberevent.cpp # lib/events/stateevent.cpp # lib/jobs/basejob.cpp # lib/jobs/basejob.h # lib/networkaccessmanager.cpp # lib/networksettings.cpp # lib/room.cpp # lib/room.h # lib/settings.cpp # lib/settings.h # lib/syncdata.cpp # lib/user.cpp # lib/user.h # lib/util.cpp
2019-03-02style: apply .clang-format to all .cpp and .h filesMarc Deop
2018-12-08SyncJob: accept Filter instead of QString for the filterKitsune Ral
2018-11-20Make SyncData more self-contained and prepare for cache splittingKitsune Ral
SyncData now resides in its own pair of files and is capable to load either from file or from JSON. There is also (yet untested) capability to load rooms from files if a file name stands is the value for a given room id. This allows to store the master cache file separately from cache files for each room, massively easing the problem of bulky accounts that can overflow the poor capacity of Qt's JSON engine.
2018-07-04Break down event.* into smaller filesKitsune Ral
We now have event.*, roomevent.*, stateevent.* and eventloader.h. If you only use event leaf-classes (such as RoomMemberEvent) you shouldn't notice anything.
2018-06-08SyncJob: Support receiving to_device and presence eventsKitsune Ral
2018-05-03GetRoomEventsJob (replaces RoomMessagesJob) + refactoringKitsune Ral
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.
2018-03-31Move source files to a separate folderKitsune Ral
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/).