aboutsummaryrefslogtreecommitdiff
path: root/jobs/sendeventjob.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-01 18:19:56 +0300
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-01 18:19:56 +0300
commita275ef911b3f4d0334df0628324aee0081dd3a65 (patch)
tree87d9b2bbbc67ceeb9c39d5c09f242b1776de8460 /jobs/sendeventjob.h
parent64c0b7e045d9e8d58d91f252219a5579d4ba9441 (diff)
downloadlibquotient-a275ef911b3f4d0334df0628324aee0081dd3a65.tar.gz
libquotient-a275ef911b3f4d0334df0628324aee0081dd3a65.zip
StateEvent; EventContent::SimpleContent; event types refactoring
* 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.
Diffstat (limited to 'jobs/sendeventjob.h')
0 files changed, 0 insertions, 0 deletions