aboutsummaryrefslogtreecommitdiff
path: root/lib/events/callanswerevent.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-05 18:09:12 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-07 08:45:58 +0200
commit21c04d5b035cec0b6378e60acc93523f52c1c973 (patch)
treeb2845f78bbceb2c545fa3ff872abc31d4061f51d /lib/events/callanswerevent.h
parenteccab6df7003bb9c20c48dfe0af57502383ba42e (diff)
downloadlibquotient-21c04d5b035cec0b6378e60acc93523f52c1c973.tar.gz
libquotient-21c04d5b035cec0b6378e60acc93523f52c1c973.zip
BaseJob: jsonData() and prepareResult/Error()
* 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().
Diffstat (limited to 'lib/events/callanswerevent.h')
0 files changed, 0 insertions, 0 deletions