aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-30Room::timelineSize() convenience methodKitsune Ral
2017-10-27Put access token to headers instead of queryKitsune Ral
2017-10-27Fix room avatars getting lost after restarting QuaternionKitsune Ral
2017-10-27Support m.room.avatar eventsKitsune Ral
The events are detected in /sync output, and avatars for rooms are loaded from respective URLs. Clients can use Room::avatar() method to request a pixmap of a certain size, and react to avatarChanged() in order to update the UI when new pixmaps/avatars arrive. avatarChanged() signal is overloaded with two tasks - the first firing merely indicates that a new avatar is available (without actual pixmap yet available) while the second firing means that an actual pixmap has arrived (all this is entirely transparent for clients, they just should update their pixmaps from Room::avatar() every time when Room::avatarChanged() is emitted).
2017-10-27Fixed building with qmakeKitsune Ral
2017-10-26Move out the avatar code from UserKitsune Ral
Avatars are also a property of rooms, and the supporting code is basically the same. The only thing different will be emitted signals, and the cleanest thing to support that (aside from making Avatar a QObject) seems to be to parameterise the thumbnail-updating logic with a continuation invoked upon completion of the thumbnail job.
2017-10-26Move out common message event content classesKitsune Ral
ImageContent is usable outside of m.room.message (in particular, m.room.avatar uses the same structure for content. And EventContent::Base is very suitable to derive from even for standard event content structures (such as in room name events), let alone non-standard ones. Also, renamed MessageEventContent to EventContent (for obvious reasons).
2017-10-25Fixed a typo in the logsKitsune Ral
2017-10-24Support inheritance in data structuresKitsune Ral
2017-10-20Better support of qmakeKitsune Ral
qmc-example.pro added; better CONFIG for libqmatrixclient; refreshed files list. Closes #104
2017-10-20CleanupKitsune Ral
2017-10-20Merge pull request #103 from Quiark/masterKitsune Ral
Try using wildcard for qmake project file
2017-10-20Try using wildcard for qmake project fileRoman Plášil
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-19Don't log renamesKitsune Ral
This causes enormous traffic in the logs upon every startup when main.debug logs are on.
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-19Don't log renamesKitsune Ral
This causes enormous traffic in the logs upon every startup when main.debug logs are on.
2017-10-19Generated jobs: Don't dump empty strings to body parametersKitsune Ral
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.
2017-10-19Be more friendly to IDE, list the API filesKitsune Ral
2017-10-19Merge branch 'master' into kitsune-gtadKitsune Ral
2017-10-17Avoid leaking access_token in the logsKitsune Ral
Closes #102.
2017-10-17Cache the actual user name, not the display nameKitsune Ral
Display name is a calculated thing, name is received from the server.
2017-10-17Fixed a blunder leading to users not having namesKitsune Ral
If all users suddenly don't have names, update to this commit, delete your cache and run again. Issue since 2bf912d6e6ddd9ff81a92ff28ac8c4c1d8f2d7e1.
2017-10-15Connection::forgetRoom(): Minor fixesKitsune Ral
2017-10-15Fixed building with clang+libcpp (used on OS X)Kitsune Ral
libcpp has pessimistic definition of array that only engages constexpr in C++14 mode and newer; so one cannot use std::array<> in constexpr code.
2017-10-14Actually added generated/profile.* files, needed to change display nameKitsune Ral
2017-10-14LogoutJob is supplied by generated codeKitsune Ral
2017-10-14Support of changing the display nameKitsune Ral
Note that although the mechanism is generic enough to change any user's display name, The Spec states that power rules are very strict about it.
2017-10-14Connection::forgetRoom()Kitsune Ral
2017-10-14Leaving a room now uses a generated Job fileKitsune Ral
2017-10-14Make JoinState (de)serializable library-wideKitsune Ral
2017-10-14Cleanup around Room (potentially breaks API compatibility, beware)Kitsune Ral
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
2017-10-13Pass universal references in Connection::callApi<>; fixed a typo in util.hKitsune Ral
So that even uncopyable types could be used for parameters; also fixed a typo in util.h that prevented dispatch() from using with multiple argument functions.
2017-10-13Support banning and unbanningKitsune Ral
Closes #38. Also rearranged #includes
2017-10-13Cleaner generated filesKitsune Ral
2017-10-13Extend the number of types supported by fromJson<>()Kitsune Ral
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().
2017-10-13All jobs: Drop ConnectionData parameter from the constructorKitsune Ral
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()).
2017-10-13Support banning and unbanningKitsune Ral
Closes #38. Also rearranged #includes
2017-10-12{{templates}} polishingKitsune Ral
2017-10-10Jobs with non-trivial results are generated properlyKitsune Ral
This addresses the last bullet in KitsuneRal/gtad#10, completing the implementation.
2017-10-10Protect against identifiers hitting on C/C++ reserved wordsKitsune Ral
2017-10-10Extend the number of types supported by fromJson<>()Kitsune Ral
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().
2017-10-08Merge branch 'master' into kitsune-gtadKitsune Ral
2017-10-03Room: cache unread indicator inside m.read content, not next to itKitsune Ral
The CS API, turns out, has a quite official extension point inside m.read event content - clients are allowed to put whatever extra data they feel reasonable.
2017-10-02api-generator has been renamed to gtadKitsune Ral
2017-10-02Drop ConnectionData parameter from {{template}} files too; less blanksKitsune Ral
2017-10-02All jobs: Drop ConnectionData parameter from the constructorKitsune Ral
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()).
2017-10-02Room::id(): return crefKitsune Ral
A cref is still faster than incrementing a refcounter in QString, and all the other COW stuff, and room id is not supposed to change ever.
2017-10-02Introduce EncryptionEvent classKitsune Ral
This allows to detect if a room has been encrypted (no room state, just an event as of yet). Closes #84.
2017-10-01Merge branch 'master' into kitsune-apigenKitsune Ral