QXmpp Version: 1.10.0
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
42// Scoped enums (enum class) are not implicitly converted to int
43inline auto qHash(QXmpp::TrustLevel key, uint seed) noexcept { return ::qHash(std::underlying_type_t<QXmpp::TrustLevel>(key), seed); }
45
46} // namespace QXmpp
47
48#endif // QXMPPTRUSTLEVEL_H
Definition: Algorithms.h:12
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.