1// Copyright (c) 2017-2018 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2// Copyright (c) 2017 Maxime “pep” Buquet <pep+code@bouah.net>
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
9pub const JABBER_CLIENT: &str = "jabber:client";
10/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
11pub const XMPP_STANZAS: &str = "urn:ietf:params:xml:ns:xmpp-stanzas";
12/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
13pub const STREAM: &str = "http://etherx.jabber.org/streams";
14/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
15pub const SASL: &str = "urn:ietf:params:xml:ns:xmpp-sasl";
16/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
17pub const BIND: &str = "urn:ietf:params:xml:ns:xmpp-bind";
18
19/// RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
20pub const ROSTER: &str = "jabber:iq:roster";
21
22/// RFC 7395: An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket
23pub const WEBSOCKET: &str = "urn:ietf:params:xml:ns:xmpp-framing";
24
25/// XEP-0004: Data Forms
26pub const DATA_FORMS: &str = "jabber:x:data";
27
28/// XEP-0030: Service Discovery
29pub const DISCO_INFO: &str = "http://jabber.org/protocol/disco#info";
30/// XEP-0030: Service Discovery
31pub const DISCO_ITEMS: &str = "http://jabber.org/protocol/disco#items";
32
33/// XEP-0045: Multi-User Chat
34pub const MUC: &str = "http://jabber.org/protocol/muc";
35/// XEP-0045: Multi-User Chat
36pub const MUC_USER: &str = "http://jabber.org/protocol/muc#user";
37
38/// XEP-0047: In-Band Bytestreams
39pub const IBB: &str = "http://jabber.org/protocol/ibb";
40
41/// XEP-0059: Result Set Management
42pub const RSM: &str = "http://jabber.org/protocol/rsm";
43
44/// XEP-0060: Publish-Subscribe
45pub const PUBSUB: &str = "http://jabber.org/protocol/pubsub";
46/// XEP-0060: Publish-Subscribe
47pub const PUBSUB_ERRORS: &str = "http://jabber.org/protocol/pubsub#errors";
48/// XEP-0060: Publish-Subscribe
49pub const PUBSUB_EVENT: &str = "http://jabber.org/protocol/pubsub#event";
50/// XEP-0060: Publish-Subscribe
51pub const PUBSUB_OWNER: &str = "http://jabber.org/protocol/pubsub#owner";
52
53/// XEP-0077: In-Band Registration
54pub const REGISTER: &str = "jabber:iq:register";
55
56/// XEP-0085: Chat State Notifications
57pub const CHATSTATES: &str = "http://jabber.org/protocol/chatstates";
58
59/// XEP-0092: Software Version
60pub const VERSION: &str = "jabber:iq:version";
61
62/// XEP-0107: User Mood
63pub const MOOD: &str = "http://jabber.org/protocol/mood";
64
65/// XEP-0114: Jabber Component Protocol
66pub const COMPONENT_ACCEPT: &str = "jabber:component:accept";
67
68/// XEP-0114: Jabber Component Protocol
69pub const COMPONENT: &str = "jabber:component:accept";
70
71/// XEP-0115: Entity Capabilities
72pub const CAPS: &str = "http://jabber.org/protocol/caps";
73
74/// XEP-0166: Jingle
75pub const JINGLE: &str = "urn:xmpp:jingle:1";
76
77/// XEP-0172: User Nickname
78pub const NICK: &str = "http://jabber.org/protocol/nick";
79
80/// XEP-0184: Message Delivery Receipts
81pub const RECEIPTS: &str = "urn:xmpp:receipts";
82
83/// XEP-0191: Blocking Command
84pub const BLOCKING: &str = "urn:xmpp:blocking";
85/// XEP-0191: Blocking Command
86pub const BLOCKING_ERRORS: &str = "urn:xmpp:blocking:errors";
87
88/// XEP-0198: Stream Management
89pub const SM: &str = "urn:xmpp:sm:3";
90
91/// XEP-0199: XMPP Ping
92pub const PING: &str = "urn:xmpp:ping";
93
94/// XEP-0203: Delayed Delivery
95pub const DELAY: &str = "urn:xmpp:delay";
96
97/// XEP-0221: Data Forms Media Element
98pub const MEDIA_ELEMENT: &str = "urn:xmpp:media-element";
99
100/// XEP-0224: Attention
101pub const ATTENTION: &str = "urn:xmpp:attention:0";
102
103/// XEP-0234: Jingle File Transfer
104pub const JINGLE_FT: &str = "urn:xmpp:jingle:apps:file-transfer:5";
105/// XEP-0234: Jingle File Transfer
106pub const JINGLE_FT_ERROR: &str = "urn:xmpp:jingle:apps:file-transfer:errors:0";
107
108/// XEP-0260: Jingle SOCKS5 Bytestreams Transport Method
109pub const JINGLE_S5B: &str = "urn:xmpp:jingle:transports:s5b:1";
110
111/// XEP-0261: Jingle In-Band Bytestreams Transport Method
112pub const JINGLE_IBB: &str = "urn:xmpp:jingle:transports:ibb:1";
113
114/// XEP-0297: Stanza Forwarding
115pub const FORWARD: &str = "urn:xmpp:forward:0";
116
117/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
118pub const HASHES: &str = "urn:xmpp:hashes:2";
119/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
120pub const HASH_ALGO_SHA_256: &str = "urn:xmpp:hash-function-text-names:sha-256";
121/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
122pub const HASH_ALGO_SHA_512: &str = "urn:xmpp:hash-function-text-names:sha-512";
123/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
124pub const HASH_ALGO_SHA3_256: &str = "urn:xmpp:hash-function-text-names:sha3-256";
125/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
126pub const HASH_ALGO_SHA3_512: &str = "urn:xmpp:hash-function-text-names:sha3-512";
127/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
128pub const HASH_ALGO_BLAKE2B_256: &str = "urn:xmpp:hash-function-text-names:id-blake2b256";
129/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
130pub const HASH_ALGO_BLAKE2B_512: &str = "urn:xmpp:hash-function-text-names:id-blake2b512";
131
132/// XEP-0308: Last Message Correction
133pub const MESSAGE_CORRECT: &str = "urn:xmpp:message-correct:0";
134
135/// XEP-0313: Message Archive Management
136pub const MAM: &str = "urn:xmpp:mam:2";
137
138/// XEP-0319: Last User Interaction in Presence
139pub const IDLE: &str = "urn:xmpp:idle:1";
140
141/// XEP-0353: Jingle Message Initiation
142pub const JINGLE_MESSAGE: &str = "urn:xmpp:jingle-message:0";
143
144/// XEP-0359: Unique and Stable Stanza IDs
145pub const SID: &str = "urn:xmpp:sid:0";
146
147/// XEP-0380: Explicit Message Encryption
148pub const EME: &str = "urn:xmpp:eme:0";
149
150/// XEP-0390: Entity Capabilities 2.0
151pub const ECAPS2: &str = "urn:xmpp:caps";
152/// XEP-0390: Entity Capabilities 2.0
153pub const ECAPS2_OPTIMIZE: &str = "urn:xmpp:caps:optimize";
154
155#[cfg(not(feature = "component"))]
156pub const DEFAULT_NS: &str = JABBER_CLIENT;
157#[cfg(feature = "component")]
158pub const DEFAULT_NS: &str = COMPONENT_ACCEPT;