Refactor SignalProxy, network and protocol code
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 17 Jan 2013 22:31:34 +0000 (23:31 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 17 Jan 2013 23:00:50 +0000 (00:00 +0100)
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.


No differences found