aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-06converters.h: Use perfect forwardingKitsune Ral
2017-12-06Connection: undeprecate joinRoom()Kitsune Ral
This is for the same reason as Connection::getThumbnail() - it's the only non-template (hence, supported by QML and Qt queued signal connections) way to invoke joining a room.
2017-12-06converters.h: support QByteArrayKitsune Ral
2017-11-30Connection: no more default to matrix.org; update HS URL from /login responseKitsune Ral
2017-11-30Generated 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-28Merge branch 'master' into kitsune-gtadKitsune Ral
2017-11-28Bumped up the soname versionKitsune Ral
NB: Dynamic library generation requires CMake; no libqmatrixclient.pro yet.
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-26Deprecated resolved(); grouped signals from the same operationsKitsune Ral
2017-11-25Make Connection::resolveServer() work as it shouldKitsune Ral
Closes #119; many thanks to @r0kk3rz for prodding me into that.
2017-11-25ConnectionData::setBaseUrl()Kitsune Ral
2017-11-22Undeprecated Connection::getThumbnail(), moved Q_INVOKABLE calls to slotsKitsune Ral
Connection::getThumbnail() should not have been deprecated because it's the only way to request a thumbnail using an event loop (i.e. from QML or via QMetaObject::invokeMethod).
2017-11-22Use unique_ptr for connectionDataKitsune Ral
2017-11-22Force-create NAM earlierKitsune Ral
To somewhat ease a bump at sending the first network request.
2017-11-21Use QStringLiteral instead of bare QString constructors for string constantsKitsune Ral
For job endpoints, we should eventually move to QLatin1String or QByteArray instead. Maybe later.
2017-11-21Eliminate race condition in Avatar::get()Kitsune Ral
The race occurred because _ongoingRequest wasn't properly reinitialized if another request on a bigger size arrives while a request for a smaller size is in the air. The old request is now abandoned and continuations are collected inside the Avatar object rather than in the lambda connected to the job. Closes #124. Along the way, _scaledPixmaps is now std::vector instead of QHash since usually it only contains very few (1 or 2) entries and QHash is a waste of memory for that.
2017-11-21Mitigate the mess with slashes between base URL and endpoint stringKitsune Ral
Closes #125
2017-11-21Workaround Qt's poor bearer managementKitsune Ral
Closes #109
2017-11-20Slightly rearrange code so that the NAM singleton could be configured easierKitsune Ral
2017-11-16Fix CIKitsune Ral
2017-11-16Simplify code that loads events from JSON arraysKitsune 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-10Add Telegram to the list of bridge suffixesKitsune Ral
2017-11-10Merge pull request #112 from Quiark/masterKitsune Ral
Fix (IRC) bridge detection
2017-11-10Fix (IRC) bridge detectionRoman Plášil
2017-11-05README.md: Replace some leftover references to QuaternionKitsune Ral
2017-11-04Update README.mdKitsune Ral
The documentation is now more independent from Quaternion and includes instructions not only for CMake but also for qmake. It also mentions that we have an example console client!
2017-11-03Settings: Catch literal "false" values stored by Qt.labs.Settings QML moduleKitsune Ral
Those stand for a boolean false value in Qt.labs.Settings, but plain JavaScript thinks that "false" == true so if you take a value through QMatrixClient::Settings instead of Qt.labs.Settings, you would get screwed.
2017-11-03Provide facilities to migrate from legacy settings locationKitsune Ral
This is for a case of renaming an organisation or an application
2017-11-02Document room transitions in .h instead of .cppKitsune Ral
The original comment got a bit rotten, so refresh it as well.
2017-11-02Room: Move away internal methods to not mislead client authorsKitsune Ral
2017-11-02Update the lib version for dynamic linkingKitsune Ral
2017-11-02Fix AppVeyor CIKitsune Ral
2017-11-02Fixed CIKitsune Ral
2017-11-01Imbue RoomMemberEvent with EventContentKitsune Ral
It now allows to check what exactly has happened to the member (display name change, joining, avatar update), fixing #105.
2017-11-01Event::isStateEvent(); fixed StateEvent::_prev always being initialisedKitsune Ral
Event::isStateEvent() is an easier way to make checking an event kind (instead of enumerating through all types corresponding to state changes). StateEvent::_prev (accessible through prev_content) should only be initialised if there's a previous state in the original JSON.
2017-11-01StateEvent; EventContent::SimpleContent; event types refactoringKitsune Ral
* StateEvent<> is a new class template for all state events. It provides a uniform interface to the state content, as well as a means to serialize the content back to JSON. In addition, StateEvent now parses the "prev_content" JSON object, so one can refer to the previous state now (a notable step to proper reflection of state changes in the displayed timeline in clients). * EventContent::SimpleContent, together with StateEvent<>, forms a generalisation for simple state events, such as room name, topic, aliases etc. that boil down to a single key-value pair. DECLARE_SIMPLE_STATE_EVENT is a macro defined to streamline creation of events based on SimpleContent, providing API back-compatibility for events defined so far. As a result, a very concise simplestateevents.h replaces all those room*event.* files. * Event/RoomEvent::fromJson() code is squeezed down to plain type lists passed to makeIfMatches() "chained factory" function template. TypeId is mandatory for an event type to be included into that factory. * Event::toTimestamp() and Event::toStringList are completely superseded by respective fromJson<>() converters.
2017-11-01Add TypeId to more eventsKitsune Ral
2017-11-01Add fromJson<QList<QString>> and fromJson<QStringList>Kitsune Ral
2017-11-01ReceiptEvent: Use fromJson<>() from converters.h; add TypeIdKitsune Ral
Event::toTimestamp() duplicates fromJson<>() code, so it should go.
2017-11-01Drop UnknownEvent files from the source treeKitsune Ral
We don't use them for several months already.
2017-11-01Move converters.h out of jobs/Kitsune Ral
Because they are applicable beyond jobs.
2017-10-31Streamline EventContent hierarchyKitsune Ral
Two changes to make EventContent hierarchy easier to understand and use: - InfoBase is unbound from Base, and downstream classes use multiple inheritance to work "info" objects - MIME types are separated from Base into a separate TypedBase class because MIME typing is not common to all content kinds.
2017-10-31More .gitignored filesKitsune Ral
2017-10-31Fix Connection::deviceId(): Q_INVOKABLE is incompatible with referencesKitsune Ral
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).