lib.rs

 1//! A crate parsing common XMPP elements into Rust structures.
 2//!
 3//! Each module implements a `parse` function, which takes a minidom
 4//! `Element` reference and returns `Some(MessagePayload)` if the parsing
 5//! succeeded, None otherwise.
 6//!
 7//! Parsed structs can then be manipulated internally, and serialised back
 8//! before being sent over the wire.
 9
10// Copyright (c) 2017 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
11//
12// This Source Code Form is subject to the terms of the Mozilla Public
13// License, v. 2.0. If a copy of the MPL was not distributed with this
14// file, You can obtain one at http://mozilla.org/MPL/2.0/.
15
16extern crate minidom;
17extern crate jid;
18extern crate base64;
19extern crate digest;
20extern crate sha2;
21extern crate sha3;
22extern crate blake2;
23
24/// Error type returned by every parser on failure.
25pub mod error;
26/// XML namespace definitions used through XMPP.
27pub mod ns;
28
29/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
30pub mod message;
31/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
32pub mod presence;
33/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
34pub mod iq;
35
36/// RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
37pub mod body;
38
39/// XEP-0004: Data Forms
40pub mod data_forms;
41
42/// XEP-0030: Service Discovery
43pub mod disco;
44
45/// XEP-0047: In-Band Bytestreams
46pub mod ibb;
47
48/// XEP-0059: Result Set Management
49pub mod rsm;
50
51/// XEP-0085: Chat State Notifications
52pub mod chatstates;
53
54/// XEP-0166: Jingle
55pub mod jingle;
56
57/// XEP-0184: Message Delivery Receipts
58pub mod receipts;
59
60/// XEP-0199: XMPP Ping
61pub mod ping;
62
63/// XEP-0203: Delayed Delivery
64pub mod delay;
65
66/// XEP-0221: Data Forms Media Element
67pub mod media_element;
68
69/// XEP-0224: Attention
70pub mod attention;
71
72/// XEP-0234: Jingle File Transfer
73pub mod jingle_ft;
74
75/// XEP-0261: Jingle In-Band Bytestreams Transport Method
76pub mod jingle_ibb;
77
78/// XEP-0297: Stanza Forwarding
79pub mod forwarding;
80
81/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
82pub mod hashes;
83
84/// XEP-0308: Last Message Correction
85pub mod message_correct;
86
87/// XEP-0313: Message Archive Management
88pub mod mam;
89
90/// XEP-0359: Unique and Stable Stanza IDs
91pub mod stanza_id;
92
93/// XEP-0380: Explicit Message Encryption
94pub mod eme;
95
96/// XEP-0390: Entity Capabilities 2.0
97pub mod ecaps2;