/***************************************************************************
- * Copyright (C) 2005-2018 by the Quassel Project *
+ * Copyright (C) 2005-2019 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include <QPointer>
-#include "transfer.h"
#include "peer.h"
+#include "transfer.h"
class QTcpSocket;
Q_OBJECT
public:
- CoreTransfer(Direction direction, const QString &nick, const QString &fileName, const QHostAddress &address, quint16 port, quint64 size = 0, QObject *parent = nullptr);
+ CoreTransfer(Direction direction,
+ const QString& nick,
+ const QString& fileName,
+ const QHostAddress& address,
+ quint16 port,
+ quint64 size = 0,
+ QObject* parent = nullptr);
quint64 transferred() const override;
private:
void setupConnectionForReceive();
- bool relayData(const QByteArray &data, bool requireChunkSize);
+ bool relayData(const QByteArray& data, bool requireChunkSize);
void cleanUp() override;
QPointer<Peer> _peer;
- QTcpSocket *_socket;
+ QTcpSocket* _socket;
quint64 _pos;
QByteArray _buffer;
bool _reading;