X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fpeerfactory.h;h=ca6639aa18ecc6eb45b8bb3971b024093f393aa3;hp=79a0c3554bbd29b4fd404c320ca682f202b2b996;hb=ed5b2ff32158ae72c011eb1228f373cec05cbfeb;hpb=9c0ca310ca1b6938cf100c9f7772d39ede630b31 diff --git a/src/common/peerfactory.h b/src/common/peerfactory.h index 79a0c355..ca6639aa 100644 --- a/src/common/peerfactory.h +++ b/src/common/peerfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,11 +18,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef PEERFACTORY_H -#define PEERFACTORY_H +#pragma once + +#include "common-export.h" #include +#include "compressor.h" #include "protocol.h" class QObject; @@ -31,19 +33,17 @@ class QTcpSocket; class AuthHandler; class RemotePeer; -class PeerFactory +class COMMON_EXPORT PeerFactory { public: // second value is the protocol-specific features - typedef QPair ProtoDescriptor; - typedef QVector ProtoList; + using ProtoDescriptor = QPair; + using ProtoList = QVector; static ProtoList supportedProtocols(); - static RemotePeer *createPeer(const ProtoDescriptor &protocol, AuthHandler *authHandler, QTcpSocket *socket, QObject *parent = 0); - static RemotePeer *createPeer(const ProtoList &protocols, AuthHandler *authHandler, QTcpSocket *socket, QObject *parent = 0); + static RemotePeer *createPeer(const ProtoDescriptor &protocol, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = nullptr); + static RemotePeer *createPeer(const ProtoList &protocols, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, QObject *parent = nullptr); }; - -#endif