1//! A crate parsing common XMPP elements into Rust structures.
2//!
3//! Each module implements the `TryFrom<Element>` trait, which takes a
4//! minidom [`Element`] and returns a `Result` whose value is `Ok` if the
5//! element parsed correctly, `Err(error::Error)` otherwise.
6//!
7//! The returned structure can be manipulated as any Rust structure, with each
8//! field being public. You can also create the same structure manually, with
9//! some having `new()` and `with_*()` helper methods to create them.
10//!
11//! Once you are happy with your structure, you can serialise it back to an
12//! [`Element`], using either `From` or `Into<Element>`, which give you what
13//! you want to be sending on the wire.
14//!
15//! [`Element`]: ../minidom/element/struct.Element.html
16
17// Copyright (c) 2017-2019 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
18// Copyright (c) 2017-2019 Maxime “pep” Buquet <pep@bouah.net>
19//
20// This Source Code Form is subject to the terms of the Mozilla Public
21// License, v. 2.0. If a copy of the MPL was not distributed with this
22// file, You can obtain one at http://mozilla.org/MPL/2.0/.
23
24#![warn(missing_docs)]
25
26pub use blake2;
27pub use jid;
28pub use minidom;
29pub use sha1;
30pub use sha2;
31pub use sha3;
32
33// We normally only reexport entire crates, but xso is a special case since it uses proc macros
34// which require it to be directly imported as a crate. The only useful symbol we have to reexport
35// is its error type, which we expose in all of our return types.
36pub use xso::error::Error;
37
38/// XML namespace definitions used through XMPP.
39pub mod ns;
40
41#[macro_use]
42mod util;
43
44/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
45pub mod bind;
46/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
47pub mod iq;
48/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
49pub mod message;
50/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
51pub mod presence;
52/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
53pub mod sasl;
54/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
55pub mod stanza_error;
56/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
57pub mod stream;
58/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
59pub mod stream_features;
60
61/// RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
62pub mod roster;
63
64/// RFC 7395: An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket
65pub mod websocket;
66
67/// XEP-0004: Data Forms
68pub mod data_forms;
69
70/// XEP-0030: Service Discovery
71pub mod disco;
72
73/// XEP-0045: Multi-User Chat
74pub mod muc;
75
76/// XEP-0047: In-Band Bytestreams
77pub mod ibb;
78
79/// XEP-0048: Bookmarks
80pub mod bookmarks;
81
82/// XEP-0049: Private XML storage
83pub mod private;
84
85/// XEP-0054: vcard-temp
86pub mod vcard;
87
88/// XEP-0059: Result Set Management
89pub mod rsm;
90
91/// XEP-0060: Publish-Subscribe
92pub mod pubsub;
93
94/// XEP-0066: OOB
95pub mod oob;
96
97/// XEP-0071: XHTML-IM
98pub mod xhtml;
99
100/// XEP-0077: In-Band Registration
101pub mod ibr;
102
103/// XEP-0082: XMPP Date and Time Profiles
104pub mod date;
105
106/// XEP-0084: User Avatar
107pub mod avatar;
108
109/// XEP-0085: Chat State Notifications
110pub mod chatstates;
111
112/// XEP-0092: Software Version
113pub mod version;
114
115/// XEP-0107: User Mood
116pub mod mood;
117
118/// XEP-0114: Jabber Component Protocol
119pub mod component;
120
121/// XEP-0115: Entity Capabilities
122pub mod caps;
123
124/// XEP-0118: User Tune
125pub mod tune;
126
127/// XEP-0122: Data Forms Validation
128pub mod data_forms_validate;
129
130///XEP-0153: vCard-Based Avatars
131pub mod vcard_update;
132
133/// XEP-0157: Contact Addresses for XMPP Services
134pub mod server_info;
135
136/// XEP-0166: Jingle
137pub mod jingle;
138
139/// XEP-0167: Jingle RTP Sessions
140pub mod jingle_rtp;
141
142/// XEP-0172: User Nickname
143pub mod nick;
144
145/// XEP-0176: Jingle ICE-UDP Transport Method
146pub mod jingle_ice_udp;
147
148/// XEP-0177: Jingle Raw UDP Transport Method
149pub mod jingle_raw_udp;
150
151/// XEP-0184: Message Delivery Receipts
152pub mod receipts;
153
154/// XEP-0191: Blocking Command
155pub mod blocking;
156
157/// XEP-0198: Stream Management
158pub mod sm;
159
160/// XEP-0199: XMPP Ping
161pub mod ping;
162
163/// XEP-0202: Entity Time
164pub mod time;
165
166/// XEP-0203: Delayed Delivery
167pub mod delay;
168
169/// XEP-0215: External Service Discovery
170pub mod extdisco;
171
172/// XEP-0221: Data Forms Media Element
173pub mod media_element;
174
175/// XEP-0224: Attention
176pub mod attention;
177
178/// XEP-0231: Bits of Binary
179pub mod bob;
180
181/// XEP-0234: Jingle File Transfer
182pub mod jingle_ft;
183
184/// XEP-0257: Client Certificate Management for SASL EXTERNAL
185pub mod cert_management;
186
187/// XEP-0260: Jingle SOCKS5 Bytestreams Transport Method
188pub mod jingle_s5b;
189
190/// XEP-0261: Jingle In-Band Bytestreams Transport Method
191pub mod jingle_ibb;
192
193/// XEP-0264: Jingle Content Thumbnails
194pub mod jingle_thumnails;
195
196/// XEP-0280: Message Carbons
197pub mod carbons;
198
199/// XEP-0293: Jingle RTP Feedback Negotiation
200pub mod jingle_rtcp_fb;
201
202/// XEP-0294: Jingle RTP Header Extensions Negotiation
203pub mod jingle_rtp_hdrext;
204
205/// XEP-0297: Stanza Forwarding
206pub mod forwarding;
207
208/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
209pub mod hashes;
210
211/// XEP-0301: In-Band Real Time Text
212pub mod rtt;
213
214/// XEP-0308: Last Message Correction
215pub mod message_correct;
216
217/// XEP-0313: Message Archive Management
218pub mod mam;
219
220/// XEP-0319: Last User Interaction in Presence
221pub mod idle;
222
223/// XEP-0320: Use of DTLS-SRTP in Jingle Sessions
224pub mod jingle_dtls_srtp;
225
226/// XEP-0328: JID Prep
227pub mod jid_prep;
228
229/// XEP-0338: Jingle Grouping Framework
230pub mod jingle_grouping;
231
232/// XEP-0339: Source-Specific Media Attributes in Jingle
233pub mod jingle_ssma;
234
235/// XEP-0352: Client State Indication
236pub mod csi;
237
238/// XEP-0353: Jingle Message Initiation
239pub mod jingle_message;
240
241/// XEP-0359: Unique and Stable Stanza IDs
242pub mod stanza_id;
243
244/// XEP-0363: HTTP File Upload
245pub mod http_upload;
246
247/// XEP-0369: Mediated Information eXchange (MIX)
248pub mod mix;
249
250/// XEP-0373: OpenPGP for XMPP
251pub mod openpgp;
252
253/// XEP-0380: Explicit Message Encryption
254pub mod eme;
255
256/// XEP-0380: OMEMO Encryption (experimental version 0.3.0)
257pub mod legacy_omemo;
258
259/// XEP-0386: Bind 2
260pub mod bind2;
261
262/// XEP-0390: Entity Capabilities 2.0
263pub mod ecaps2;
264
265/// XEP-0402: PEP Native Bookmarks
266pub mod bookmarks2;
267
268/// XEP-0421: Anonymous unique occupant identifiers for MUCs
269pub mod occupant_id;
270
271/// XEP-0441: Message Archive Management Preferences
272pub mod mam_prefs;
273
274/// XEP-0444: Message Reactions
275pub mod reactions;
276
277/// XEP-0484: Fast Authentication Streamlining Tokens
278pub mod fast;