X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fpeerfactory.h;h=0cf22a764c4a3dd0e53d56fc60e9662f36ebecf3;hp=1ec589092e2145b121953b5d3f2b68e1994d8984;hb=HEAD;hpb=921e54680da16fcf2adb7a90506875aceb6633a4 diff --git a/src/common/peerfactory.h b/src/common/peerfactory.h index 1ec58909..5a1bb885 100644 --- a/src/common/peerfactory.h +++ b/src/common/peerfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,8 +18,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef PEERFACTORY_H -#define PEERFACTORY_H +#pragma once + +#include "common-export.h" #include @@ -32,19 +33,23 @@ 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, Compressor::CompressionLevel level, QObject *parent = 0); - static RemotePeer *createPeer(const ProtoList &protocols, AuthHandler *authHandler, QTcpSocket *socket, Compressor::CompressionLevel level, 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