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
59/// RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
60pub mod roster;
61
62/// RFC 7395: An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket
63pub mod websocket;
64
65/// XEP-0004: Data Forms
66pub mod data_forms;
67
68/// XEP-0030: Service Discovery
69pub mod disco;
70
71/// XEP-0045: Multi-User Chat
72pub mod muc;
73
74/// XEP-0047: In-Band Bytestreams
75pub mod ibb;
76
77/// XEP-0048: Bookmarks
78pub mod bookmarks;
79
80/// XEP-0049: Private XML storage
81pub mod private;
82
83/// XEP-0054: vcard-temp
84pub mod vcard;
85
86/// XEP-0059: Result Set Management
87pub mod rsm;
88
89/// XEP-0060: Publish-Subscribe
90pub mod pubsub;
91
92/// XEP-0066: OOB
93pub mod oob;
94
95/// XEP-0071: XHTML-IM
96pub mod xhtml;
97
98/// XEP-0077: In-Band Registration
99pub mod ibr;
100
101/// XEP-0082: XMPP Date and Time Profiles
102pub mod date;
103
104/// XEP-0084: User Avatar
105pub mod avatar;
106
107/// XEP-0085: Chat State Notifications
108pub mod chatstates;
109
110/// XEP-0092: Software Version
111pub mod version;
112
113/// XEP-0107: User Mood
114pub mod mood;
115
116/// XEP-0114: Jabber Component Protocol
117pub mod component;
118
119/// XEP-0115: Entity Capabilities
120pub mod caps;
121
122/// XEP-0118: User Tune
123pub mod tune;
124
125/// XEP-0122: Data Forms Validation
126pub mod data_forms_validate;
127
128///XEP-0153: vCard-Based Avatars
129pub mod vcard_update;
130
131/// XEP-0157: Contact Addresses for XMPP Services
132pub mod server_info;
133
134/// XEP-0166: Jingle
135pub mod jingle;
136
137/// XEP-0167: Jingle RTP Sessions
138pub mod jingle_rtp;
139
140/// XEP-0172: User Nickname
141pub mod nick;
142
143/// XEP-0176: Jingle ICE-UDP Transport Method
144pub mod jingle_ice_udp;
145
146/// XEP-0177: Jingle Raw UDP Transport Method
147pub mod jingle_raw_udp;
148
149/// XEP-0184: Message Delivery Receipts
150pub mod receipts;
151
152/// XEP-0191: Blocking Command
153pub mod blocking;
154
155/// XEP-0198: Stream Management
156pub mod sm;
157
158/// XEP-0199: XMPP Ping
159pub mod ping;
160
161/// XEP-0202: Entity Time
162pub mod time;
163
164/// XEP-0203: Delayed Delivery
165pub mod delay;
166
167/// XEP-0215: External Service Discovery
168pub mod extdisco;
169
170/// XEP-0221: Data Forms Media Element
171pub mod media_element;
172
173/// XEP-0224: Attention
174pub mod attention;
175
176/// XEP-0231: Bits of Binary
177pub mod bob;
178
179/// XEP-0234: Jingle File Transfer
180pub mod jingle_ft;
181
182/// XEP-0257: Client Certificate Management for SASL EXTERNAL
183pub mod cert_management;
184
185/// XEP-0260: Jingle SOCKS5 Bytestreams Transport Method
186pub mod jingle_s5b;
187
188/// XEP-0261: Jingle In-Band Bytestreams Transport Method
189pub mod jingle_ibb;
190
191/// XEP-0264: Jingle Content Thumbnails
192pub mod jingle_thumnails;
193
194/// XEP-0280: Message Carbons
195pub mod carbons;
196
197/// XEP-0293: Jingle RTP Feedback Negotiation
198pub mod jingle_rtcp_fb;
199
200/// XEP-0294: Jingle RTP Header Extensions Negotiation
201pub mod jingle_rtp_hdrext;
202
203/// XEP-0297: Stanza Forwarding
204pub mod forwarding;
205
206/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
207pub mod hashes;
208
209/// XEP-0301: In-Band Real Time Text
210pub mod rtt;
211
212/// XEP-0308: Last Message Correction
213pub mod message_correct;
214
215/// XEP-0313: Message Archive Management
216pub mod mam;
217
218/// XEP-0319: Last User Interaction in Presence
219pub mod idle;
220
221/// XEP-0320: Use of DTLS-SRTP in Jingle Sessions
222pub mod jingle_dtls_srtp;
223
224/// XEP-0328: JID Prep
225pub mod jid_prep;
226
227/// XEP-0338: Jingle Grouping Framework
228pub mod jingle_grouping;
229
230/// XEP-0339: Source-Specific Media Attributes in Jingle
231pub mod jingle_ssma;
232
233/// XEP-0352: Client State Indication
234pub mod csi;
235
236/// XEP-0353: Jingle Message Initiation
237pub mod jingle_message;
238
239/// XEP-0359: Unique and Stable Stanza IDs
240pub mod stanza_id;
241
242/// XEP-0363: HTTP File Upload
243pub mod http_upload;
244
245/// XEP-0369: Mediated Information eXchange (MIX)
246pub mod mix;
247
248/// XEP-0373: OpenPGP for XMPP
249pub mod openpgp;
250
251/// XEP-0380: Explicit Message Encryption
252pub mod eme;
253
254/// XEP-0380: OMEMO Encryption (experimental version 0.3.0)
255pub mod legacy_omemo;
256
257/// XEP-0386: Bind 2
258pub mod bind2;
259
260/// XEP-0390: Entity Capabilities 2.0
261pub mod ecaps2;
262
263/// XEP-0402: PEP Native Bookmarks
264pub mod bookmarks2;
265
266/// XEP-0421: Anonymous unique occupant identifiers for MUCs
267pub mod occupant_id;
268
269/// XEP-0441: Message Archive Management Preferences
270pub mod mam_prefs;
271
272/// XEP-0444: Message Reactions
273pub mod reactions;
274
275/// XEP-0484: Fast Authentication Streamlining Tokens
276pub mod fast;