1 /***************************************************************************
2 * Copyright (C) 2005-2012 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 ***************************************************************************/
21 #ifndef LEGACYCONNECTION_H
22 #define LEGACYCONNECTION_H
24 #include <QDataStream>
26 #include "../../remoteconnection.h"
30 class LegacyConnection : public RemoteConnection
44 LegacyConnection(QTcpSocket *socket, QObject *parent = 0);
45 ~LegacyConnection() {}
47 void setSignalProxy(SignalProxy *proxy);
49 void dispatch(const Protocol::SyncMessage &msg);
50 void dispatch(const Protocol::RpcCall &msg);
51 void dispatch(const Protocol::InitRequest &msg);
52 void dispatch(const Protocol::InitData &msg);
54 void dispatch(const Protocol::HeartBeat &msg);
55 void dispatch(const Protocol::HeartBeatReply &msg);
57 // FIXME: this is only used for the auth phase and should be replaced by something more generic
58 void writeSocketData(const QVariant &item);
61 void socketDataAvailable();
64 bool readSocketData(QVariant &item);
65 void handlePackedFunc(const QVariant &packedFunc);
66 void dispatchPackedFunc(const QVariantList &packedFunc);