QXmpp Version: 1.11.3
Loading...
Searching...
No Matches
QXmppPubSubNodeConfig_p.h
1// SPDX-FileCopyrightText: 2025 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPPUBSUBNODECONFIG_P_H
6#define QXMPPPUBSUBNODECONFIG_P_H
7
8#include "QXmppPubSubNodeConfig.h"
9
10#include "Enums.h"
11
12namespace QXmpp::Private {
13
14template<>
15struct Enums::Data<QXmppPubSubNodeConfig::AccessModel> {
16 using enum QXmppPubSubNodeConfig::AccessModel;
17 static constexpr auto Values = makeValues<QXmppPubSubNodeConfig::AccessModel>({
18 { Open, u"open" },
19 { Presence, u"presence" },
20 { Roster, u"roster" },
21 { Authorize, u"authorize" },
22 { Allowlist, u"whitelist" },
23 });
24};
25
26template<>
27struct Enums::Data<QXmppPubSubNodeConfig::PublishModel> {
28 using enum QXmppPubSubNodeConfig::PublishModel;
29 static constexpr auto Values = makeValues<QXmppPubSubNodeConfig::PublishModel>({
30 { Publishers, u"publishers" },
31 { Subscribers, u"subscribers" },
32 { Anyone, u"open" },
33 });
34};
35
36template<>
37struct Enums::Data<QXmppPubSubNodeConfig::ChildAssociationPolicy> {
38 using enum QXmppPubSubNodeConfig::ChildAssociationPolicy;
39 static constexpr auto Values = makeValues<QXmppPubSubNodeConfig::ChildAssociationPolicy>({
40 { All, u"all" },
41 { Owners, u"owners" },
42 { Whitelist, u"whitelist" },
43 });
44};
45
46template<>
47struct Enums::Data<QXmppPubSubNodeConfig::ItemPublisher> {
48 using enum QXmppPubSubNodeConfig::ItemPublisher;
49 static constexpr auto Values = makeValues<QXmppPubSubNodeConfig::ItemPublisher>({
50 { NodeOwner, u"owner" },
51 { Publisher, u"publisher" },
52 });
53};
54
55template<>
56struct Enums::Data<QXmppPubSubNodeConfig::NodeType> {
57 using enum QXmppPubSubNodeConfig::NodeType;
58 static constexpr auto Values = makeValues<QXmppPubSubNodeConfig::NodeType>({
59 { Leaf, u"leaf" },
60 { Collection, u"collection" },
61 });
62};
63
64template<>
65struct Enums::Data<QXmppPubSubNodeConfig::NotificationType> {
66 using enum QXmppPubSubNodeConfig::NotificationType;
67 static constexpr auto Values = makeValues<QXmppPubSubNodeConfig::NotificationType>({
68 { Normal, u"normal" },
69 { Headline, u"headline" },
70 });
71};
72
73template<>
74struct Enums::Data<QXmppPubSubNodeConfig::SendLastItemType> {
75 using enum QXmppPubSubNodeConfig::SendLastItemType;
76 static constexpr auto Values = makeValues<QXmppPubSubNodeConfig::SendLastItemType>({
77 { Never, u"never" },
78 { OnSubscription, u"on_sub" },
79 { OnSubscriptionAndPresence, u"on_sub_and_presence" },
80 });
81};
82
83} // namespace QXmpp::Private
84
85#endif // QXMPPPUBSUBNODECONFIG_P_H