Provide (de)serialization for all event types
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 21 May 2012 21:30:56 +0000 (23:30 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 21 May 2012 21:36:14 +0000 (23:36 +0200)
commit6f38b6fdeb73e726c24b26a97b98c9cfe0fc8a0e
tree843c03629f3e38be16fa3764746cacd5781f118f
parent5c6de1b6613a99791be660bb19df18e3da507cd7
Provide (de)serialization for all event types

This allows to (de)serialize events to/from QVariantMap (using only primitive
types), a prerequisite for sending events over the wire.

Use the following functions:

void EventManager::createEvent(const QVariantMap &)
QVariantMap Event::toVariantMap()

Note that there is only rudimentary plausibility checking, so for now we assume
that the QVariantMaps are created by Quassel. Before we allow these to go on the wire,
we need to make sure that this can't be tinkered with in annoying ways.
15 files changed:
src/common/ctcpevent.cpp
src/common/ctcpevent.h
src/common/event.cpp
src/common/event.h
src/common/eventmanager.cpp
src/common/eventmanager.h
src/common/ircevent.cpp
src/common/ircevent.h
src/common/messageevent.cpp
src/common/messageevent.h
src/common/networkevent.cpp
src/common/networkevent.h
src/core/CMakeLists.txt
src/core/coreeventmanager.h [new file with mode: 0644]
src/core/coresession.cpp