8 #include <qobjectdefs.h>
29 #define QUO_DECLARE_FLAGS(Flags, Enum)
30 Q_DECLARE_FLAGS(Flags, Enum)
40 #define QUO_DECLARE_FLAGS_NS(Flags, Enum)
41 Q_DECLARE_FLAGS(Flags, Enum)
55 enum class Membership : uint16_t {
68 constexpr std::array MembershipStrings {
70 "join"_L1,
"leave"_L1,
"invite"_L1,
"knock"_L1,
"ban"_L1
78 enum class JoinState : std::underlying_type_t<Membership> {
79 Invalid = std::underlying_type_t<Membership>(Membership::Invalid),
80 Join = std::underlying_type_t<Membership>(Membership::Join),
81 Leave = std::underlying_type_t<Membership>(Membership::Leave),
82 Invite = std::underlying_type_t<Membership>(Membership::Invite),
83 Knock = std::underlying_type_t<Membership>(Membership::Knock),
87 [[maybe_unused]]
constexpr std::array JoinStateStrings {
88 MembershipStrings[0], MembershipStrings[1], MembershipStrings[2],
96 enum RunningPolicy { ForegroundRequest = 0x0, BackgroundRequest = 0x1 };
97 Q_ENUM_NS(RunningPolicy)
101 enum UriResolveResult : int8_t {
109 Q_ENUM_NS(UriResolveResult)
111 enum class RoomType : uint8_t {
117 [[maybe_unused]]
constexpr std::array RoomTypeStrings {
"m.space"_L1 };
119 enum class EncryptionType : uint8_t {
123 Q_ENUM_NS(EncryptionType)
126 Q_DECLARE_OPERATORS_FOR_FLAGS(Quotient::MembershipMask)
127 Q_DECLARE_OPERATORS_FOR_FLAGS(Quotient::JoinStates)