1 // Copyright 2005-2019 The Mumble Developers. All rights reserved.
2 // Use of this source code is governed by a BSD-style license
3 // that can be found in the LICENSE file at the root of the
4 // Mumble source tree or at <https://www.mumble.info/LICENSE>.
5 
6 #ifndef MUMBLE_BAN_H_
7 #define MUMBLE_BAN_H_
8 
9 #include "HostAddress.h"
10 
11 #include <QtCore/QtGlobal>
12 #include <QtCore/QString>
13 #include <QtCore/QDateTime>
14 #include <QtNetwork/QHostAddress>
15 #include <QtNetwork/Q_IPV6ADDR>
16 
17 struct Ban {
18 	HostAddress haAddress;
19 	int iMask;
20 	QString qsUsername;
21 	QString qsHash;
22 	QString qsReason;
23 	QDateTime qdtStart;
24 	unsigned int iDuration;
25 	bool isExpired() const;
26 	bool isValid() const;
27 	bool operator < (const Ban &) const;
28 	bool operator == (const Ban &) const;
29 	QString toString() const;
30 };
31 
32 quint32 qHash(const Ban &);
33 
34 #endif
35