aboutsummaryrefslogtreecommitdiff
path: root/events
AgeCommit message (Collapse)Author
2016-09-07A generic lookup(), and its usage in Event and RoomMessageEventKitsune Ral
Feel free to use whenever you need to convert another JSON key to some C++ object, or dispatch anything based on a JSON key.
2016-09-07Event::fromJson(): made the code more compact (correctly this time)Kitsune Ral
That might be not as efficient as a solution on variadic templates; but arguably easier to understand. Doesn't have the typo bug the previous version of this commit had.
2016-09-07Temporarily revert "Event::fromJson(): made the code more compact" as it ↵Kitsune Ral
breaks highlighting This reverts commit 0fe83d59d76cd8f9c8f92d40cc58d9f5b082a84a.
2016-08-31QList<Event*> -> using Events=QVector<Event*>Kitsune Ral
2016-08-31Event::fromJson(): made the code more compactKitsune Ral
That might be not as efficient as a solution on variadic templates; but arguably easier to understand.
2016-08-29RoomTopicEvent: parse and provide sender informationKitsune Ral
2016-08-29Align AudioContent with the rest; special-case creation of VideoContent onlyKitsune Ral
The spec is told to allow any event to have a thumbnail in future, and the thumbnail will reside under "content" JSON key rather than "info".
2016-08-25Structured parsing, folded repetitive initialization codeKitsune Ral
2016-08-24Introduce TextContent + minor cleanupKitsune Ral
TextContent is a class to deal with formatted (HTML, RTF, Markdown) text messages. Right now it only supports Vector's non-standard "formatted_body".
2016-08-24Drop unused (by code and by spec) hsob_ts valueKitsune Ral
2016-08-24Move plain body from Base (former MessageEventContent) inside RoomMessageEventKitsune Ral
According to the spec, this key has the same status as msgtype: both should exist in any message. Besides, it's always supposed to be a plain text so there's no polymorphism allowed here.
2016-08-24Moved message content classes to a dedicated namespaceKitsune Ral
2016-08-22Replaced QList<> with QVector<> where appropriate + minor code cleanupKitsune Ral
See https://marcmutz.wordpress.com/effective-qt/containers/ for the background and http://lists.qt-project.org/pipermail/development/2015-July/022283.html for the relevant flamewar in Qt dev mailing list.
2016-08-22findInsertionPos: allow usage with polymorphic typesKitsune Ral
Basically, this commit allows the inserted item type to be different from those in the container, as in findInsertionPos(baseTypeContainer, derivedTypeItem). Of course both types should still provide timestamp() for comparison.
2016-08-15Fixed a typo in the enum definitionKitsune Ral
Fortunately, the clients don't seem to use it atm.
2016-05-27Enhance loggingKitsune Ral
1. Introduce QDebug manipulators and formatJson manipulator in particular - this allows to accommodate some changes in Qt's debug printing behaviour between versions. 2. Show JSON for some questionable objects (UnknownEvents, events with no event_id etc.) 3. Log the list of typing users and the user id when getting an avatar.
2016-05-27Use nullptrKitsune Ral
2016-05-26Introducing EventList class + minor fixKitsune Ral
Now you can parse a JSON array into a list of events with a one-liner. Also, fromMSecsSinceEpoch accepts a qint64, not quint64 - fixed the respective cast.
2016-04-11Merge pull request #2 from KitsuneRal/code-maintenanceFelix Rohrbach
Code maintenance
2016-04-11Factor out the code that searches an insertion point in a timeline.Kitsune Ral
This is used once in the library and, I guess, twice more in the Quaternion. Implemented as a template function that is equally suitable for Event and Message, and any container that supports STL-style iterators (QList and other Qt containers do).
2016-04-11Use a more telling log line than !!!!Kitsune Ral
2016-04-11Missing method in the last commitFelix Rohrbach
2016-04-09Implement different types of messagesFelix Rohrbach
2016-04-08Use class instead of struct to remove warningKitsune Ral
Originally by Felix Rohrbach (kde@fxrh.de)
2016-04-05Imported the current source tree from Quaternion/lib.Kitsune Ral