From: Manuel Nickschas Date: Thu, 17 Jan 2013 22:31:34 +0000 (+0100) Subject: Refactor SignalProxy, network and protocol code X-Git-Tag: 0.9-beta1~39 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=0e1b154f362e13c2c9009f842e3fd6d8e7c346fc;hp=0e1b154f362e13c2c9009f842e3fd6d8e7c346fc Refactor SignalProxy, network and protocol code Until now, SignalProxy also contained the protocol implementation and handled the network data transfer. Besides being an architectural nightmare, this also made it impossible to work on a new protocol. As a nice sideeffect, the code size of SignalProxy shrunk by more than 30%. This commit does the following: * Provide a common abstraction for internal (mono) and remote connections, so we can remove the special casing for mono clients in the SignalProxy. This should also make it easier to bring back remote capabilities to the mono client in the future. * Move the networking code into RemoteConnection, which also acts as an abstraction layer for the current and future core/client protocols. * Move the protocol-specific code into LegacyConnection. * Introduce explicit protocol message types (as opposed to QVariantMaps). This gives us type safety and allows for a cleaner and more efficient handling inside SignalProxy. Also, I finally got to use templates \o/ Note that the handshake/auth code still needs to be abstracted, so for now the LegacyConnection is still used directly in (the awkwardly mis-named) CoreConnection and Core for reading/writing their data during the init phase. ---