QXmpp Version: 1.13.0
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";
143// XEP-0167: Jingle RTP Sessions
144inline constexpr QStringView ns_jingle_rtp = u"urn:xmpp:jingle:apps:rtp:1";
145inline constexpr QStringView ns_jingle_rtp_audio = u"urn:xmpp:jingle:apps:rtp:audio";
146inline constexpr QStringView ns_jingle_rtp_video = u"urn:xmpp:jingle:apps:rtp:video";
147inline constexpr QStringView ns_jingle_rtp_info = u"urn:xmpp:jingle:apps:rtp:info:1";
148inline constexpr QStringView ns_jingle_rtp_errors = u"urn:xmpp:jingle:apps:rtp:errors:1";
149// XEP-0184: Message Receipts
150inline constexpr QStringView ns_message_receipts = u"urn:xmpp:receipts";
151// XEP-0191 Blocking Command
152inline constexpr QStringView ns_blocking = u"urn:xmpp:blocking";
153// XEP-0198: Stream Management
154inline constexpr QStringView ns_stream_management = u"urn:xmpp:sm:3";
155// XEP-0199: XMPP Ping
156inline constexpr QStringView ns_ping = u"urn:xmpp:ping";
157// XEP-0202: Entity Time
158inline constexpr QStringView ns_entity_time = u"urn:xmpp:time";
159// XEP-0203: Delayed Delivery
160inline constexpr QStringView ns_delayed_delivery = u"urn:xmpp:delay";
161// XEP-0215: External Service Discovery
162inline constexpr QStringView ns_external_service_discovery = u"urn:xmpp:extdisco:2";
163// XEP-0220: Server Dialback
164inline constexpr QStringView ns_server_dialback = u"jabber:server:dialback";
165// XEP-0221: Data Forms Media Element
166inline constexpr QStringView ns_media_element = u"urn:xmpp:media-element";
167// XEP-0224: Attention
168inline constexpr QStringView ns_attention = u"urn:xmpp:attention:0";
169// XEP-0231: Bits of Binary
170inline constexpr QStringView ns_bob = u"urn:xmpp:bob";
171// XEP-0249: Direct MUC Invitations
172inline constexpr QStringView ns_conference = u"jabber:x:conference";
173// XEP-0264: Jingle Content Thumbnails
174inline constexpr QStringView ns_thumbs = u"urn:xmpp:thumbs:1";
175// XEP-0272: Multiparty Jingle (Muji)
176inline constexpr QStringView ns_muji = u"urn:xmpp:jingle:muji:0";
177// XEP-0280: Message Carbons
178inline constexpr QStringView ns_carbons = u"urn:xmpp:carbons:2";
179// XEP-0283: Moved
180inline constexpr QStringView ns_moved = u"urn:xmpp:moved:1";
181// XEP-0293: Jingle RTP Feedback Negotiation
182inline constexpr QStringView ns_jingle_rtcp_fb = u"urn:xmpp:jingle:apps:rtp:rtcp-fb:0";
183// XEP-0294: Jingle RTP Header Extensions Negotiation
184inline constexpr QStringView ns_jingle_rtp_hdrext = u"urn:xmpp:jingle:apps:rtp:rtp-hdrext:0";
185// XEP-0297: Stanza Forwarding
186inline constexpr QStringView ns_forwarding = u"urn:xmpp:forward:0";
187// XEP-0300: Use of Cryptographic Hash Functions in XMPP
188inline constexpr QStringView ns_hashes = u"urn:xmpp:hashes:2";
189// XEP-0308: Last Message Correction
190inline constexpr QStringView ns_message_correct = u"urn:xmpp:message-correct:0";
191// XEP-0313: Message Archive Management
192inline constexpr QStringView ns_mam = u"urn:xmpp:mam:2";
193// XEP-0319: Last User Interaction in Presence
194inline constexpr QStringView ns_idle = u"urn:xmpp:idle:1";
195// XEP-0320: Use of DTLS-SRTP in Jingle Sessions
196inline constexpr QStringView ns_jingle_dtls = u"urn:xmpp:jingle:apps:dtls:0";
197// XEP-0333: Chat Markers
198inline constexpr QStringView ns_chat_markers = u"urn:xmpp:chat-markers:0";
199// XEP-0334: Message Processing Hints
200inline constexpr QStringView ns_message_processing_hints = u"urn:xmpp:hints";
201// XEP-0352: Client State Indication
202inline constexpr QStringView ns_csi = u"urn:xmpp:csi:0";
203// XEP-0353: Jingle Message Initiation
204inline constexpr QStringView ns_jingle_message = u"urn:xmpp:jingle-message:0";
205// XEP-0357: Push Notifications
206inline constexpr QStringView ns_push = u"urn:xmpp:push:0";
207// XEP-0359: Unique and Stable Stanza IDs
208inline constexpr QStringView ns_sid = u"urn:xmpp:sid:0";
209// XEP-0363: HTTP File Upload
210inline constexpr QStringView ns_http_upload = u"urn:xmpp:http:upload:0";
211// XEP-0364: Current Off-the-Record Messaging Usage
212inline constexpr QStringView ns_otr = u"urn:xmpp:otr:0";
213// XEP-0367: Message Attaching
214inline constexpr QStringView ns_message_attaching = u"urn:xmpp:message-attaching:1";
215// XEP-0369: Mediated Information eXchange (MIX)
216inline constexpr QStringView ns_mix = u"urn:xmpp:mix:core:1";
217inline constexpr QStringView ns_mix_create_channel = u"urn:xmpp:mix:core:1#create-channel";
218inline constexpr QStringView ns_mix_searchable = u"urn:xmpp:mix:core:1#searchable";
219inline constexpr QStringView ns_mix_node_info = u"urn:xmpp:mix:nodes:info";
220inline constexpr QStringView ns_mix_node_messages = u"urn:xmpp:mix:nodes:messages";
221inline constexpr QStringView ns_mix_node_participants = u"urn:xmpp:mix:nodes:participants";
222// XEP-0373: OpenPGP for XMPP
223inline constexpr QStringView ns_ox = u"urn:xmpp:openpgp:0";
224// XEP-0380: Explicit Message Encryption
225inline constexpr QStringView ns_eme = u"urn:xmpp:eme:0";
226// XEP-0382: Spoiler messages
227inline constexpr QStringView ns_spoiler = u"urn:xmpp:spoiler:0";
228// XEP-0384: OMEMO Encryption
229inline constexpr QStringView ns_omemo = u"eu.siacs.conversations.axolotl";
230inline constexpr QStringView ns_omemo_1 = u"urn:xmpp:omemo:1";
231inline constexpr QStringView ns_omemo_2 = u"urn:xmpp:omemo:2";
232inline constexpr QStringView ns_omemo_2_bundles = u"urn:xmpp:omemo:2:bundles";
233inline constexpr QStringView ns_omemo_2_devices = u"urn:xmpp:omemo:2:devices";
234// XEP-0386: Bind 2
235inline constexpr QStringView ns_bind2 = u"urn:xmpp:bind:0";
236// XEP-0388: Extensible SASL Profile
237inline constexpr QStringView ns_sasl_2 = u"urn:xmpp:sasl:2";
238// XEP-0402: PEP Native Bookmarks
239inline constexpr QStringView ns_bookmarks2 = u"urn:xmpp:bookmarks:1";
240// XEP-0403: Mediated Information eXchange (MIX): Presence Support
241inline constexpr QStringView ns_mix_node_presence = u"urn:xmpp:mix:nodes:presence";
242// XEP-0404: Mediated Information eXchange (MIX): JID Hidden Channels
243inline constexpr QStringView ns_mix_node_jidmap = u"urn:xmpp:mix:nodes:jidmap";
244// XEP-0405: Mediated Information eXchange (MIX): Participant Server Requirements
245inline constexpr QStringView ns_mix_pam = u"urn:xmpp:mix:pam:2";
246inline constexpr QStringView ns_mix_pam_archiving = u"urn:xmpp:mix:pam:2#archive";
247inline constexpr QStringView ns_mix_roster = u"urn:xmpp:mix:roster:0";
248inline constexpr QStringView ns_mix_presence = u"urn:xmpp:presence:0";
249// XEP-0406: Mediated Information eXchange (MIX): MIX Administration
250inline constexpr QStringView ns_mix_admin = u"urn:xmpp:mix:admin:0";
251inline constexpr QStringView ns_mix_node_allowed = u"urn:xmpp:mix:nodes:allowed";
252inline constexpr QStringView ns_mix_node_banned = u"urn:xmpp:mix:nodes:banned";
253inline constexpr QStringView ns_mix_node_config = u"urn:xmpp:mix:nodes:config";
254// XEP-0407: Mediated Information eXchange (MIX): Miscellaneous Capabilities
255inline constexpr QStringView ns_mix_misc = u"urn:xmpp:mix:misc:0";
256// XEP-0421: Occupant identifiers for semi-anonymous MUCs
257inline constexpr QStringView ns_muc_occupant_id = u"urn:xmpp:occupant-id:0";
258// XEP-0428: Fallback Indication
259inline constexpr QStringView ns_fallback_indication = u"urn:xmpp:fallback:0";
260// XEP-0434: Trust Messages (TM)
261inline constexpr QStringView ns_tm = u"urn:xmpp:tm:1";
262// XEP-0444: Message Reactions
263inline constexpr QStringView ns_reactions = u"urn:xmpp:reactions:0";
264// XEP-0446: File metadata element
265inline constexpr QStringView ns_file_metadata = u"urn:xmpp:file:metadata:0";
266// XEP-0447: Stateless file sharing
267inline constexpr QStringView ns_sfs = u"urn:xmpp:sfs:0";
268// XEP-0448: Encryption for stateless file sharing
269inline constexpr QStringView ns_esfs = u"urn:xmpp:esfs:0";
270// XEP-0450: Automatic Trust Management (ATM)
271inline constexpr QStringView ns_atm = u"urn:xmpp:atm:1";
272// XEP-0461: Message Replies
273inline constexpr QStringView ns_reply = u"urn:xmpp:reply:0";
274// XEP-0482: Call Invites
275inline constexpr QStringView ns_call_invites = u"urn:xmpp:call-invites:0";
276// XEP-0484: Fast Authentication Streamlining Tokens
277inline constexpr QStringView ns_fast = u"urn:xmpp:fast:0";
278
279// XEP-0421: Occupant identifiers for semi-anonymous MUCs
280struct MucOccupantId {
281 constexpr static std::tuple<QStringView, QStringView> XmlTag = { u"occupant-id", ns_muc_occupant_id };
282};
283
284} // namespace QXmpp::Private
285
286#endif // CONSTANTS_H