aboutsummaryrefslogtreecommitdiff
path: root/connection.cpp
AgeCommit message (Collapse)Author
2018-03-05Use constants instead of hardcoded stringsKitsune Ral
2018-03-05Fix a typo leading to cache never workingKitsune Ral
2018-03-04Connection: allow to choose between binary and text JSON cacheKitsune Ral
2018-03-04QCoreApplication::processEvents() is static, doesn't need instance()Kitsune Ral
Thanks to clang-tidy for spotting that.
2018-03-03Caching: switching to binary JSON format; yield to event loop while making a ↵Kitsune Ral
cache payload
2018-03-01Connection::tagNames()Kitsune Ral
To be able to get all available tags throughout the connection.
2018-02-28Don't resolve the homeserver port from a user MXIDKitsune Ral
Closes #176. The right way (c) of server name resolution will be done in #178 (see also the Google Doc mentioned in it).
2018-02-28Profiling logs: added µs, less empty profiling log linesKitsune Ral
Closes #177.
2018-02-27Room: Save tags in the cache; isFavourite() and isLowPriority()Kitsune Ral
2018-02-26Deal with memory more carefullyKitsune Ral
Plugs some memory leaks reported by Valgrind.
2018-02-26Room and Connection: support room tagsKitsune Ral
Closes #134.
2018-01-31Connection::createdRoom() signalKitsune Ral
2018-01-30Connection: expose the list of users; use an ordered mapKitsune Ral
It's still an open question whether it's better to store a separate sorted index of users, next to an unsorted one; but a sorted list of users is of much more use in GUI than an unsorted one.
2018-01-30Connection: more Q_PROPERTYs, newUser signalKitsune Ral
2018-01-30Connection::createRoom and Connection::createDirectChatKitsune Ral
2018-01-30Connection class cleanupKitsune Ral
createRoom and createUser renamed to roomFactory and userFactory (because createRoom will mean a different thing); unneeded #include moved to the cpp file.
2018-01-30Connection::onSyncSuccess: call processEvents upon each room parsingKitsune Ral
When there are too many rooms to process, this gives at least some bandwidth for the GUI in the meantime.
2018-01-25Merge branch 'kitsune-better-forget'Kitsune Ral
2018-01-25Connection: intercept late-coming /sync response on a just forgotten roomKitsune Ral
Closes #160.
2018-01-25Connection::provideRoom: assert no empty idsKitsune Ral
Bonus: slightly more accurate comment in Connection::forgetRoom
2018-01-25Room::toJson: fix invite state cachingKitsune Ral
Causes a cache version upgrade; the old cache stores the state in an incorrect place that won't be supported. Closes #159.
2018-01-25Connection::forgetRoom: Support forgetting invites tooKitsune Ral
Closes #157.
2018-01-24Fix dangling referencesKitsune Ral
2018-01-24splitMediaId: fix typos in the assertion failure messageKitsune Ral
2018-01-22splitMediaId: better assertion failure messageKitsune Ral
2018-01-14Connection: files up/downloading supportKitsune Ral
2018-01-14Connection::getThumbnail: Add an overload for QStringKitsune Ral
Connection::getThumbnail(QString,...) is better fitting to retrieve images for QML image providers - one doesn't need to create a QUrl (which if made naively ends up being incorrect) and also doesn't need to stack up "mxc://" before the mediaId. Just call Connection::getThumbnail with the id the QML engine gives you.
2018-01-09Fix an occasional crash when resolving a server nameKitsune Ral
Closes #149.
2017-12-29Use std::unique_ptr instead of bare pointers; cleanup stale declarationsKitsune Ral
2017-12-25Connection: Be more accurate with lambda capturesKitsune Ral
2017-12-21Connection::logout: supply receiver to connect(job,...)Kitsune Ral
2017-12-20Connection::accessToken - return QByteArray instead of QStringKitsune Ral
Because that's what it really is.
2017-12-19Don't use LoginJob::homeServer() anymoreKitsune Ral
Because the respective parameter in /login result is deprecated. Closes #137.
2017-12-16Connection: proactively create a Room object upon joining a roomKitsune Ral
So that clients could start using this object without waiting for the next sync.
2017-12-10Use the generated PostReceiptJob; don't compile unused job classesKitsune Ral
Rewire Connection::postReceipt() to the generated job too; this call is still deprecated though.
2017-12-10Log room creation only onceKitsune Ral
2017-12-10Fix setting the homeserver hostname (not URL) coming from /loginKitsune Ral
2017-12-07Connection: no more default to matrix.org; update HS URL from /login responseKitsune Ral
2017-12-07Generated jobs: Apply naming convention to parametersKitsune Ral
It's now camelCase everywhere, even if The Spec uses snake_case (it is not consistent in that respect).
2017-11-26Make connectToServer/connectWithToken auto-resolve HS if neededKitsune Ral
"Needed" means when the current HS URL is invalid even by its outlooks. If it is just inaccessible, no attempt to fix things will be made. This breaks compatibility with previous library behaviour because connectWithToken historically has been fully synchronous and clients depend on that. connectWithToken _may_ work synchronously if HS URL is good enough; but this is no more guaranteed. Moreover, in the future the server will be probed via /versions before working, so connectWithToken will become entirely asynchronous.
2017-11-25Make Connection::resolveServer() work as it shouldKitsune Ral
Closes #119; many thanks to @r0kk3rz for prodding me into that.
2017-11-22Use unique_ptr for connectionDataKitsune Ral
2017-11-16Require state_key to be present in all state eventsKitsune Ral
This impacts the cache as well, as we don't save state_keys for most state events.
2017-11-16Automate cache resetsKitsune Ral
The idea is simple: store a version in the cache; if, upon the next load, the (major) version is too old, the cache is discarded. The currently used version values (0.0) do not discard the cache; but the next commit will bump the (major) version.
2017-11-02Document room transitions in .h instead of .cppKitsune Ral
The original comment got a bit rotten, so refresh it as well.
2017-10-31Fix Connection::deviceId(): Q_INVOKABLE is incompatible with referencesKitsune Ral
2017-10-27Put access token to headers instead of queryKitsune Ral
2017-10-19Introduce device_id and initial_device_name support; switch to generated ↵Kitsune Ral
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.
2017-10-15Connection::forgetRoom(): Minor fixesKitsune Ral
2017-10-14LogoutJob is supplied by generated codeKitsune Ral