1 /***************************************************************************
2 * Copyright (C) 2005-2014 by the Quassel Project *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
24 #include <QDataStream>
26 #include "../../remotepeer.h"
30 class LegacyPeer : public RemotePeer
44 LegacyPeer(AuthHandler *authHandler, QTcpSocket *socket, QObject *parent = 0);
47 void setSignalProxy(SignalProxy *proxy);
49 void dispatch(const Protocol::RegisterClient &msg);
50 void dispatch(const Protocol::ClientDenied &msg);
51 void dispatch(const Protocol::ClientRegistered &msg);
52 void dispatch(const Protocol::SetupData &msg);
53 void dispatch(const Protocol::SetupFailed &msg);
54 void dispatch(const Protocol::SetupDone &msg);
55 void dispatch(const Protocol::Login &msg);
56 void dispatch(const Protocol::LoginFailed &msg);
57 void dispatch(const Protocol::LoginSuccess &msg);
58 void dispatch(const Protocol::SessionState &msg);
60 void dispatch(const Protocol::SyncMessage &msg);
61 void dispatch(const Protocol::RpcCall &msg);
62 void dispatch(const Protocol::InitRequest &msg);
63 void dispatch(const Protocol::InitData &msg);
65 void dispatch(const Protocol::HeartBeat &msg);
66 void dispatch(const Protocol::HeartBeatReply &msg);
68 // FIXME: this is only used for the auth phase and should be replaced by something more generic
69 void writeSocketData(const QVariant &item);
72 void protocolError(const QString &errorString);
74 // only used in compat mode
75 void protocolVersionMismatch(int actual, int expected);
78 void socketDataAvailable();
81 bool readSocketData(QVariant &item);
82 void handleHandshakeMessage(const QVariant &msg);
83 void handlePackedFunc(const QVariant &packedFunc);
84 void dispatchPackedFunc(const QVariantList &packedFunc);