[WIP] Added wireguard, prepare to test and debug
This commit is contained in:
parent
e644575bc5
commit
7c7f77adc6
98 changed files with 4410 additions and 302 deletions
42
client/platforms/ios/ipaddressrange.h
Normal file
42
client/platforms/ios/ipaddressrange.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef IPADDRESSRANGE_H
|
||||
#define IPADDRESSRANGE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
class IPAddress;
|
||||
|
||||
class IPAddressRange final {
|
||||
public:
|
||||
enum IPAddressType {
|
||||
IPv4,
|
||||
IPv6,
|
||||
};
|
||||
|
||||
static QList<IPAddressRange> fromIPAddressList(const QList<IPAddress>& list);
|
||||
|
||||
IPAddressRange(const QString& prefix);
|
||||
IPAddressRange(const QString& ipAddress, uint32_t range, IPAddressType type);
|
||||
IPAddressRange(const IPAddressRange& other);
|
||||
IPAddressRange& operator=(const IPAddressRange& other);
|
||||
bool operator==(const IPAddressRange& other) const;
|
||||
~IPAddressRange();
|
||||
|
||||
const QString& ipAddress() const { return m_ipAddress; }
|
||||
uint32_t range() const { return m_range; }
|
||||
IPAddressType type() const { return m_type; }
|
||||
const QString toString() const {
|
||||
return QString("%1/%2").arg(m_ipAddress).arg(m_range);
|
||||
}
|
||||
|
||||
private:
|
||||
QString m_ipAddress;
|
||||
uint32_t m_range;
|
||||
IPAddressType m_type;
|
||||
};
|
||||
|
||||
#endif // IPADDRESSRANGE_H
|
Loading…
Add table
Add a link
Reference in a new issue