QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
QXmppTrustLevel.h
1// SPDX-FileCopyrightText: 2021 Melvin Keskin <melvo@olomono.de>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPTRUSTLEVEL_H
6#define QXMPPTRUSTLEVEL_H
7
8#include <QFlags>
9#include <QHashFunctions>
10
11namespace QXmpp {
12
19enum class TrustLevel {
21 Undecided = 1,
32 ManuallyTrusted = 16,
35 Authenticated = 32,
36};
37
38Q_DECLARE_FLAGS(TrustLevels, TrustLevel)
39Q_DECLARE_OPERATORS_FOR_FLAGS(TrustLevels)
40
41} // namespace QXmpp
42
44// Scoped enums (enum class) are not implicitly converted to int
45inline uint qHash(QXmpp::TrustLevel key, uint seed) noexcept { return qHash(std::underlying_type_t<QXmpp::TrustLevel>(key), seed); }
47
48#endif // QXMPPTRUSTLEVEL_H
TrustLevel
Definition QXmppTrustLevel.h:19
@ ManuallyTrusted
The key is manually trusted (e.g., by clicking a button).
@ Undecided
The key's trust is not decided.