QXmpp: QXmppConstants_p.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
QXmppConstants_p.h
1// SPDX-FileCopyrightText: 2016 Manjeet Dahiya <manjeetdahiya@gmail.com>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef CONSTANTS_H
6#define CONSTANTS_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the QXmpp API.
13//
14// This header file may change from version to version without notice,
15// or even be removed.
16//
17// We mean it.
18//
19
20#include <QStringView>
21
22namespace QXmpp::Private {
23
24constexpr quint16 XMPP_DEFAULT_PORT = 5222;
25constexpr quint16 XMPPS_DEFAULT_PORT = 5223;
26constexpr quint16 XMPP_SERVER_DEFAULT_PORT = 5269;
27
28// XML
29inline constexpr QStringView ns_xml = u"http://www.w3.org/XML/1998/namespace";
30// QXmpp
31inline constexpr QStringView ns_qxmpp_credentials = u"org.qxmpp.credentials";
32inline constexpr QStringView ns_qxmpp_export = u"org.qxmpp.export";
33// XMPP
34inline constexpr QStringView ns_stream = u"http://etherx.jabber.org/streams";
35inline constexpr QStringView ns_client = u"jabber:client";
36inline constexpr QStringView ns_server = u"jabber:server";
37inline constexpr QStringView ns_roster = u"jabber:iq:roster";
38inline constexpr QStringView ns_tls = u"urn:ietf:params:xml:ns:xmpp-tls";
39inline constexpr QStringView ns_sasl = u"urn:ietf:params:xml:ns:xmpp-sasl";
40inline constexpr QStringView ns_bind = u"urn:ietf:params:xml:ns:xmpp-bind";
41inline constexpr QStringView ns_stream_error = u"urn:ietf:params:xml:ns:xmpp-streams";
42inline constexpr QStringView ns_session = u"urn:ietf:params:xml:ns:xmpp-session";
43inline constexpr QStringView ns_stanza = u"urn:ietf:params:xml:ns:xmpp-stanzas";
44inline constexpr QStringView ns_pre_approval = u"urn:xmpp:features:pre-approval";
45inline constexpr QStringView ns_rosterver = u"urn:xmpp:features:rosterver";
46// XEP-0009: Jabber-RPC
47inline constexpr QStringView ns_rpc = u"jabber:iq:rpc";
48// XEP-0020: Feature Negotiation
49inline constexpr QStringView ns_feature_negotiation = u"http://jabber.org/protocol/feature-neg";
50// XEP-0027: Current Jabber OpenPGP Usage
51inline constexpr QStringView ns_legacy_openpgp = u"jabber:x:encrypted";
52// XEP-0030: Service Discovery
53inline constexpr QStringView ns_disco_info = u"http://jabber.org/protocol/disco#info";
54inline constexpr QStringView ns_disco_items = u"http://jabber.org/protocol/disco#items";
55// XEP-0033: Extended Stanza Addressing
56inline constexpr QStringView ns_extended_addressing = u"http://jabber.org/protocol/address";
57// XEP-0045: Multi-User Chat
58inline constexpr QStringView ns_muc = u"http://jabber.org/protocol/muc";
59inline constexpr QStringView ns_muc_admin = u"http://jabber.org/protocol/muc#admin";
60inline constexpr QStringView ns_muc_owner = u"http://jabber.org/protocol/muc#owner";
61inline constexpr QStringView ns_muc_user = u"http://jabber.org/protocol/muc#user";
62inline constexpr QStringView ns_muc_roominfo = u"http://jabber.org/protocol/muc#roominfo";
63// XEP-0047: In-Band Bytestreams
64inline constexpr QStringView ns_ibb = u"http://jabber.org/protocol/ibb";
65// XEP-0048: Bookmarks
66inline constexpr QStringView ns_bookmarks = u"storage:bookmarks";
67// XEP-0049: Private XML Storage
68inline constexpr QStringView ns_private = u"jabber:iq:private";
69// XEP-0054: vcard-temp
70inline constexpr QStringView ns_vcard = u"vcard-temp";
71// XEP-0059: Result Set Management
72inline constexpr QStringView ns_rsm = u"http://jabber.org/protocol/rsm";
73// XEP-0060: Publish-Subscribe
74inline constexpr QStringView ns_pubsub = u"http://jabber.org/protocol/pubsub";
75inline constexpr QStringView ns_pubsub_auto_create = u"http://jabber.org/protocol/pubsub#auto-create";
76inline constexpr QStringView ns_pubsub_config_node = u"http://jabber.org/protocol/pubsub#config-node";
77inline constexpr QStringView ns_pubsub_config_node_max = u"http://jabber.org/protocol/pubsub#config-node-max";
78inline constexpr QStringView ns_pubsub_create_and_configure = u"http://jabber.org/protocol/pubsub#create-and-configure";
79inline constexpr QStringView ns_pubsub_create_nodes = u"http://jabber.org/protocol/pubsub#create-nodes";
80inline constexpr QStringView ns_pubsub_errors = u"http://jabber.org/protocol/pubsub#errors";
81inline constexpr QStringView ns_pubsub_event = u"http://jabber.org/protocol/pubsub#event";
82inline constexpr QStringView ns_pubsub_multi_items = u"http://jabber.org/protocol/pubsub#multi-items";
83inline constexpr QStringView ns_pubsub_node_config = u"http://jabber.org/protocol/pubsub#node_config";
84inline constexpr QStringView ns_pubsub_owner = u"http://jabber.org/protocol/pubsub#owner";
85inline constexpr QStringView ns_pubsub_publish = u"http://jabber.org/protocol/pubsub#publish";
86inline constexpr QStringView ns_pubsub_publish_options = u"http://jabber.org/protocol/pubsub#publish-options";
87inline constexpr QStringView ns_pubsub_rsm = u"http://jabber.org/protocol/pubsub#rsm";
88// XEP-0065: SOCKS5 Bytestreams
89inline constexpr QStringView ns_bytestreams = u"http://jabber.org/protocol/bytestreams";
90// XEP-0066: Out of Band Data
91inline constexpr QStringView ns_oob = u"jabber:x:oob";
92// XEP-0071: XHTML-IM
93inline constexpr QStringView ns_xhtml = u"http://www.w3.org/1999/xhtml";
94inline constexpr QStringView ns_xhtml_im = u"http://jabber.org/protocol/xhtml-im";
95// XEP-0077: In-Band Registration
96inline constexpr QStringView ns_register = u"jabber:iq:register";
97inline constexpr QStringView ns_register_feature = u"http://jabber.org/features/iq-register";
98// XEP-0078: Non-SASL Authentication
99inline constexpr QStringView ns_auth = u"jabber:iq:auth";
100inline constexpr QStringView ns_authFeature = u"http://jabber.org/features/iq-auth";
101// XEP-0080: User Location
102inline constexpr QStringView ns_geoloc = u"http://jabber.org/protocol/geoloc";
103inline constexpr QStringView ns_geoloc_notify = u"http://jabber.org/protocol/geoloc+notify";
104// XEP-0084: User Avatar
105inline constexpr QStringView ns_user_avatar_data = u"urn:xmpp:avatar:data";
106inline constexpr QStringView ns_user_avatar_metadata = u"urn:xmpp:avatar:metadata";
107// XEP-0085: Chat State Notifications
108inline constexpr QStringView ns_chat_states = u"http://jabber.org/protocol/chatstates";
109// XEP-0091: Legacy Delayed Delivery
110inline constexpr QStringView ns_legacy_delayed_delivery = u"jabber:x:delay";
111// XEP-0092: Software Version
112inline constexpr QStringView ns_version = u"jabber:iq:version";
113inline constexpr QStringView ns_data = u"jabber:x:data";
114// XEP-0095: Stream Initiation
115inline constexpr QStringView ns_stream_initiation = u"http://jabber.org/protocol/si";
116inline constexpr QStringView ns_stream_initiation_file_transfer = u"http://jabber.org/protocol/si/profile/file-transfer";
117// XEP-0103: URL Address Information
118inline constexpr QStringView ns_url_data = u"http://jabber.org/protocol/url-data";
119// XEP-0108: User Activity
120inline constexpr QStringView ns_activity = u"http://jabber.org/protocol/activity";
121// XEP-0115: Entity Capabilities
122inline constexpr QStringView ns_capabilities = u"http://jabber.org/protocol/caps";
123// XEP-0118: User Tune
124inline constexpr QStringView ns_tune = u"http://jabber.org/protocol/tune";
125inline constexpr QStringView ns_tune_notify = u"http://jabber.org/protocol/tune+notify";
126// XEP-0136: Message Archiving
127inline constexpr QStringView ns_archive = u"urn:xmpp:archive";
128// XEP-0138: Stream Compression
129inline constexpr QStringView ns_compress = u"http://jabber.org/protocol/compress";
130inline constexpr QStringView ns_compressFeature = u"http://jabber.org/features/compress";
131// XEP-0145: Annotations
132inline constexpr QStringView ns_rosternotes = u"storage:rosternotes";
133// XEP-0153: vCard-Based Avatars
134inline constexpr QStringView ns_vcard_update = u"vcard-temp:x:update";
135// XEP-0157: Contact Addresses for XMPP Services
136inline constexpr QStringView ns_contact_addresses = u"http://jabber.org/network/serverinfo";
137// XEP-0158: CAPTCHA Forms
138inline constexpr QStringView ns_captcha = u"urn:xmpp:captcha";
139// XEP-0166: Jingle
140inline constexpr QStringView ns_jingle = u"urn:xmpp:jingle:1";
141inline constexpr QStringView ns_jingle_raw_udp = u"urn:xmpp:jingle:transports:raw-udp:1";
142inline constexpr QStringView ns_jingle_ice_udp = u"urn:xmpp:jingle:transports:ice-udp:1";
143inline constexpr QStringView ns_jingle_errors = u"urn:xmpp:jingle:errors:1";
144// XEP-0167: Jingle RTP Sessions
145inline constexpr QStringView ns_jingle_rtp = u"urn:xmpp:jingle:apps:rtp:1";
146inline constexpr QStringView ns_jingle_rtp_audio = u"urn:xmpp:jingle:apps:rtp:audio";
147inline constexpr QStringView ns_jingle_rtp_video = u"urn:xmpp:jingle:apps:rtp:video";
148inline constexpr QStringView ns_jingle_rtp_info = u"urn:xmpp:jingle:apps:rtp:info:1";
149inline constexpr QStringView ns_jingle_rtp_errors = u"urn:xmpp:jingle:apps:rtp:errors:1";
150// XEP-0184: Message Receipts
151inline constexpr QStringView ns_message_receipts = u"urn:xmpp:receipts";
152// XEP-0191 Blocking Command
153inline constexpr QStringView ns_blocking = u"urn:xmpp:blocking";
154// XEP-0198: Stream Management
155inline constexpr QStringView ns_stream_management = u"urn:xmpp:sm:3";
156// XEP-0199: XMPP Ping
157inline constexpr QStringView ns_ping = u"urn:xmpp:ping";
158// XEP-0202: Entity Time
159inline constexpr QStringView ns_entity_time = u"urn:xmpp:time";
160// XEP-0203: Delayed Delivery
161inline constexpr QStringView ns_delayed_delivery = u"urn:xmpp:delay";
162// XEP-0215: External Service Discovery
163inline constexpr QStringView ns_external_service_discovery = u"urn:xmpp:extdisco:2";
164// XEP-0220: Server Dialback
165inline constexpr QStringView ns_server_dialback = u"jabber:server:dialback";
166// XEP-0221: Data Forms Media Element
167inline constexpr QStringView ns_media_element = u"urn:xmpp:media-element";
168// XEP-0224: Attention
169inline constexpr QStringView ns_attention = u"urn:xmpp:attention:0";
170// XEP-0231: Bits of Binary
171inline constexpr QStringView ns_bob = u"urn:xmpp:bob";
172// XEP-0249: Direct MUC Invitations
173inline constexpr QStringView ns_conference = u"jabber:x:conference";
174// XEP-0264: Jingle Content Thumbnails
175inline constexpr QStringView ns_thumbs = u"urn:xmpp:thumbs:1";
176// XEP-0272: Multiparty Jingle (Muji)
177inline constexpr QStringView ns_muji = u"urn:xmpp:jingle:muji:0";
178// XEP-0280: Message Carbons
179inline constexpr QStringView ns_carbons = u"urn:xmpp:carbons:2";
180// XEP-0283: Moved
181inline constexpr QStringView ns_moved = u"urn:xmpp:moved:1";
182// XEP-0293: Jingle RTP Feedback Negotiation
183inline constexpr QStringView ns_jingle_rtcp_fb = u"urn:xmpp:jingle:apps:rtp:rtcp-fb:0";
184// XEP-0294: Jingle RTP Header Extensions Negotiation
185inline constexpr QStringView ns_jingle_rtp_hdrext = u"urn:xmpp:jingle:apps:rtp:rtp-hdrext:0";
186// XEP-0297: Stanza Forwarding
187inline constexpr QStringView ns_forwarding = u"urn:xmpp:forward:0";
188// XEP-0300: Use of Cryptographic Hash Functions in XMPP
189inline constexpr QStringView ns_hashes = u"urn:xmpp:hashes:2";
190// XEP-0308: Last Message Correction
191inline constexpr QStringView ns_message_correct = u"urn:xmpp:message-correct:0";
192// XEP-0313: Message Archive Management
193inline constexpr QStringView ns_mam = u"urn:xmpp:mam:2";
194// XEP-0319: Last User Interaction in Presence
195inline constexpr QStringView ns_idle = u"urn:xmpp:idle:1";
196// XEP-0320: Use of DTLS-SRTP in Jingle Sessions
197inline constexpr QStringView ns_jingle_dtls = u"urn:xmpp:jingle:apps:dtls:0";
198// XEP-0333: Chat Markers
199inline constexpr QStringView ns_chat_markers = u"urn:xmpp:chat-markers:0";
200// XEP-0334: Message Processing Hints
201inline constexpr QStringView ns_message_processing_hints = u"urn:xmpp:hints";
202// XEP-0352: Client State Indication
203inline constexpr QStringView ns_csi = u"urn:xmpp:csi:0";
204// XEP-0353: Jingle Message Initiation
205inline constexpr QStringView ns_jingle_message = u"urn:xmpp:jingle-message:0";
206// XEP-0357: Push Notifications
207inline constexpr QStringView ns_push = u"urn:xmpp:push:0";
208// XEP-0359: Unique and Stable Stanza IDs
209inline constexpr QStringView ns_sid = u"urn:xmpp:sid:0";
210// XEP-0363: HTTP File Upload
211inline constexpr QStringView ns_http_upload = u"urn:xmpp:http:upload:0";
212// XEP-0364: Current Off-the-Record Messaging Usage
213inline constexpr QStringView ns_otr = u"urn:xmpp:otr:0";
214// XEP-0367: Message Attaching
215inline constexpr QStringView ns_message_attaching = u"urn:xmpp:message-attaching:1";
216// XEP-0369: Mediated Information eXchange (MIX)
217inline constexpr QStringView ns_mix = u"urn:xmpp:mix:core:1";
218inline constexpr QStringView ns_mix_create_channel = u"urn:xmpp:mix:core:1#create-channel";
219inline constexpr QStringView ns_mix_searchable = u"urn:xmpp:mix:core:1#searchable";
220inline constexpr QStringView ns_mix_node_info = u"urn:xmpp:mix:nodes:info";
221inline constexpr QStringView ns_mix_node_messages = u"urn:xmpp:mix:nodes:messages";
222inline constexpr QStringView ns_mix_node_participants = u"urn:xmpp:mix:nodes:participants";
223// XEP-0373: OpenPGP for XMPP
224inline constexpr QStringView ns_ox = u"urn:xmpp:openpgp:0";
225// XEP-0380: Explicit Message Encryption
226inline constexpr QStringView ns_eme = u"urn:xmpp:eme:0";
227// XEP-0382: Spoiler messages
228inline constexpr QStringView ns_spoiler = u"urn:xmpp:spoiler:0";
229// XEP-0384: OMEMO Encryption
230inline constexpr QStringView ns_omemo = u"eu.siacs.conversations.axolotl";
231inline constexpr QStringView ns_omemo_1 = u"urn:xmpp:omemo:1";
232inline constexpr QStringView ns_omemo_2 = u"urn:xmpp:omemo:2";
233inline constexpr QStringView ns_omemo_2_bundles = u"urn:xmpp:omemo:2:bundles";
234inline constexpr QStringView ns_omemo_2_devices = u"urn:xmpp:omemo:2:devices";
235// XEP-0386: Bind 2
236inline constexpr QStringView ns_bind2 = u"urn:xmpp:bind:0";
237// XEP-0388: Extensible SASL Profile
238inline constexpr QStringView ns_sasl_2 = u"urn:xmpp:sasl:2";
239// XEP-0402: PEP Native Bookmarks
240inline constexpr QStringView ns_bookmarks2 = u"urn:xmpp:bookmarks:1";
241// XEP-0403: Mediated Information eXchange (MIX): Presence Support
242inline constexpr QStringView ns_mix_node_presence = u"urn:xmpp:mix:nodes:presence";
243// XEP-0404: Mediated Information eXchange (MIX): JID Hidden Channels
244inline constexpr QStringView ns_mix_node_jidmap = u"urn:xmpp:mix:nodes:jidmap";
245// XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements
246inline constexpr QStringView ns_mix_pam = u"urn:xmpp:mix:pam:2";
247inline constexpr QStringView ns_mix_pam_archiving = u"urn:xmpp:mix:pam:2#archive";
248inline constexpr QStringView ns_mix_roster = u"urn:xmpp:mix:roster:0";
249inline constexpr QStringView ns_mix_presence = u"urn:xmpp:presence:0";
250// XEP-0406: Mediated Information eXchange (MIX): MIX Administration
251inline constexpr QStringView ns_mix_admin = u"urn:xmpp:mix:admin:0";
252inline constexpr QStringView ns_mix_node_allowed = u"urn:xmpp:mix:nodes:allowed";
253inline constexpr QStringView ns_mix_node_banned = u"urn:xmpp:mix:nodes:banned";
254inline constexpr QStringView ns_mix_node_config = u"urn:xmpp:mix:nodes:config";
255// XEP-0407: Mediated Information eXchange (MIX): Miscellaneous Capabilities
256inline constexpr QStringView ns_mix_misc = u"urn:xmpp:mix:misc:0";
257// XEP-0421: Occupant identifiers for semi-anonymous MUCs
258inline constexpr QStringView ns_muc_occupant_id = u"urn:xmpp:occupant-id:0";
259// XEP-0428: Fallback Indication
260inline constexpr QStringView ns_fallback_indication = u"urn:xmpp:fallback:0";
261// XEP-0434: Trust Messages (TM)
262inline constexpr QStringView ns_tm = u"urn:xmpp:tm:1";
263// XEP-0444: Message Reactions
264inline constexpr QStringView ns_reactions = u"urn:xmpp:reactions:0";
265// XEP-0446: File metadata element
266inline constexpr QStringView ns_file_metadata = u"urn:xmpp:file:metadata:0";
267// XEP-0447: Stateless file sharing
268inline constexpr QStringView ns_sfs = u"urn:xmpp:sfs:0";
269// XEP-0448: Encryption for stateless file sharing
270inline constexpr QStringView ns_esfs = u"urn:xmpp:esfs:0";
271// XEP-0450: Automatic Trust Management (ATM)
272inline constexpr QStringView ns_atm = u"urn:xmpp:atm:1";
273// XEP-0461: Message Replies
274inline constexpr QStringView ns_reply = u"urn:xmpp:reply:0";
275// XEP-0482: Call Invites
276inline constexpr QStringView ns_call_invites = u"urn:xmpp:call-invites:0";
277// XEP-0484: Fast Authentication Streamlining Tokens
278inline constexpr QStringView ns_fast = u"urn:xmpp:fast:0";
279
280// XEP-0421: Occupant identifiers for semi-anonymous MUCs
281struct MucOccupantId {
282 constexpr static std::tuple<QStringView, QStringView> XmlTag = { u"occupant-id", ns_muc_occupant_id };
283};
284
285} // namespace QXmpp::Private
286
287#endif // CONSTANTS_H