/***************************************************************************
- * Copyright (C) 2005-2013 by the Quassel Project *
+ * Copyright (C) 2005-2015 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#ifndef INTERNALPEER_H
#define INTERNALPEER_H
-#include <QTcpSocket>
-
+#include "peer.h"
#include "protocol.h"
#include "signalproxy.h"
class QEvent;
-class InternalPeer : public SignalProxy::AbstractPeer
+class InternalPeer : public Peer
{
Q_OBJECT
void dispatch(const Protocol::InitRequest &msg);
void dispatch(const Protocol::InitData &msg);
+ /* These are not needed for InternalPeer */
+ void dispatch(const Protocol::RegisterClient &) {}
+ void dispatch(const Protocol::ClientDenied &) {}
+ void dispatch(const Protocol::ClientRegistered &) {}
+ void dispatch(const Protocol::SetupData &) {}
+ void dispatch(const Protocol::SetupFailed &) {}
+ void dispatch(const Protocol::SetupDone &) {}
+ void dispatch(const Protocol::Login &) {}
+ void dispatch(const Protocol::LoginFailed &) {}
+ void dispatch(const Protocol::LoginSuccess &) {}
+ void dispatch(const Protocol::SessionState &) {}
+
public slots:
void close(const QString &reason = QString());
-signals:
-
- void disconnected();
- void error(QAbstractSocket::SocketError);
-
protected:
void customEvent(QEvent *event);
template<class T>
void dispatch(EventType eventType, const T &msg);
- template<class T>
- void handle(const T &msg);
-
private:
SignalProxy *_proxy;
InternalPeer *_peer;