mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Revise interface of port forwarder
This eases the usage of port forwarder as the caller code doesn't need to store previous used port and now can rely on port forwarder doing all the hard work. PR #17967.
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
|
||||
class QString;
|
||||
|
||||
namespace Net
|
||||
{
|
||||
@@ -45,8 +48,8 @@ namespace Net
|
||||
virtual bool isEnabled() const = 0;
|
||||
virtual void setEnabled(bool enabled) = 0;
|
||||
|
||||
virtual void addPort(quint16 port) = 0;
|
||||
virtual void deletePort(quint16 port) = 0;
|
||||
virtual void setPorts(const QString &profile, QSet<quint16> ports) = 0;
|
||||
virtual void removePorts(const QString &profile) = 0;
|
||||
|
||||
private:
|
||||
static PortForwarder *m_instance;
|
||||
|
||||
Reference in New Issue
Block a user