aboutsummaryrefslogtreecommitdiff
path: root/events/eventcontent.cpp
AgeCommit message (Collapse)Author
2018-01-15EventContent: provide mediaId in the top-level JSON, not in "info" subobjectKitsune Ral
Given that it's a sidedoor anyway, it should at least be straightforward to use.
2018-01-15EventContent: rewrite without mixinsKitsune Ral
MSVC is not good at dealing with type parameter packs of member functions, which is what the whole mixin magic in UrlBasedContent<> relied on. So it's one more level of inheritance instead of mixins now.
2018-01-14Refactor EventContent; allow to easily check files out of message eventsKitsune Ral
The whole inheritance/templating structure has been considerably simplified by using a trick with mixin classes; thanks to that, *Info classes are no more templated, they are just mixed together by the almighty UrlBasedContent<> template (but the same can easily be done outside of it, as LocationContent implementation shows). RoomMessageEvent has gained hasFileContent(); it's also possible to easily get a FileInfo core object just by calling msgEvent->content()->fileInfo().
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-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).