X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fproxyline.h;fp=src%2Fcommon%2Fproxyline.h;h=4fb2e9e766b04f190f2b13802029bff66250ec13;hp=0000000000000000000000000000000000000000;hb=71253052c7152711f7f1b96f274d6f06d97f2cdb;hpb=926e41c2d511fd0ac68b50f6d109243d6457a999 diff --git a/src/common/proxyline.h b/src/common/proxyline.h new file mode 100644 index 00000000..4fb2e9e7 --- /dev/null +++ b/src/common/proxyline.h @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2005-2020 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#pragma once + +#include +#include +#include + +#include "common-export.h" + +struct COMMON_EXPORT ProxyLine +{ + QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::UnknownNetworkLayerProtocol; + QHostAddress sourceHost; + uint16_t sourcePort; + QHostAddress targetHost; + uint16_t targetPort; + + static ProxyLine parseProxyLine(const QByteArray& line); + friend COMMON_EXPORT QDebug operator<<(QDebug dbg, const ProxyLine& p); +};